How to install/run Hyper-V host as a VM(nested) on vSphere 5 or 6?

By | May 27, 2015

Yesterday I prepared a lab for a presentation for my customers about Zerto 4.0 new features and replication between VMware vSphere and Microsoft Hyper-V 2012 R2. Unfortunately I didn't have enough physical machines to install mentioned hypervisors so I decided to run/install Hyper-V hosts as virtual machines (nested). Yes, it is possible to run some Hyper-V hosts on VMware vSphere 🙂 I used one physical HP DL 380p G8 with 128GB of RAM.

To be able to run nested Hyper-V hosts, you need to follow the below steps:

  1. Create a new VM on vSphere with Windows 2012 R2 installed on it.
  2. Power off the VM.
  3. If use Web Client please right click on VM and select Edit Settings. On Virtual Hardware tab, collapse CPU and change CPU/MMU Virtualization option to Hardware CPU and MMU.
    Change CPU virtualization option via Web Client

    Change CPU/Mem virtualization options via Web Client

    via Standard Client: please right click on VM and select Edit Settings. On Options tab please click on CPU/MMU Virtualization option and select Use Intel VT-x/AMD-V for instructions set virtualization and Intel EPT/AMD RVI for MMU virtualization.

    CPU/Mem virtualiation options via Standard Client

    Change CPU/Mem virtualiation options via Standard Client

  4. Click OK to save new settings.
  5. Right click on VM and remove it from inventory.

    Remove VM from inventory.

    Remove VM from inventory.

  6. Locate the VM folder on datastore, download a VM .vmx file to your desktop.

    A vmx file

    A vmx file

  7. Open the VM vmx file and add two below options at the end of file. Save the file.

    hypervisor.cpuid.v0 = "FALSE"
    vhv.enable= "TRUE"

  8. Upload the file again to datastore.
  9. Add to inventory/Register the VM again.

    Register a VM via Web Client.

    Register a VM via Web Client.

  10. Power on VM and please add Hyper-V role. (Server Manager --> Add Role --> Hyper-V)

    Add a Hyper-V role.

    Adding a Hyper-V role.

  11. As you can see everything works well and virtual machines can be created inside nested Hyper-V as well 🙂
    Nested Hyper-V with VM running on it.

    Nested Hyper-V with VM running on it.

     

If you do not do steps 3-9 (miss adding the parameter: hypervisor.cpuid.v0 = "FALSE") you will get the following error:

Hyper-V cannot be installed - missed a parameter in a vmx file

Hyper-V cannot be installed - missed a parameter in a vmx file

Hyper-V cannot be installed: A hypervisor is already running

 

12 thoughts on “How to install/run Hyper-V host as a VM(nested) on vSphere 5 or 6?

  1. Nate

    Hey Mariusz, thanks for the detailed blog, very helpful. Which version of vSphere did you use here?

    Reply
    1. Mariusz Post author

      Hi,

      the post is based on vSphere 6. However I tested it on vSphere 5.5 as well.

      Reply
  2. Louis G.

    Hi,

    What about SLAT ? I have setup an vSphere 6.0, created a W10 and W81 VM following your instructions. i successfully installed Hyper-V manager in those VMs and i can run VMs inside. But i need SLAT because it's needed by Visual Studio to run the phone emulators. The problem is that CoreInfo says that no hypervisor is present (cool) but that the SLAT capability is not available, so the emulator cannot run.

    Reply
      1. Louis G.

        Hi, thanks for your help. My CPU (i7 3930K) does support EPT (SLAT). What's weird is that when hyper-v is not installed in the Windows 10 VM, coreinfo reports that SLAT is OK. But from when i install hyper-v (required for emulator to work), coreinfo reports that SLAT is no longer OK... I know that when hyper-v is installed, coreinfo could report bad values. But i think that when Visual Studio tries to start the emulator, it checks if SLAT if available and base its check under the result of coreinfo (or systeminfo). And so it finds that SLAT is not available...

        Reply
        1. Dmitriy

          Hi, i've spent some time with exact same issue - after adding hyper-v coreinfo shows no SLAT nad VS2015 on Windows 10 can not start emulato... Do you have any success in resolving this issue?
          Thx

          Reply
          1. Gary Lau

            Same here,
            become hyper-V installation
            HYPERVISOR - Hypervisor is present
            VMX * Supports Intel hardware-assisted virtualization
            EPT * Supports Intel extended page tables (SLAT)

            after adding hyper-V , the EPT & SLAT become not available.....
            HYPERVISOR - Hypervisor is present
            VMX * Supports Intel hardware-assisted virtualization
            EPT - Supports Intel extended page tables (SLAT)

            This preventing me from deploying VDI based RDS in my domain.....

            anybody solved this problem?

            Thanks.

            Reply
            1. Mariusz Post author

              Hi,

              I received email from Louis and he still hasn't found any solution.

              Reply
              1. Anton Iakimov

                Same issue.
                Did anyone try to contact MS?

                PS I'm actually running Windows 8.1 inside ESXi, so that can be an issue.

                Reply
  3. Armin

    Coreinfo only reports accurate info before the hypervisor is installed, this is noted in the blog here.

    Reply
  4. Sekar

    I have installed V sphere 6.0 in windows 7 ultimate , I have tried to change the value in the file but unfortunately I could not found the date store file in windows 7. can you please suggest how to locate the datastore file in window 7.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *