We've been running KVM for virtualisation for quite some time now, so I'm reasonably comfortable with it. I've just started to look at nested virtualisation (after initially dismissing it as witch-craft), and have successfully nested KVM under KVM (physical host is running Fedora 19 with some Intel Nehalem Xeon CPUs), which is going to be invaluable for us when testing out the new version of oVirt. We wanted to have a look at Hyper-V as we may be called on to support it for VDI, so we thought we'd try it under nested virtualisation (it would save using more physical hardware for a test environment), but thus far I've been having some issues getting it installed at all. I've got Windows 2012 R2 installed without problem, but when I come to install the Hyper-V feature, it tells me that it can't be installed as a hypervisor is already running. I've made sure that the vmx flag is being passed across, I've even told virt-manager to copy the host CPU configuration, but still it's not having any of it. As a last ditch attempt, I made sure I wasn't using any virtio devices, just incase Windows was being extra picky about determining whether its running in a VM or not. Google searches have offered some anecdotal evidence of a few people having at least a partially working Hyper-V install with Windows 2008, but no indication of any configuration that they've done to get there. Most results are to do with a configuration change that VMware users have to do to get around the same problem (it's a setting in the .vmx file to do with the CPUID).
Has anyone here successfully had Hyper-V running under KVM? Or does anyone have any ideas of what I might try next (aside from resign myself to running Hyper-V on physical hardware/throw it away all-together)?
Here's my qemu command line:
/usr/bin/qemu-system-x86_64 -machine accel=kvm -name testhvguest -S -machine pc-i440fx-1.4,accel=kvm,usb=off -cpu Nehalem,+rdtscp,+dca,+pdcm,+xtpr,+tm2,+est,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -m 16384 -smp 8,sockets=8,cores=1,threads=1 -uuid 8a436afd-9506-5043-23b8-f19f080478a0 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/testhvguest.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-shutdown -boot order=c,menu=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device ahci,id=ahci0,bus=pci.0,addr=0x6 -drive file=/dev/vg_localstorage/lv_testhvguest,if=none,id=drive-sata0-0-0,format=raw,cache=none -device ide-hd,bus=ahci0.0,drive=drive-sata0-0-0,id=sata0-0-0 -drive file=/root/SW_DVD5_Windows_Svr_Std_and_DataCtr_2012_R2_64Bit_English_Core_MLF_X19-05182.ISO,if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=24,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:30:34:77,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -spice port=5901,addr=127.0.0.1,disable-ticketing,seamless-migration=on -vga std -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4