lima-vm/lima · error
unexpected video display %#q
Error message
unexpected video display %#q
What it means
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.
Source
Thrown at pkg/driver/vz/vm_darwin.go:660
graphicsDeviceConfiguration, err = vz.NewVirtioGraphicsDeviceConfiguration()
if err != nil {
return err
}
scanoutConfiguration, err := vz.NewVirtioGraphicsScanoutConfiguration(1920, 1200)
if err != nil {
return err
}
graphicsDeviceConfiguration.(*vz.VirtioGraphicsDeviceConfiguration).SetScanouts(scanoutConfiguration)
}
vmConfig.SetGraphicsDevicesVirtualMachineConfiguration([]vz.GraphicsDeviceConfiguration{
graphicsDeviceConfiguration,
})
return nil
case "none":
return nil
default:
return fmt.Errorf("unexpected video display %#q", *inst.Config.Video.Display)
}
}
func directorySharingDevicesGeneric(origMounts []limatype.Mount) ([]vz.DirectorySharingDeviceConfiguration, error) {
var mounts []vz.DirectorySharingDeviceConfiguration
for _, mount := range origMounts {
if _, err := os.Stat(mount.Location); errors.Is(err, os.ErrNotExist) {
err := os.MkdirAll(mount.Location, 0o750)
if err != nil {
return nil, err
}
}
directory, err := vz.NewSharedDirectory(mount.Location, !*mount.Writable)
if err != nil {
return nil, err
}
share, err := vz.NewSingleDirectoryShare(directory)View on GitHub (pinned to dd909d0973)
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
Example fix
// before video: display: "cocoa" // after video: display: "vz" # or "none" / omit
Defensive patterns
Strategy: validation
Validate before calling
vzDisplays := map[string]bool{"vz": true, "default": true, "none": true}
if cfg.Video != nil && cfg.Video.Display != nil && !vzDisplays[*cfg.Video.Display] {
return fmt.Errorf("display %q is not supported by the vz driver", *cfg.Video.Display)
} Try / catch
if err := startInstance(cfg); err != nil {
if strings.Contains(err.Error(), "unexpected video display") {
// switch display to "vz"/"none" or use the qemu driver
}
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Sharing one lima.yaml between qemu and vz setups; copying examples that use qemu-specific display names; typos in the display value.
Related errors
- errors inspecting instance: %+v
- unknown provision mode %#q
- invalid network spec %+v
- field `mountType` must be %#q or %#q for krunkit driver, got
- field `tpm` is not supported in krunkit driver
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/e8851cb8eea97b7b.
Report an issue: GitHub.