VMWare, Windows

Nested Windows Hyper-V Server 2012 R2 on VMware vSphere ESXi 6

As I still have a preference for VMware and with the annoying inconvenience still fresh in my mind from the previous two posts on managing Windows Server & Hyper-V outside a domain (within  a workgroup) I decided to deploy Hyper-V as a nested VM within my VMware environment. Though for Hyper-V role to be installed a few tweaks have to be applied to the VM(s) in question.

Step 1 – Configure CPU/MMU Virtualisation

Within vSphere go to the VM properties, Options tab and under CPU/MMU Virtualization option select Use Intel VTx/AMD-V for instruction set virtualization and Intel EPT/AMD RVI or MMU virtualization

Windows vSphere C# Client
vSphere Web Client

Step 2 – Add VMX Attributes

  1. Shutdown the VM
  2. Browse to the datastore which hosts the VMX file of the VM in question
  3. Download it locally
  4. Open the VMX file in your favorite text editor (Notepad or Notepad++) and add the end of it:
hypervisor.cpuid.v0 = "FALSE"
vhv.enable= "TRUE"

Result

You are now able to proceed in adding the Hyper-V role:

twitterredditpinterestlinkedinmail

11 Comments to “Nested Windows Hyper-V Server 2012 R2 on VMware vSphere ESXi 6”

  1. Juffus

    Thank you for the post!

    But I can’t get it working on ESXi 6.0 Update 2 (build 3620759).

    When I edit the .vmx file and upload it back to datastore, ESXi doesn’t recognize it as a valid virtual machine configuration file. I can’t register a VM from it. And even if I just replace the .vmx file for an existing VM it doesn’t power on and shows the error of configuration file:

    “An error was received from the ESX host while powering on VM HV5 (Hyper-V).
    Unable to load configuration file ‘/vmfs/volumes/575552a9-49a8011f-e4cc-7054d28f994f/HV5 (Hyper-V)/HV5 (Hyper-V).vmx’.”

    How can that issue be resolved?
    Thanks in advance.

    Reply
      1. aizzzek

        Check the box next to “Expose hardware-assisted virtualization to the guest operating system.” And add to the .vmx file this string hypervisor.cpuid.v0 = “FALSE”

        Reply
      2. Juffus

        hi Corin, I’ve figured it out:

        On ESXi 6.0 Update 2 (build 3620759) only one line in the .vmx configuration file should be added:

        hypervisor.cpuid.v0 = “FALSE”

        And then it worked perfectly for me! 🙂 sucessfully created a virtual Hyper-V cluster, and there is almost no performance looses.

        Reply
  2. Essam

    Great post, it works for ESXi 6.0 U2; one addition you need to reload the configuration files at the end of this process

    vim-cmd vmsvc/getallvms
    vim-cmd vmsvc/reload n (n is the vm id, for example 4)

    These commands can be run from the ESXi shell through SSH

    Reply
  3. VmF

    ..i make @ changes, but can’t activate Hyper-V Serverrole:
    Message:
    can not be installed because the processor does not have the necessary virtualization capabilities

    ESXi 6.0 Update 2 (build 3620759)
    Windows Server 2012r2

    Reply
  4. Faisal

    Hi, I appreciate this article, if your reconfigure vmx file in Esxi 6.5 there would be problem in registering VM again. so instead of messing with vmx you can add parameters from web console in VM Options , Advance , Edit Configuration….

    Reply
  5. Gopal

    Thank you for guide to install hyper-v on ESXI. After install windows 10 OS on hyper-v unable to connect network through vswitch but getting IP address from DHCP from external switch. Any help on getting host connect to external network.

    Reply

Leave a Comment

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