{"record":{"id":"e8851cb8eea97b7b","repo":"lima-vm/lima","slug":"unexpected-video-display-q","errorCode":null,"errorMessage":"unexpected video display %#q","messagePattern":"unexpected video display %#q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driver/vz/vm_darwin.go","lineNumber":660,"sourceCode":"\t\t\tgraphicsDeviceConfiguration, err = vz.NewVirtioGraphicsDeviceConfiguration()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tscanoutConfiguration, err := vz.NewVirtioGraphicsScanoutConfiguration(1920, 1200)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tgraphicsDeviceConfiguration.(*vz.VirtioGraphicsDeviceConfiguration).SetScanouts(scanoutConfiguration)\n\t\t}\n\n\t\tvmConfig.SetGraphicsDevicesVirtualMachineConfiguration([]vz.GraphicsDeviceConfiguration{\n\t\t\tgraphicsDeviceConfiguration,\n\t\t})\n\t\treturn nil\n\tcase \"none\":\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"unexpected video display %#q\", *inst.Config.Video.Display)\n\t}\n}\n\nfunc directorySharingDevicesGeneric(origMounts []limatype.Mount) ([]vz.DirectorySharingDeviceConfiguration, error) {\n\tvar mounts []vz.DirectorySharingDeviceConfiguration\n\tfor _, mount := range origMounts {\n\t\tif _, err := os.Stat(mount.Location); errors.Is(err, os.ErrNotExist) {\n\t\t\terr := os.MkdirAll(mount.Location, 0o750)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t}\n\n\t\tdirectory, err := vz.NewSharedDirectory(mount.Location, !*mount.Writable)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tshare, err := vz.NewSingleDirectoryShare(directory)","sourceCodeStart":642,"sourceCodeEnd":678,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driver/vz/vm_darwin.go#L642-L678","documentation":"attachDisplay switches on inst.Config.Video.Display and only knows a fixed set of values for the vz driver (e.g. \"vz\"/\"default\" and \"none\"); any other string hits the default case. The configured display mode is not implemented by the vz driver.","triggerScenarios":"lima.yaml sets `video.display:` to a value valid for another driver (e.g. qemu's \"cocoa\", \"sdl\", \"gtk\") but started with the vz driver.","commonSituations":"Sharing one lima.yaml between qemu and vz setups; copying examples that use qemu-specific display names; typos in the display value.","solutions":["Set video.display to a vz-supported value (\"vz\"/\"default\" or \"none\") in lima.yaml","Remove the video.display override to use the driver default","Use the qemu driver if the desired display backend (e.g. sdl/gtk) is required"],"exampleFix":"// before\nvideo:\n  display: \"cocoa\"\n// after\nvideo:\n  display: \"vz\"   # or \"none\" / omit","handlingStrategy":"validation","validationCode":"vzDisplays := map[string]bool{\"vz\": true, \"default\": true, \"none\": true}\nif cfg.Video != nil && cfg.Video.Display != nil && !vzDisplays[*cfg.Video.Display] {\n    return fmt.Errorf(\"display %q is not supported by the vz driver\", *cfg.Video.Display)\n}","typeGuard":null,"tryCatchPattern":"if err := startInstance(cfg); err != nil {\n    if strings.Contains(err.Error(), \"unexpected video display\") {\n        // switch display to \"vz\"/\"none\" or use the qemu driver\n    }\n}","preventionTips":["Use driver-agnostic or per-driver display settings in shared lima.yaml","Only use documented vz display values","Lint templates for qemu-only options before vz runs"],"tags":["display","video","vz-driver","config-validation"],"backgroundTag":"unsupported-config-value","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}