{"record":{"id":"c1aaf09ad71ce3f8","repo":"lima-vm/lima","slug":"field-mounttype-must-be-q-for-qemu-driver-on-w","errorCode":null,"errorMessage":"field `mountType` must be %#q for QEMU driver on Windows, got %#q","messagePattern":"field `mountType` must be %#q for QEMU driver on Windows, got %#q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driver/qemu/qemu_driver.go","lineNumber":176,"sourceCode":"\t\t\t\treturn nil\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"field `mountType` must be one of %v for QEMU driver on Linux, got %#q\", []string{limatype.REVSSHFS, limatype.NINEP, limatype.VIRTIOFS}, *cfg.MountType)\n\t\t\t}\n\t\tcase \"darwin\":\n\t\t\tswitch *cfg.MountType {\n\t\t\tcase limatype.REVSSHFS, limatype.NINEP:\n\t\t\t\treturn nil\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"field `mountType` must be %#q or %#q for QEMU driver on macOS, got %#q\", limatype.REVSSHFS, limatype.NINEP, *cfg.MountType)\n\t\t\t}\n\t\tcase \"windows\":\n\t\t\t// Windows version of QEMU does not support 9p yet, so we should not suggest it.\n\t\t\t// https://gitlab.com/qemu-project/qemu/-/work_items/974\n\t\t\tswitch *cfg.MountType {\n\t\t\tcase limatype.REVSSHFS:\n\t\t\t\treturn nil\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"field `mountType` must be %#q for QEMU driver on Windows, got %#q\", limatype.REVSSHFS, *cfg.MountType)\n\t\t\t}\n\t\tdefault:\n\t\t\tswitch *cfg.MountType {\n\t\t\tcase limatype.REVSSHFS, limatype.NINEP:\n\t\t\t\treturn nil\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"field `mountType` must be %#q or %#q for QEMU driver on %s, got %#q\", limatype.REVSSHFS, limatype.NINEP, runtime.GOOS, *cfg.MountType)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc fillConfig(cfg *limatype.LimaYAML, instDir string) error {\n\tif cfg.VMType == nil {\n\t\tcfg.VMType = new(limatype.QEMU)\n\t}","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driver/qemu/qemu_driver.go#L158-L194","documentation":"Validation error from the QEMU driver on Windows: the instance's `mountType` field has a value that is not allowed for QEMU on Windows (expected value printed in the first %#q). Typically 9p, which is unsupported on Windows hosts.","triggerScenarios":"lima.yaml with `mountType: 9p` or `mountType: virtiofs` (or any non-revsshfs value) while using the QEMU driver on a Windows host.","commonSituations":"Sharing one lima.yaml across macOS/Linux/Windows contributors where the Linux/macOS-valid value (9p or virtiofs) is invalid on Windows; copying docs examples written for Linux.","solutions":["Set mountType to the value shown as required in the error (e.g. \"reverse-sshfs\")","Use a template that defaults to a Windows-compatible mount type"],"exampleFix":"# before\nmountType: 9p\n// after\nmountType: revsshfs","handlingStrategy":"validation","validationCode":"if cfg.MountType != nil && *cfg.MountType != limatype.REVSSHFS {\n    return fmt.Errorf(\"on Windows the QEMU driver only supports mountType: revsshfs\")\n}","typeGuard":"func validWindowsMountType(mt limatype.MountType) bool { return mt == limatype.REVSSHFS }","tryCatchPattern":"if err := drv.Validate(ctx); err != nil && strings.Contains(err.Error(), \"on Windows\") {\n    // set mountType: revsshfs in lima.yaml and re-validate\n}","preventionTips":["On Windows hosts, always use revsshfs (9p is unsupported by QEMU for Windows).","For shared cross-platform lima.yaml files, omit mountType or gate it per host OS.","Validate the config on the target host OS, not just where it was authored."],"tags":["qemu","mount","windows","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}