lima-vm/lima · error
invalid plist: IOPlatformUUID not found in any child of IORe
Error message
invalid plist: IOPlatformUUID not found in any child of IORegistryEntryChildren
What it means
This is the terminal error of parseIOPlatformUUIDFromIOPlatformExpertDevice: the plist was structurally valid and had IORegistryEntryChildren, but no child entry contained a string-valued IOPlatformUUID key. The function therefore could not extract the platform UUID used as the macOS machine ID.
Source
Thrown at pkg/osutil/machineid.go:85
if p.Value.Dict == nil {
return "", errors.New("invalid plist: top-level value is not a dict")
}
ioRegistryEntryChildren, ok := p.Value.Dict["IORegistryEntryChildren"]
if !ok || ioRegistryEntryChildren.Array == nil || len(ioRegistryEntryChildren.Array) == 0 {
return "", errors.New("invalid plist: IORegistryEntryChildren not found or empty")
}
for _, child := range ioRegistryEntryChildren.Array {
if child.Dict == nil {
continue
}
ioPlatformUUID, ok := child.Dict["IOPlatformUUID"]
if !ok || ioPlatformUUID.String == nil {
continue
}
return *ioPlatformUUID.String, nil
}
return "", errors.New("invalid plist: IOPlatformUUID not found in any child of IORegistryEntryChildren")
}
View on GitHub (pinned to dd909d0973)
Solutions
- Confirm `ioreg -rd1 -c IOPlatformExpertDevice | grep IOPlatformUUID` returns a value on this machine.
- On virtualized macOS, update the VM platform settings so the SMBIOS/Platform UUID is exposed to the guest.
- Update lima to pick up parser fixes for newer macOS/ioreg formats.
- Accept hostname fallback: ensure the hostname is unique per machine to avoid identity collisions.
Example fix
// before: no IOPlatformUUID in ioreg output (VM guest)
// after: verify on host/guest
$ ioreg -rd1 -c IOPlatformExpertDevice | grep IOPlatformUUID
"IOPlatformUUID" = "XXXX-..." Defensive patterns
Strategy: fallback
Validate before calling
out, _ := exec.Command("ioreg", "-rd1", "-c", "IOPlatformExpertDevice").Output()
if !bytes.Contains(out, []byte("IOPlatformUUID")) {
// platform UUID not exposed (e.g. macOS VM); expect error 864
} Type guard
func hasIOPlatformUUID(r io.Reader) bool {
var p plist.Plist
if err := xml.NewDecoder(r).Decode(&p); err != nil || p.Value.Dict == nil {
return false
}
ch, ok := p.Value.Dict["IORegistryEntryChildren"]
if !ok || ch.Array == nil {
return false
}
for _, c := range ch.Array {
if u, ok := c.Dict["IOPlatformUUID"]; ok && u.String != nil {
return true
}
}
return false
} Try / catch
id, err := osutil.MachineID(ctx)
if err != nil && strings.Contains(err.Error(), "IOPlatformUUID") {
log.Warn("no IOPlatformUUID (macOS VM?); using hostname as machine id")
} Prevention
- Configure SMBIOS/Platform UUID in macOS VMs (VMware/VirtualBox/QEMU settings)
- Prefer hostname identity on virtualized macOS
- Grep ioreg output for IOPlatformUUID in preflight checks
When it happens
Trigger: machineID() on macOS iterates all children of IORegistryEntryChildren and every child either lacks the IOPlatformUUID key or its value is not a string; raised after the loop finishes without a match.
Common situations: Virtualized macOS (VMware/VirtualBox/QEMU) where the platform UUID is not exposed via IOPlatformExpertDevice; newer Macs with changed IORegistry layouts; ioreg run in a context with reduced IOService visibility.
Related errors
- invalid plist: IORegistryEntryChildren not found or empty
- invalid plist: top-level value is not a dict
- failed to unmarshal xml: %w
- unexpected plist format: missing root dict
- failed to create temp file: %w
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/472b091393046be5.
Report an issue: GitHub.