I am trying to find a way to set the VMX setting in KVM but the qm.conf format doesn't seem to allow me to pass these specific settings to libvirt/KVM.
Here is the text I am following from a site explaining how to nest a hypervisor and still allow HVM VMs to run inside.
I have nested KVM working and XenServer installed without issue. I can start PV VMs easily enough but need HVM mode for things like Windows OS. If anyone knows how to get Proxmox to pass this setting It would be a great help. I don't mind setting it globally on the server or inside the VM conf.
UPDATE: As I am researching this, it appears that I might have this flag already by using CPU type of "Host" though XenServer still doesn't see the feature.
UPDATE2: I was able to try to instantiate the VM via the terminal, I added `,+vmx` after the `cpu: host` and it tried to start but threw
Here is the text I am following from a site explaining how to nest a hypervisor and still allow HVM VMs to run inside.
Luckily with KVM we can forward the VMX CPU flag to a guest and as such make it available to Xenserver, for it's HVM mode.
There are a few things to be aware of though:
1 - in libvirt do give the Xenserver VM a good CPU profile (I used Core2duo) and make sure the VMX flag is set on "require"
2 - stock CentOS 7 kernel has a problem with nested virt at the moment, do use a newer kernel[1] (I'm using kernel-ml from elrepo-kernel)
3 - make sure the kvm_intel module is loaded with the option nested=1. For this to happen I reload/rebooted with this in /etc/modprobe.d/kvm-intel.conf:
options kvm-intel nested=1
I have nested KVM working and XenServer installed without issue. I can start PV VMs easily enough but need HVM mode for things like Windows OS. If anyone knows how to get Proxmox to pass this setting It would be a great help. I don't mind setting it globally on the server or inside the VM conf.
UPDATE: As I am researching this, it appears that I might have this flag already by using CPU type of "Host" though XenServer still doesn't see the feature.
Running nested VMX
------------------
The nested VMX feature is disabled by default. It can be enabled by giving
the "nested=1" option to the kvm-intel module.
No modifications are required to user space (qemu). However, qemu's default
emulated CPU type (qemu64) does not list the "VMX" CPU feature, so it must be
explicitly enabled, by giving qemu one of the following options:
-cpu host (emulated CPU has all features of the real CPU)
-cpu qemu64,+vmx (add just the vmx feature to a named CPU type)
UPDATE2: I was able to try to instantiate the VM via the terminal, I added `,+vmx` after the `cpu: host` and it tried to start but threw
and died. I tried switching to a different CPU with this flag and it failed the same way.warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
Last edited: