{"record":{"id":"0ad6743788c456fb","repo":"lima-vm/lima","slug":"firmware-images-configuration-is-not-supported-f","errorCode":null,"errorMessage":"`firmware.images` configuration is not supported for VZ driver","messagePattern":"`firmware\\.images` configuration is not supported for VZ driver","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driver/vz/vz_driver_darwin.go","lineNumber":292,"sourceCode":"\t\t\t*cfg.VMType)\n\t}\n\tif cfg.MountType != nil && *cfg.MountType == limatype.NINEP {\n\t\treturn fmt.Errorf(\"field `mountType` must be %#q or %#q for VZ driver , got %#q\", limatype.REVSSHFS, limatype.VIRTIOFS, *cfg.MountType)\n\t}\n\tif cfg.TPM != nil && *cfg.TPM {\n\t\treturn errors.New(\"field `tpm` is not supported on VZ driver\")\n\t}\n\tif cfg.OS != nil && *cfg.OS == limatype.WINDOWS {\n\t\treturn errors.New(\"currently Windows guest OS is only supported on QEMU\")\n\t}\n\tif *cfg.Firmware.LegacyBIOS {\n\t\tlogrus.Warnf(\"vmType %s: ignoring `firmware.legacyBIOS`\", *cfg.VMType)\n\t}\n\tfor _, f := range cfg.Firmware.Images {\n\t\tswitch f.VMType {\n\t\tcase \"\", limatype.VZ:\n\t\t\tif f.Arch == *cfg.Arch {\n\t\t\t\treturn errors.New(\"`firmware.images` configuration is not supported for VZ driver\")\n\t\t\t}\n\t\t}\n\t}\n\tif unknown := reflectutil.UnknownNonEmptyFields(cfg, knownYamlProperties...); cfg.VMType != nil && len(unknown) > 0 {\n\t\tlogrus.Warnf(\"vmType %s: ignoring %+v\", *cfg.VMType, unknown)\n\t}\n\n\tif !limatype.IsNativeArch(*cfg.Arch) {\n\t\treturn fmt.Errorf(\"unsupported arch: %#q\", *cfg.Arch)\n\t}\n\n\tfor i, image := range cfg.Images {\n\t\tif unknown := reflectutil.UnknownNonEmptyFields(image, \"File\", \"Kernel\", \"Initrd\", \"Variant\", \"ArchVariant\"); len(unknown) > 0 {\n\t\t\tlogrus.Warnf(\"vmType %s: ignoring images[%d]: %+v\", *cfg.VMType, i, unknown)\n\t\t}\n\t}\n\n\tfor i, mount := range cfg.Mounts {","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driver/vz/vz_driver_darwin.go#L274-L310","documentation":"Lima's VZ driver cannot boot custom firmware images; Virtualization.framework only supports booting via a macOS IPSW or a Linux kernel/initrd, not legacy BIOS/UEFI ROM images. During config validation, if any entry in `firmware.images` matches the current VM type (empty string or 'vz') and targets the host's architecture, validation fails immediately. This catches the config early instead of failing obscurely at VM start.","triggerScenarios":"Running `limactl start`/`validate` with vmType 'vz' while the YAML contains `firmware.images:` entries whose `vmType` is omitted or set to 'vz' and whose `arch` equals the configured guest arch (which defaults to the native arch).","commonSituations":"Copying a QEMU-oriented template that sets custom UEFI/BIOS firmware into a VZ instance; adding firmware images for aarch64/x86_64 cross-arch leftovers that happen to match the native arch; merging templates that include a `firmware:` section.","solutions":["Remove the `firmware.images` entries from the configuration","Scope the firmware entry to another driver by setting its `vmType: qemu` (or an arch different from the guest arch) so VZ ignores it","Use vmType 'qemu' if custom firmware is genuinely required"],"exampleFix":"# before\nfirmware:\n  images:\n    - location: ~/Downloads/OVMF.fd\n      arch: aarch64\n# after\nfirmware:\n  images:\n    - location: ~/Downloads/OVMF.fd\n      arch: aarch64\n      vmType: qemu","handlingStrategy":"validation","validationCode":"import \"golang.org/x/exp/yaml\" // parse lima.yaml first\nvar cfg LimaYAML\n_ = yaml.Unmarshal(data, &cfg)\nfor _, f := range cfg.Firmware.Images {\n    if (f.VMType == \"\" || f.VMType == \"vz\") && f.Arch == runtime.GOARCH {\n        // drop the entry or set vmType: qemu before starting\n    }\n}","typeGuard":"func firmwareForbiddenForVZ(f FirmwareImage, arch string) bool {\n    return (f.VMType == \"\" || f.VMType == \"vz\") && f.Arch == arch\n}","tryCatchPattern":null,"preventionTips":["Do not mix QEMU firmware sections into VZ templates","Scope firmware entries with an explicit vmType: qemu","Run `limactl validate` before `limactl start`"],"tags":["macos","vz","config-validation","firmware"],"backgroundTag":"unsupported-config-option","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}