{"record":{"id":"b3a766297c637b10","repo":"lima-vm/lima","slug":"vmtype-q-is-not-a-registered-driver","errorCode":null,"errorMessage":"vmType %#q is not a registered driver","messagePattern":"vmType %#q is not a registered driver","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driverutil/vm.go","lineNumber":40,"sourceCode":"// It validates the VMType is a known type (built-in or discovered external driver)\n// but does NOT require the driver to be available on the current platform.\nfunc ResolveVMType(y *limatype.LimaYAML) error {\n\tif y.VMType == nil {\n\t\ty.VMType = new(limatype.DefaultDriver())\n\t\tif y.Arch != nil && !limatype.IsNativeArch(*y.Arch) {\n\t\t\ty.VMType = new(limatype.DefaultNonNativeArchDriver())\n\t\t}\n\t}\n\n\t// Accept built-in VMType regardless of current platform.\n\tif slices.Contains(limatype.VMTypes, *y.VMType) {\n\t\treturn nil\n\t}\n\n\t// Also accept external drivers discovered in the registry.\n\t_, _, exists := registry.Get(*y.VMType)\n\tif !exists {\n\t\treturn fmt.Errorf(\"vmType %#q is not a registered driver\", *y.VMType)\n\t}\n\n\treturn nil\n}\n\nfunc InspectStatus(ctx context.Context, inst *limatype.Instance) (string, error) {\n\tif inst == nil || inst.Config == nil || inst.Config.VMType == nil {\n\t\treturn \"\", errors.New(\"instance or its configuration is not properly initialized\")\n\t}\n\n\textDriver, intDriver, exists := registry.Get(*inst.Config.VMType)\n\tif !exists {\n\t\treturn \"\", fmt.Errorf(\"unknown or unsupported VM type: %s\", *inst.Config.VMType)\n\t}\n\n\tif extDriver != nil {\n\t\tstatus, err := handleInspectStatusAction(ctx, inst, extDriver.Path)\n\t\tif err != nil {","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driverutil/vm.go#L22-L58","documentation":"ResolveVMType validates the vmType in a LimaYAML after applying defaults. It accepts built-in VM types unconditionally and otherwise requires the type to be present in the external driver registry. This error means the YAML explicitly names a VM type Lima cannot resolve at all — neither built-in nor a discovered external driver.","triggerScenarios":"Calling ResolveVMType (via limactl start template processing, fillDefaults, edit, restart, clone/rename, or YAML location listing) on a config where y.VMType is set to a string that is neither in limatype.VMTypes nor registered by any external driver plugin.","commonSituations":"Copy-pasting a template that uses an external driver you never installed; typos like \"Qemu\" or \"vz\" on a build without VZ; using a template from Lima main with an older local build; missing external driver discovery (wrong install path).","solutions":["Correct the vmType value in the template/lima.yaml to a built-in type: qemu, vz, wsl2","Install the external driver providing that vmType so registry discovery finds it","Remove the explicit vmType line and let Lima pick the default for your platform and arch","Upgrade limactl to match the template's expected Lima version"],"exampleFix":"// before: template.yaml\nvmType: \"virtio\" // not registered\n// after\nvmType: \"qemu\" // or remove the line entirely","handlingStrategy":"validation","validationCode":"y, err := limayaml.Load(b, \"template.yaml\")\nif err != nil {\n    return err\n}\nif err := driverutil.ResolveVMType(y); err != nil {\n    return err // surfaces unknown vmType before any VM work\n}","typeGuard":"func vmTypeRegistered(t string) bool {\n    return slices.Contains(limatype.VMTypes, t) || func() bool {\n        _, _, ok := registry.Get(t)\n        return ok\n    }()\n}","tryCatchPattern":"if err := driverutil.ResolveVMType(y); err != nil {\n    log.Warnf(\"%v; falling back to default driver\", err)\n    y.VMType = nil\n    _ = driverutil.ResolveVMType(y)\n}","preventionTips":["Run template validation early (limactl start does, but validate in CI too)","Don't hand-edit vmType; copy templates matching your Lima version","Upgrade Lima when adopting templates from newer releases"],"tags":["configuration","validation","vmtype"],"backgroundTag":"unknown-vm-type","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}