Description of problem:
I had a host with 'kvm-intel.nested=1' set in one cluster but another cluster was tight on resources so I moved this host to other cluster (maintenance - edit - activate).
I forgot to unset this kernel cmd arg and thus later on VMs started on this newly moved host had '-cpu Westmere,vmx=on' added.
Later on, these VMs could not be migrated to other (long time added) hosts as these did not have 'kvm-intel.nested=1' set.
It seems to be odd that a kernel cmdline arg influences all VMs by default. Maybe it would be better to have a custom userdefinedvmproperty check in the hook, eg. use_nestedvt=(true|false), and only based on availability of this property and on 'kvm-intel.nested=1' arg presence on the host, the value 'vmx=on' would be added to particular VM.
This would make it explicit that a VM should have nested VT set - right now we can just guest, maybe it would have, maybe not, depending on which host it would start.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. have a cluster with 2 hosts, only one with kvm-intel.nested=1 set
2. start a vm on the host with kvm-intel.nested=1
2b. move to other host
3. start a vm on the host without kvm-intel.nested=1
3b. move to other host
we cannot say if a vm would support nested vt or not
nested vt should be defined explicli via property on the vm
when such vm starts, we know it has vmx set
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=spice /usr/libexec/qemu-kvm -name guest=lleistne-dwh,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-31-lleistne-dwh/master-key.aes -machine pc-i440fx-rhel7.3.0,accel=kvm,usb=off,dump-guest-core=off -cpu Westmere,vmx=on,vme=on,pclmuldq=on,x2apic=on,hypervisor=on,arat=on -m size=4194304k,slots=16,maxmem=16777216k...
warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
Apr 4 13:51:58 slot-6b libvirtd: 2018-04-04 11:51:58.703+0000: 1614: error : virCPUx86UpdateLive:2727 : operation failed: guest CPU doesn't match specification: missing features: vmx
you can see in Host detail page that nestedvt hook is installed or not
(In reply to Michal Skrivanek from comment #1)
> you can see in Host detail page that nestedvt hook is installed or not
And you cannot see anything for a VM at all.
correct. Still, I wouldn’t want to require any new manual per-VM configuration for nestedvt. Just deploy the hook to all hosts...