{"record":{"id":"2f1717d3fafb715b","repo":"lima-vm/lima","slug":"failed-to-run-load-disk-q-w","errorCode":null,"errorMessage":"failed to run load disk %#q: %w","messagePattern":"failed to run load disk %#q: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driver/vz/vm_darwin.go","lineNumber":588,"sourceCode":"\t\t}\n\t\tisoAttachment, err := vz.NewDiskImageStorageDeviceAttachment(isoPath, true)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tisoDev, err := vz.NewUSBMassStorageDeviceConfiguration(isoAttachment)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tconfigurations = append(configurations, isoDev)\n\t}\n\n\tdiskUtil := proxyimgutil.NewDiskUtil(ctx)\n\n\tfor _, d := range inst.Config.AdditionalDisks {\n\t\tdiskName := d.Name\n\t\tdisk, err := store.InspectDisk(diskName, d.FSType)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to run load disk %#q: %w\", diskName, err)\n\t\t}\n\n\t\tlogrus.Infof(\"Mounting disk %#q on %#q\", diskName, disk.MountPoint)\n\t\tif err = disk.LockForInstance(inst.Dir); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to attach disk %#q: %w\", diskName, err)\n\t\t}\n\t\textraDiskPath := filepath.Join(disk.Dir, filenames.DataDisk)\n\t\t// ConvertToRaw is a NOP if no conversion is needed\n\t\tlogrus.Debugf(\"Converting extra disk %#q to a raw disk (if it is not a raw)\", extraDiskPath)\n\n\t\tif err = diskUtil.Convert(ctx, raw.Type, extraDiskPath, extraDiskPath, nil, true); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to convert extra disk %#q to a raw disk: %w\", extraDiskPath, err)\n\t\t}\n\t\textraDiskPathAttachment, err := vz.NewDiskImageStorageDeviceAttachmentWithCacheAndSync(extraDiskPath, false, diskImageCachingMode, vz.DiskImageSynchronizationModeFsync)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to create disk attachment for extra disk %#q: %w\", extraDiskPath, err)\n\t\t}\n\t\textraDisk, err := vz.NewVirtioBlockDeviceConfiguration(extraDiskPathAttachment)","sourceCodeStart":570,"sourceCodeEnd":606,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driver/vz/vm_darwin.go#L570-L606","documentation":"attachDisks looks up each additional disk by name (and FSType) in Lima's disk store via store.InspectDisk; if the lookup fails (disk not found, store corrupted, wrong FSType), the error is wrapped with this message. It is the first step of attaching an additional disk, so it fires before any VM configuration is touched.","triggerScenarios":"lima.yaml lists an additionalDisk whose name has no matching record in ${LIMA_HOME}/_disks (never created via `limactl disk create`, or deleted), or FSType mismatch causes InspectDisk to error.","commonSituations":"Template referencing a disk name that was never created; disk directory removed manually or after `limactl delete --force`; typo in disk name; sharing a config between machines without recreating disks.","solutions":["Create the missing disk: `limactl disk create <name> --size <size>` (with matching --fs)","Fix the disk name/FSType in lima.yaml to match an existing disk (`limactl disk list`)","Remove the additionalDisks entry from the instance config"],"exampleFix":"// before\nadditionalDisks: [\"missing-disk\"]\n// after\n$ limactl disk create missing-disk --size 10G  # then keep the config, or remove the entry","handlingStrategy":"validation","validationCode":"out, _ := exec.Command(\"limactl\", \"disk\", \"list\").Output()\nif !strings.Contains(string(out), diskName) {\n    return fmt.Errorf(\"disk %q does not exist; run: limactl disk create %s --size 10G\", diskName, diskName)\n}","typeGuard":null,"tryCatchPattern":"if err := startInstance(cfg); err != nil {\n    if strings.Contains(err.Error(), \"failed to run load disk\") {\n        // create the disk or fix the config entry\n    }\n}","preventionTips":["Always `limactl disk create` before referencing a disk in lima.yaml","Cross-check names/FSType with `limactl disk list`","Recreate disk store when moving LIMA_HOME between machines"],"tags":["disk","disk-store","vz-driver"],"backgroundTag":"disk-not-found","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}