{"record":{"id":"472b091393046be5","repo":"lima-vm/lima","slug":"invalid-plist-ioplatformuuid-not-found-in-any-chi","errorCode":null,"errorMessage":"invalid plist: IOPlatformUUID not found in any child of IORegistryEntryChildren","messagePattern":"invalid plist: IOPlatformUUID not found in any child of IORegistryEntryChildren","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/osutil/machineid.go","lineNumber":85,"sourceCode":"\tif p.Value.Dict == nil {\n\t\treturn \"\", errors.New(\"invalid plist: top-level value is not a dict\")\n\t}\n\tioRegistryEntryChildren, ok := p.Value.Dict[\"IORegistryEntryChildren\"]\n\tif !ok || ioRegistryEntryChildren.Array == nil || len(ioRegistryEntryChildren.Array) == 0 {\n\t\treturn \"\", errors.New(\"invalid plist: IORegistryEntryChildren not found or empty\")\n\t}\n\tfor _, child := range ioRegistryEntryChildren.Array {\n\t\tif child.Dict == nil {\n\t\t\tcontinue\n\t\t}\n\t\tioPlatformUUID, ok := child.Dict[\"IOPlatformUUID\"]\n\t\tif !ok || ioPlatformUUID.String == nil {\n\t\t\tcontinue\n\t\t}\n\t\treturn *ioPlatformUUID.String, nil\n\t}\n\n\treturn \"\", errors.New(\"invalid plist: IOPlatformUUID not found in any child of IORegistryEntryChildren\")\n}\n","sourceCodeStart":67,"sourceCodeEnd":87,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/osutil/machineid.go#L67-L87","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: no IOPlatformUUID in ioreg output (VM guest)\n// after: verify on host/guest\n$ ioreg -rd1 -c IOPlatformExpertDevice | grep IOPlatformUUID\n    \"IOPlatformUUID\" = \"XXXX-...\"","handlingStrategy":"fallback","validationCode":"out, _ := exec.Command(\"ioreg\", \"-rd1\", \"-c\", \"IOPlatformExpertDevice\").Output()\nif !bytes.Contains(out, []byte(\"IOPlatformUUID\")) {\n    // platform UUID not exposed (e.g. macOS VM); expect error 864\n}","typeGuard":"func hasIOPlatformUUID(r io.Reader) bool {\n    var p plist.Plist\n    if err := xml.NewDecoder(r).Decode(&p); err != nil || p.Value.Dict == nil {\n        return false\n    }\n    ch, ok := p.Value.Dict[\"IORegistryEntryChildren\"]\n    if !ok || ch.Array == nil {\n        return false\n    }\n    for _, c := range ch.Array {\n        if u, ok := c.Dict[\"IOPlatformUUID\"]; ok && u.String != nil {\n            return true\n        }\n    }\n    return false\n}","tryCatchPattern":"id, err := osutil.MachineID(ctx)\nif err != nil && strings.Contains(err.Error(), \"IOPlatformUUID\") {\n    log.Warn(\"no IOPlatformUUID (macOS VM?); using hostname as machine id\")\n}","preventionTips":["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"],"tags":["macos","ioreg","machine-id","plist"],"backgroundTag":"missing-machine-id","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}