{"record":{"id":"580421dbe0c3076e","repo":"lima-vm/lima","slug":"nested-virtualization-is-not-supported-on-this-dev","errorCode":null,"errorMessage":"nested virtualization is not supported on this device","messagePattern":"nested virtualization is not supported on this device","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/driver/vz/vm_darwin.go","lineNumber":359,"sourceCode":"func attachPlatformConfig(inst *limatype.Instance, vmConfig *vz.VirtualMachineConfiguration) error {\n\tplatformConfig, err := newPlatformConfiguration(inst)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// nested virt\n\tif *inst.Config.NestedVirtualization {\n\t\tmacOSProductVersion, err := osutil.ProductVersion()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to get macOS product version: %w\", err)\n\t\t}\n\n\t\tif macOSProductVersion.LessThan(*semver.New(\"15.0.0\")) {\n\t\t\treturn errors.New(\"nested virtualization requires macOS 15 or newer\")\n\t\t}\n\n\t\tif !vz.IsNestedVirtualizationSupported() {\n\t\t\treturn errors.New(\"nested virtualization is not supported on this device\")\n\t\t}\n\n\t\tgenericPlatformConfig, ok := platformConfig.(*vz.GenericPlatformConfiguration)\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"nested virtualization is not supported on %T\", platformConfig)\n\t\t}\n\n\t\tif err := genericPlatformConfig.SetNestedVirtualizationEnabled(true); err != nil {\n\t\t\treturn fmt.Errorf(\"cannot enable nested virtualization: %w\", err)\n\t\t}\n\t}\n\n\tvmConfig.SetPlatformVirtualMachineConfiguration(platformConfig)\n\treturn nil\n}\n\nfunc attachSerialPort(inst *limatype.Instance, config *vz.VirtualMachineConfiguration) error {\n\tpath := filepath.Join(inst.Dir, filenames.SerialVirtioLog)","sourceCodeStart":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/driver/vz/vm_darwin.go#L341-L377","documentation":"Beyond the macOS 15 requirement, nested virtualization only works on hardware where the VZ framework reports IsNestedVirtualizationSupported() — effectively Apple Silicon Macs whose CPU/firmware exposes it. The driver returns this error when the platform reports no support.","triggerScenarios":"Enabling nestedVirtualization: true on a Mac where the Virtualization framework's IsNestedVirtualizationSupported() returns false (e.g. Intel Macs, or Apple Silicon with unsupported firmware settings).","commonSituations":"Running nested-VM workloads on Intel Macs; older Apple Silicon models/firmware without the feature; VMs where the platform configuration type doesn't match GenericPlatformConfiguration (a separate error covers that).","solutions":["Verify hardware support — nested virt in VZ is limited to recent Apple Silicon; on unsupported hardware it cannot be enabled.","Switch to a host machine with nested virtualization support.","Disable nestedVirtualization in lima.yaml and redesign the workload (e.g. run containers instead of nested VMs).","Use the QEMU driver with software virtualization fallback if hardware support is absent."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// hardware preflight (Apple Silicon only, recent firmware)\nsysctl -n machdep.cpu.brand_string  # confirm Apple Silicon model; VZ nested virt is Apple Silicon only\nuname -m  # expect arm64","typeGuard":null,"tryCatchPattern":"// Go: capability check before enabling\nif !vz.IsNestedVirtualizationSupported() {\n    return errors.New(\"nested virtualization is not supported on this device\")\n}","preventionTips":["Confirm the Mac model supports VZ nested virtualization","Don't enable nested virt on Intel Macs","Have a non-nested fallback workload design"],"tags":["vz-driver","nested-virtualization","hardware"],"backgroundTag":"nested-virtualization-unsupported","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}