{"record":{"id":"7bf23684597e90e6","repo":"lima-vm/lima","slug":"unsupported-arch-q-7bf236","errorCode":null,"errorMessage":"unsupported arch: %#q","messagePattern":"unsupported arch: %#q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driver/vz/vz_driver_darwin.go","lineNumber":301,"sourceCode":"\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 {\n\t\tif unknown := reflectutil.UnknownNonEmptyFields(mount, \"Location\",\n\t\t\t\"MountPoint\",\n\t\t\t\"Writable\",\n\t\t\t\"SSHFS\",\n\t\t\t\"NineP\",\n\t\t); len(unknown) > 0 {\n\t\t\tlogrus.Warnf(\"vmType %s: ignoring mounts[%d]: %+v\", *cfg.VMType, i, unknown)\n\t\t}\n\t}","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driver/vz/vz_driver_darwin.go#L283-L319","documentation":"The VZ driver can only emulate the host's native CPU architecture (Virtualization.framework provides no binary translation). validateConfig rejects any configured `arch` that is not the native architecture of the Mac (`limatype.IsNativeArch`). The `%#q` verb prints the offending arch value back to the user.","triggerScenarios":"Setting `arch: amd64` on an Apple Silicon Mac, or `arch: aarch64` on an Intel Mac, then starting or validating a vmType 'vz' instance.","commonSituations":"Copying a template authored for a different machine; explicitly pinning arch in lima.yaml copied from a CI config for the other CPU; confusion after switching between Intel and Apple Silicon hardware.","solutions":["Remove the explicit `arch` field so it defaults to the native architecture","Set `arch` to the native arch (aarch64 on Apple Silicon, amd64 on Intel)","Use vmType 'qemu' if a non-native arch is truly required"],"exampleFix":"# before (on Apple Silicon)\narch: amd64\nvmType: vz\n# after\narch: aarch64\nvmType: vz","handlingStrategy":"validation","validationCode":"var cfg LimaYAML\n_ = yaml.Unmarshal(data, &cfg)\nif cfg.Arch != nil && cfg.Arch != runtime.GOARCH {\n    // remove arch or switch vmType to qemu before starting\n}","typeGuard":"func isNativeArch(arch string) bool {\n    return arch == \"\" || arch == runtime.GOARCH\n}","tryCatchPattern":null,"preventionTips":["Omit the arch field to accept the native default","Never copy `arch:` from templates built for the other CPU","Validate configs when moving instances between Intel and Apple Silicon hosts"],"tags":["macos","vz","arch","config-validation"],"backgroundTag":"unsupported-architecture","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}