CuiZinieR
Contributor
Contributor

How To Create Nested Virtualization Using Hyper-V In The Guest?

Jump to solution

Hi,

I try to do nested virtualization with VMware Player v7 and Windows Server 2012 R2 as the guest but fail to install the Hyper-V role.

According to this VMware document, it's possible to run a VM within a VM with Player 7: "Virtualized HV is fully supported for virtual hardware version 9 or later VMs on hosts that support Intel VT-x and EPT or AMD-V and RVI. To enable virtualized HV, select VM->Settings and navigate to the processor settings screen. Check the box next to  "Virtualize Intel VT-x/EPT or AMD-V/RVI."“

First, I tried on 2 different computers (1 server running Windows Server 2008 R2 and 1 laptop running Windows 7 Pro) whose CPU support "Intel® VT-x with Extended Page Tables (EPT)" according to Intel's official website:

Second, in the VM CPU settings, I tried the following options:

hyper-v03.JPG

hyper-v04.JPG

In each case, when I try to add the Hyper-V role in the guest, it fails with the message "Hyper-V cannot be installed: A hypervisor is already running":

hyper-v02.JPG

I also tried using VMware Workstation 11 instead of Player 7 but it's the same.

Can someone tell me what's wrong? How can I do nested virtualization using Hyper-V in the guest?

Thanks in advance.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
CuiZinieR
Contributor
Contributor

Hi WoodyZ,

No, I didn't and after further search on Internet, I found 2 solutions for my issue.

Solution #1: (the most simple one)

Set the guest OS type to "Hyper-V (unsupported)". In my case, my guest OS is Windows Server 2012 but I suppose you have to choose this option whether you run Windows Server 2012, Windows Server 2008 or Windows 8/8.1.

The VM's CPU settings won't change:

hyper-v09.JPG

Solution #2:

If you don't set your OS type to "Hyper-V (unsupported)":

  • Open the file Location for this Virtual Machine, open the file extension (*.vmx) with Notepad.
  • In the last line, add this code and save it:

        hypervisor.cpuid.v0 = “FALSE”

        mce.enable = “TRUE”

        vhu.enable = “TRUE”

hyper-v08.png

  • After that, edit the CPU settings on VM from VMware Workstation/Player by checking the following options:

         Virtualize Intel VT-x/EPT or AMD-V/RVI.

        Virtualize CPU Performance counters.

hyper-v10.JPG

Source: http://social.technet.microsoft.com/wiki/contents/articles/22283.how-to-install-hyper-v-on-vmware-wo...

You will then be able to add the Hyper-V role in the guest OS.

View solution in original post

0 Kudos
9 Replies
WoodyZ
Immortal
Immortal

Did you set the guest OS type to "Hyper-V"?

0 Kudos
CuiZinieR
Contributor
Contributor

Hi WoodyZ,

No, I didn't and after further search on Internet, I found 2 solutions for my issue.

Solution #1: (the most simple one)

Set the guest OS type to "Hyper-V (unsupported)". In my case, my guest OS is Windows Server 2012 but I suppose you have to choose this option whether you run Windows Server 2012, Windows Server 2008 or Windows 8/8.1.

The VM's CPU settings won't change:

hyper-v09.JPG

Solution #2:

If you don't set your OS type to "Hyper-V (unsupported)":

  • Open the file Location for this Virtual Machine, open the file extension (*.vmx) with Notepad.
  • In the last line, add this code and save it:

        hypervisor.cpuid.v0 = “FALSE”

        mce.enable = “TRUE”

        vhu.enable = “TRUE”

hyper-v08.png

  • After that, edit the CPU settings on VM from VMware Workstation/Player by checking the following options:

         Virtualize Intel VT-x/EPT or AMD-V/RVI.

        Virtualize CPU Performance counters.

hyper-v10.JPG

Source: http://social.technet.microsoft.com/wiki/contents/articles/22283.how-to-install-hyper-v-on-vmware-wo...

You will then be able to add the Hyper-V role in the guest OS.

View solution in original post

0 Kudos
a_p_
Leadership
Leadership

Just a quick note, although you got this already fixed. As of VMware Workstation 9/Player 5, setting the guest OS to "Hyper-V" (as mentioned by WoodyZ) should be sufficient. For details see Running Nested VMs.

André

CuiZinieR
Contributor
Contributor

Thanks a.p. for your explanation.

A bit out of topic, but is VMware the only product on the market that supports nested virtualization?

0 Kudos
a_p_
Leadership
Leadership

So far I only used VMware products to run my nested labs. However, this may certainly be possible with other Hypervisors too.

I moved your discussion from VMware Player to Nested Virtualization so maybe other users who run such environments will comment on this.

André

0 Kudos
admin
Immortal
Immortal

CuiZinieR wrote:

Thanks a.p. for your explanation.

A bit out of topic, but is VMware the only product on the market that supports nested virtualization?

No; Xen and kvm both support nested virtualization.

0 Kudos
admin
Immortal
Immortal

CuiZinieR wrote:

In my case, my guest OS is Windows Server 2012 but I suppose you have to choose this option whether you run Windows Server 2012, Windows Server 2008 or Windows 8/8.1.

Once you install the Hyper-V role in the guest, the guest OS becomes Hyper-V.  The management OS is irrelevant, since it runs in a nested VM under Hyper-V.  We don't distinguish among Hyper-V R1, Hyper-V R2 and Hyper-V R3, since the VM configuration settings are the same for all three.

0 Kudos
CuiZinieR
Contributor
Contributor

Thanks jmattson for your comments!

0 Kudos
rokenom
Contributor
Contributor

There's also Parallels that allows you to use a hyper-visor inside a virtual machine. Tested.

0 Kudos