Technical

Host injected async #PF in kernel mode: Fix Nested Proxmox VE with CPU Type

Host injected async #PF in kernel mode: Fix Nested Proxmox VE with CPU Type

Host injected async #PF in kernel mode on nested Proxmox VE is almost always the CPU type. Set the VM’s CPU to host and the panic goes away.

Detailed close-up of ethernet cables and network connections on a router, showcasing modern technology.

What’s happening

You’re running Proxmox inside a VM on a Proxmox host. The nested VM boots, then panics with that async #PF error. It’s a page fault in kernel mode that the hypervisor injected into the guest. Nested virtualization exposes CPU features differently, and the default kvm64 CPU type doesn’t pass through everything the nested kernel expects.

Detailed close-up of a golden microprocessor chip, ideal for technology concepts.

The fix

  1. Shut down the nested VM.
  2. Open its hardware settings.
  3. Set CPU type to host.
  4. Start the VM.

That’s it. The panic should be gone. If it still happens, check that nested virtualization is enabled on the host: cat /sys/module/kvm_intel/parameters/nested should return Y (or 1). On AMD it’s kvm_amd.

Why this works

The host CPU type passes through all the host CPU flags to the guest. The nested kernel sees the same features it would on bare metal, so it doesn’t trip over missing instructions. The default kvm64 is a lowest-common-denominator CPU that’s fine for most VMs but not for nested virtualization.

If you’re also running KSM (Kernel Samepage Merging) on the host, disable it for this VM. KSM can cause weird page table issues with nested guests. In the VM’s config, add args: -machine pc,accel=kvm:tcg as a last resort if you can’t change the CPU type.

This is one of those errors that looks scary but has a simple fix. The Proxmox forum thread on this is full of speculation, but nobody tested the CPU type. I did. It works.

If you’re doing other nested stuff, check out Bottlerocket on Proxmox or Fedora CoreOS on Proxmox.

Leave a comment

Comments are reviewed before they appear. Your email is never published.