Can Hyper-V run in a virtual machine

hyper-vrecursivevirtualization

Ok, we all know (or should know) that Microsoft's answer is a plain "NO!".

But we also know that recent hypervisors can support nested/recursive virtualization, provided the underlying CPU offers hardware virtualization; VMware's recent products (ESXi 5, Workstation 8) even support this natively, without the need for ugly hacks.

So, my question is: can Hyper-V run succesfully (i.e. allowing to actually run virtual machines) inside other hypervisors?

If yes, which ones? And how?


This is only intended for testing, of course.

Best Answer

Yes, it can, if the underlying CPUs support the latest virtualization extensions (Intel VT-X/EPT) and if you're using the latest VMware products (Workstation 8, ESXi 5).

The relevant settings in your VM should be as follows:

monitor.virtual_mmu = "hardware"
monitor.virtual_exec = "hardware"
vhv.enable = "TRUE"
hypervisor.cpuid.v0 = "FALSE"

The first three settings can be enabled via GUI (where exactly varies slightly between Workstation and ESXi), the last one needs to be manually added to the VM's .vmx file.

Additionally, on ESXi 5, you need to add the following line to /etc/vmware/config:

vhv.allow = "TRUE"
Related Topic