{"record":{"id":"7eaf9ffb0fd1fec9","repo":"lima-vm/lima","slug":"field-tpm-is-not-supported-on-vz-driver","errorCode":null,"errorMessage":"field `tpm` is not supported on VZ driver","messagePattern":"field `tpm` is not supported on VZ driver","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driver/vz/vz_driver_darwin.go","lineNumber":280,"sourceCode":"\t\treturn errors.New(\"configuration is nil\")\n\t}\n\tmacOSProductVersion, err := osutil.ProductVersion()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif macOSProductVersion.LessThan(*semver.New(\"13.0.0\")) {\n\t\treturn errors.New(\"VZ driver requires macOS 13 or higher to run\")\n\t}\n\tif runtime.GOARCH == \"amd64\" && macOSProductVersion.LessThan(*semver.New(\"15.5.0\")) {\n\t\tlogrus.Warnf(\"vmType %s: On Intel Mac, macOS 15.5 or later is required to run Linux 6.12 or later. \"+\n\t\t\t\"Update macOS, or change vmType to `qemu` if the VM does not start up. (https://github.com/lima-vm/lima/issues/3334)\",\n\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}","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driver/vz/vz_driver_darwin.go#L262-L298","documentation":"Validation error from the VZ driver's validateConfig (pkg/driver/vz/vz_driver_darwin.go:280), raised during instance create/start when the lima.yaml sets `tpm: true`. The Virtualization.framework-based VZ driver does not implement a software TPM device, so TPM support is only available with the QEMU driver. Fix by removing the `tpm` field or setting it to false, or switching vmType to `qemu`.","triggerScenarios":"Config sets tpm: true (or limatype.TPM enabled) while vmType is \"vz\".","commonSituations":"Enabling TPM for Windows guest or systemd/measured-boot experiments and using the VZ driver; copying a QEMU config with TPM enabled to a VZ instance.","solutions":["Remove the `tpm` field or set it to false","Use the QEMU driver, which supports swtpm, if a TPM is required"],"exampleFix":"// before (lima.yaml)\nvmType: vz\ntpm: true\n// after\nvmType: vz\ntpm: false","handlingStrategy":"validation","validationCode":"if vmType == \"vz\" && tpmEnabled {\n    tpmEnabled = false // VZ does not support TPM\n}","typeGuard":null,"tryCatchPattern":"if err := start(); err != nil && strings.Contains(err.Error(), \"`tpm` is not supported\") {\n    // disable tpm or switch to qemu\n}","preventionTips":["Only enable tpm with vmType: qemu","Run `limactl validate` on configs before starting","Audit templates for QEMU-only fields before switching drivers"],"tags":["config-validation","tpm","vz"],"backgroundTag":"unsupported-driver-feature","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}