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

By | June 29, 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


Author: Mariusz

Architect (~ 15 years experience based on passion...) with strong background as a System Administrator and Engineer. Focused on Data Center Solutions: Virtualization/Cloud Computing and Storage/Backup Systems. Currently living in Poland.

24 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?

    1. Mariusz Post author


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

      1. Tharanga

        Hi MariusZ,
        I have follow your steps in vSphere Web Client : Version 6.5.0 Build 4602587
        But once I load the vmx with changes. it fails to start and giving below error,

        File xxxxx-agt-win.vmdk was not found
        An error was received from the ESX host while powering on VM xxxxx-agt-win.
        Failed to start the virtual machine.
        Module "DiskEarly" Power on failed.
        Cannot open the disk xxxxx-agt-win.vmdk or one of the snapshot disks it depends on .
        The system cannot find the file specified VMware ESX cannot find the virtual disk
        But the files are available only modified vmx giving the issues
        appreciate if you can direct me.

  2. Louis G.


    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.

      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...

        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?

          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?


            1. Mariusz Post author


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

              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.

  3. Armin

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

  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.

  5. Christian von Hausen

    Hi, Have you created a Hyper-V Vm(inside of Hyper-V)? if so how Hyper-v vSwitches and Hyper-v Vm Nic interfaces are configured so that this Hyper-V Vm can communicate with the external network(beyond ESXi)?
    Any consideration/configuration on the VmWare networking setup of the Hyper-v VmWare Vm machine.?

    1. Juan Jesus Mendoza

      Hola amigo, resolviste tu problema??? Tengo el mismo error

  6. Aldrin

    If error still persist you can also expose Virtualization on the Guest OS. This solved my issue

    My setup was ESXI 6 > Windows 2012 > Hyper-v > pfsense(VM)

  7. Brana

    Hello mates,
    I've have the same problem, getting the same error in Hyper-V and screen like mentioned above ("The application encountered an error while attempting to change the state of (virtual machine name)......." )
    I'm using nested Hyper-V Windows Server 2016 on ESXi 5.5 VMWare Vcenter and edited the VMX file and added the two following lines:
    vhv.enable = “TRUE”
    hypervisor.cpuid.v0 = “FALSE”

    Also enabled "Use Intel VT-x/AMD-v virtualization and Intel EPT/AMD RVI for MMU virtualization" via VMware VSphere Client 5.5 (also tried from web client - the same result).

    Also checked BCDEDIT - hypervisor launch type is set on auto start

    But setting "no execute memory protection" I can't find anywhere neither in BIOS of virtual machine neither in VMware VSphere Client.

    I'm not using physical machine for W2016 server virtual machine. I'm using vcenter host in datacenter for that W2016 server virtual machine.

    That virtual machine doesn't have regular BIOS settings so I can't enable hardware virtualization and "no execute memory protection" through BIOS!!!

    Is there any solution to my problem?

    Best regards!

  8. Mac

    Thanks for that Mariusz!

    Worked like a charm.

    Docker CE for Windows VM "failed to start the virtual machine because one of the hyper-v (..)" issue is now resolved!

    I run ESXi 6.0 (host) > Windows Server 2019 (ESXi VM) > Docker for Windows (Hyper-V VM).

  9. futballer17

    Thanks, this worked! I tried it on Win10 VM with ESXi 5.5. For those having issue with .vmx file not being recognized or the Add to Inventory after uploading the file to esxi datastore is grayed out, please make sure you use textpad or note++ to edit the file, simply editing and saving with notepad will change how the file is saved, using textpad 5 or note++ text editor will retains the files binary values/format.

  10. Zal

    Do you install VMware Tools on the host or it shouldn't be installed?

    I was able to get hyper-v installed and VM run, however, it would reboot itself randomly (the hyper-v host VM)

    Not sure if this is related to VMware tools installed while it should be?


  11. Jeff

    I have been able to deploy Windows 10 on ESX 6.7 Update 3, but unable to connect the Vm's to the internet. Hyper V host has internet, vm's get IP address no internet. Can you offer any assistance?

    1. Russ

      Jeff - Were you able to correct the configuration in your environment to allow VM's to have Internet? Mine is the same as you've described. Host has Internet, my HyperV VM has a corect IP address but cannot ping the default gateway or any thing beyond the Host IP address.



Leave a Reply

Your email address will not be published.

one × 5 =