Unable to run nested hypervisor

AreaKode

Active Member
Feb 16, 2017
4
0
41
40
I'm having difficulty using a nested hypervisor on Proxmox. I have a qemu guest with Proxmox installed. But when I disable "KVM hardware virtualization", the guest loads very, very slow; and I'm unable to start a nested guest. It looks like the guest is only utilizing one core (25% CPU with 4 vCPUs, 50% CPU with 2 vCPUs, etc). I've confirmed that I get this same behavior with Windows Server 2008 and Windows Server 2016.

I've played around with the CPU type. Other than not being able to nest hypervisors, leaving the CPU type to kvm64 causes the host to work perfectly fine. It seems no matter what other type I select, when I start the guest, I get "warning: TCG doesn't support requested feature: CPUID.01H:EDX.vme [bit 1]" for each virtual core I have enabled.

When I set the CPU type to "host", I get "kvm: CPU model 'host' requires KVM", and it fails to start.

I'm at a loss. The only thing I can find is that virtualization technology may not be enabled, but I've confirmed this same issue on both of my hosts. One is a Nehalem type, and the other is a Westmere type. Both are in Dell R710s, and "Virtualization Technology" is enabled in the bios. I can confirm that "cat /sys/module/kvm_intel/parameters/nested" returns a "Y".
 
could you post the output of "lscpu" from the PVE shell?
 
root@pve-prod:~# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 24
On-line CPU(s) list: 0-23
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 44
Model name: Intel(R) Xeon(R) CPU X5670 @ 2.93GHz
Stepping: 2
CPU MHz: 2925.852
BogoMIPS: 5851.93
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 12288K
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23
 
so if you start a VM on that PVE host with CPU type host and KVM enabled, you should be able to use KVM inside the VM as well. if not, please post the complete VM configuration and the error message.
 
Nope. "Accelerator not found."

VM config:
---
balloon: 8
bootdisk: ide0
cores: 4
cpu: kvm64
hotplug: disk,network,usb
ide0: local-lvm:vm-136-disk-1,size=32G
ide2: local:iso/proxmox-ve_4.4-eb2d6f1e-2.iso,media=cdrom
memory: 8192
name: pve1
net0: e1000=66:37:33:B4:AE:B3,bridge=vmbr1
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=c17c54d1-61a6-47f0-9d4f-67b200a72f37
sockets: 1

Nested VM config:
---
balloon: 4
bootdisk: ide0
cores: 2
cpu: kvm64
ide0: local-lvm:vm-100-disk-1,size=32G
ide2: pve-storage:iso/CentOS-7-x86_64-Minimal.iso,media=cdrom
memory: 4096
name: test-vm
net0: virtio=0E:B5:9D:D2:D3:9C,bridge=vmbr0
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=e2c0500a-772c-43a9-bcf4-202e9746833b
sockets: 1
 
the first vm has to have cpu: host if you want to run vms inside of it
 
Okay. There's where my confusion came from. I saw that Host was what I should choose, but I thought I also needed to disable KVM Hardware Virtualization. It wouldn't start with that configuration. Leaving the hardware virtualization on, I can start the VM with type Host, and I can run nested VMs. That seems to work. Thanks!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!