lima-vm/lima · error

nested virtualization is not supported on this device

Error message

nested virtualization is not supported on this device

What it means

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.

Source

Thrown at pkg/driver/vz/vm_darwin.go:359

func attachPlatformConfig(inst *limatype.Instance, vmConfig *vz.VirtualMachineConfiguration) error {
	platformConfig, err := newPlatformConfiguration(inst)
	if err != nil {
		return err
	}

	// nested virt
	if *inst.Config.NestedVirtualization {
		macOSProductVersion, err := osutil.ProductVersion()
		if err != nil {
			return fmt.Errorf("failed to get macOS product version: %w", err)
		}

		if macOSProductVersion.LessThan(*semver.New("15.0.0")) {
			return errors.New("nested virtualization requires macOS 15 or newer")
		}

		if !vz.IsNestedVirtualizationSupported() {
			return errors.New("nested virtualization is not supported on this device")
		}

		genericPlatformConfig, ok := platformConfig.(*vz.GenericPlatformConfiguration)
		if !ok {
			return fmt.Errorf("nested virtualization is not supported on %T", platformConfig)
		}

		if err := genericPlatformConfig.SetNestedVirtualizationEnabled(true); err != nil {
			return fmt.Errorf("cannot enable nested virtualization: %w", err)
		}
	}

	vmConfig.SetPlatformVirtualMachineConfiguration(platformConfig)
	return nil
}

func attachSerialPort(inst *limatype.Instance, config *vz.VirtualMachineConfiguration) error {
	path := filepath.Join(inst.Dir, filenames.SerialVirtioLog)

View on GitHub (pinned to dd909d0973)

Solutions

  1. Verify hardware support — nested virt in VZ is limited to recent Apple Silicon; on unsupported hardware it cannot be enabled.
  2. Switch to a host machine with nested virtualization support.
  3. Disable nestedVirtualization in lima.yaml and redesign the workload (e.g. run containers instead of nested VMs).
  4. Use the QEMU driver with software virtualization fallback if hardware support is absent.
Defensive patterns

Strategy: validation

Validate before calling

// hardware preflight (Apple Silicon only, recent firmware)
sysctl -n machdep.cpu.brand_string  # confirm Apple Silicon model; VZ nested virt is Apple Silicon only
uname -m  # expect arm64

Try / catch

// Go: capability check before enabling
if !vz.IsNestedVirtualizationSupported() {
    return errors.New("nested virtualization is not supported on this device")
}

Prevention

When it happens

Trigger: 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).

Common situations: 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).

Related errors


AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01). Data as JSON: /api/errors/580421dbe0c3076e. Report an issue: GitHub.