lima-vm/lima · error
base disk (%#q) child must not have children of its own
Error message
base disk (%#q) child must not have children of its own
What it means
AcceptableAsBaseDisk allows a base disk to report at most one child, and that child must be the image itself with no further children. If the single child of the image has children of its own, the image is part of a multi-level backing chain (grandchild depth >= 2). Lima rejects such nested image trees because they represent external file references that qemu-img would resolve from the host, which is both a correctness risk and an untrusted-image exfiltration vector.
Source
Thrown at pkg/qemuimgutil/qemuimgutil.go:289
case "qcow2", "raw":
// NOP
default:
logrus.WithField("filename", info.Filename).
Warnf("Unsupported image format %#q. The image may not boot, or may have an extra privilege to access the host filesystem. Use with caution.", info.Format)
}
if err := rejectExternalFileReferences(info); err != nil {
return err
}
// info.Children is set since QEMU 8.0
switch len(info.Children) {
case 0:
// NOP
case 1:
if info.Filename != info.Children[0].Info.Filename {
return fmt.Errorf("base disk (%#q) child must not have a different filename (%#q)", info.Filename, info.Children[0].Info.Filename)
}
if len(info.Children[0].Info.Children) > 0 {
return fmt.Errorf("base disk (%#q) child must not have children of its own", info.Filename)
}
default:
return fmt.Errorf("base disk (%#q) must not have multiple children: %+v", info.Filename, info.Children)
}
return nil
}
View on GitHub (pinned to dd909d0973)
Solutions
- Flatten the entire chain into one image: `qemu-img convert -O qcow2 topmost.qcow2 flat.qcow2` and use flat.qcow2 as the base disk.
- Collapse the chain with `qemu-img commit` at each level until `qemu-img info` shows no nested children, then retry.
- Re-export the image from its original source as a single self-contained qcow2/raw file.
Example fix
// before: base.qcow2 <- mid.qcow2 <- top.qcow2 (use top.qcow2 as base disk) // after // qemu-img convert -O qcow2 top.qcow2 flat.qcow2 // # qemu-img info flat.qcow2 now reports a single file with no children/backing files
Defensive patterns
Strategy: validation
Validate before calling
// Verify the image has no nested backing chain before use: // qemu-img info --backing-chain --output=json disk.qcow2 | jq 'length == 1' // A result of 1 means a single self-contained image (no backing chain).
Type guard
func noNestedChildren(info Info) bool {
for _, c := range info.Children {
if len(c.Info.Children) > 0 {
return false
}
}
return true
} Prevention
- Avoid stacking multiple overlay images; commit or convert overlays before sharing them.
- Check `qemu-img info --backing-chain` shows exactly one file before registering a base disk.
- Keep base images immutable and self-contained; do overlays in ephemeral copies, never in the shared base.
When it happens
Trigger: Calling AcceptableAsBaseDisk (via EnsureDisk) on an image where info.Children has exactly 1 entry and info.Children[0].Info.Children is non-empty — i.e. a two-level-deep backing-file chain — on QEMU >= 8.0 which populates Children.
Common situations: Stacking several `qemu-img create -b` overlays on top of each other and using the top overlay as the base disk; shipping a disk image converted from a snapshot chain without flattening; images produced by tools that leave multi-level commit trees.
Related errors
- base disk (%#q) child must not have a different filename (%#
- base disk (%#q) must not have multiple children: %+v
- configuration is nil
- field `vmOpts.qemu.minimumVersion` must be a semvar value, g
- mount type %#q is explicitly unsupported
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/79e9d64e98d34ffe.
Report an issue: GitHub.