lima-vm/lima · error
base disk (%#q) must not have multiple children: %+v
Error message
base disk (%#q) must not have multiple children: %+v
What it means
AcceptableAsBaseDisk rejects base disks that report more than one child in `qemu-img info` output (Children populated since QEMU 8.0). Multiple children means the image has several attached references — e.g. multiple VMDK extents whose filenames differ, or an image opened with multiple links — which Lima cannot verify as self-contained, so it fails closed rather than allow untrusted external file references into the guest disk.
Source
Thrown at pkg/qemuimgutil/qemuimgutil.go:292
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
- Convert the image to a single-file qcow2: `qemu-img convert -O qcow2 image.vmdk image.qcow2`, ensuring all extents are in one directory or embedded during conversion.
- If the source is a split VMDK, re-download/re-export it as a monolithic (single-file) VMDK or directly as qcow2/raw, then retry.
- Verify with `qemu-img info image.qcow2` that children/backing files are gone before using it as a base disk.
Example fix
// before: split VMDK (disk-s001.vmdk, disk-s002.vmdk, ...) used as base disk // after // qemu-img convert -O qcow2 disk.vmdk disk.qcow2 # monolithic conversion // # qemu-img info disk.qcow2 -> no children, single self-contained file
Defensive patterns
Strategy: validation
Validate before calling
// Before use, confirm the image is single-file: // qemu-img info --output=json image.vmdk | jq '.children | length <= 1' // For VMDK sources, prefer monolithic export or convert first: // qemu-img convert -O qcow2 image.vmdk image.qcow2
Type guard
func singleChildMax(info Info) bool {
return len(info.Children) <= 1
} Prevention
- Convert multi-file formats (split/monolithic VMDK with extents, VDI exports) to single-file qcow2 before use.
- Keep source image and any extent files together (or embed them) if conversion is not done immediately.
- Add a CI check that runs `qemu-img info` on shipped images and fails if children/backing files are present.
When it happens
Trigger: Calling AcceptableAsBaseDisk (via EnsureDisk) on an image whose qemu-img info JSON contains 2+ entries in info.Children — e.g. a streamOptimized/split VMDK with multiple external extent files, or any format exposing multiple child nodes.
Common situations: Importing a split VMDK (multiple -s001.vmdk extent files) converted only partially to qcow2; using an image produced by a hypervisor export that kept multi-file layout; inspecting an image with QEMU 8.0+ where the multi-child structure becomes visible.
Related errors
- base disk (%#q) child must not have a different filename (%#
- base disk (%#q) child must not have children of its own
- 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/5040879c0c55d1a1.
Report an issue: GitHub.