As Veeam moves forward and starts to become focused two virtualization platforms, I thought to myself now is the time to work out how I’m going to introduce Microsoft Hyper-V in my lab environment. I wanted to know if it could be virtualized running inside a VMware virtual machine of some sorts. Veeam has been very successful in presenting its solutions through the use of portable labs running for example on laptops nested under VMware Workstation. We would often have a nested ESX server, vCenter, DC and Veeam apps running on a single laptop and I wanted to know if Hyper-V could be thrown into the mix.
This post will function as a how-to guide and provide a step-by-step process to run Hyper-V virtual machines on either VMware Workstation 8 or ESXi 5.
For a long time, I was told it was impossible, and a few months ago, I heard a passing rumour that it would be possible when ESXi 5 came out. I’d also heard that ESXi 5 running on Intel Nehalem or Intel Core i7 was going to allow nested hypervisors to also contain running, nested 64bit virtual machines. So firstly, I went about making sure that when I was due for a new laptop, I would have this Intel architecture, or equivalent AMD, in my system. I also managed to build a lab with the same architecture that I plan to use on the road for events.
Through Twitter, someone sent me a link to a few blogs that helped me start my quest:
By the time I’d gotten a chance to give it a whirl, ESXi had gone GA. What I found from the blogs posted above was there were some great pointers, but when I followed either post’s instructions, all I got was a blank Black Screen like a few other people were reporting. No matter what additional information I gave, it just would not work. Undeterred, I decided to try something different. I installed VMware Workstation 8 instead of ESXi 5 and managed to get a nested Hyper-VM working. At this point, I knew my hardware was going to be compatible with nesting Hyper-V. The blog posts above stated the key to making it work is a feature found in your CPU/BIOS called Intel EPT. Now, I read that if you have Nehalem/Core i7, you should have Intel EPT; the blog posts suggested that it should be enabled through the BIOS. However, I didn’t find this option in either of my system BIOS.
While testing what would work, I decided to use Windows 2008 R2 Standard and enable Hyper-V as a Role rather than install the standalone Hyper-V product. I only did this to make my life easier, but the standalone Hyper-V product is a fine option as well.
Nesting a Hyper-VM on VMware Workstation 8
So, following are the steps to create a Microsoft Hyper-V VM running in VMware Workstation 8, but later I’ll show you how to do it in ESXi 5 as well:
1. Create a New VM with version 8 hardware
2. Give it 4 GB RAM and 2 x vCPUs with about 80-100 GB disk space, depending upon how many VMs you wanted nested underneath Hyper-V.
3. The instructions lead you to believe that you should pick a VMware ESX option as the guest OS... STOP! DON’T! Select Windows 2008 R2 x64.
4. When you are finished, make sure you add another NIC to the VM used as the Hyper-V virtual network,
5. Under the settings of the VM > CPU, make sure you have the option to pass-through the Intel VT-x/EPT feature.
6. Make sure you have set the VM to boot from Windows 2008 R2 x64 media ISO.
7. Before booting, you should edit the config file .vmx and add the parameter: hypervisor.cpuid.v0 = “FALSE”
8. Now Boot and Install Windows 2008 R2 x64.
9. Once finished, open up Server Manager and click “Add Role”.
10. Select and install the Hyper-V option. At this point, you will know if your system is working correctly and passing the Intel EPT feature, because if it doesn’t, you won’t be able to go past this point.
11. You’ll also have to select the network adapter used for the virtual network.
12. Now install Hyper-V, which will need a reboot.
13. After it is completed, open Server Manager drill down to Hyper-V and connect to the local server.
14. Now create and install a virtual machine.
Once done, you should be able to use it as normal, albeit slow.
Nesting Hyper-VM running ESXi 5
Now, doing the same thing on ESXi 5 is a little trickier although some of the steps are the same.
1. Before anything you need to place an entry in the /etc/vmware/config file found in the tech support mode on your ESXi 5. I enabled SSH through the security profile in the vSphere Client. Then used putty SSH into the ESXi system.
2. From there I executed the following command which is needed to allow nested hypervisors :
# echo 'vhv.allow = "TRUE" ' >> /etc/vmware/config
Notice the use of single and double quotes in the command-line
3. Now create a virtual machine using version 8 hardware, 4GB (or as much as you can spare), 2 x vCPUs, 2 or more vNICs and a 100GB virtual disk.
4. Before booting up the VM and installing Hyper-V we need to add two lines the virtual machines config file .vmx
You can try this through the vSphere Client in the settings of the virtual machine > Configuration Parameters, whereas I had better luck doing it from command-line
To add them using command-line move back in SSH > change into the directory where you Hyper-V VM is installed
# echo 'vhv.allow = "TRUE" ' >> /etc/vmware/config
In my example the config file is called Hyper-V.vmx. Type the following commands:
# echo 'monitor.virtual_exec = "hardware" ' >> Hyper-V.vmx
# echo 'hypervisor.cpuid.v0 = "FALSE" ' >> Hyper-V.vmx
5. Now back in the VM settings > Options > CPU/MMU Virtualization make sure you have the option to pass the Intel EPT feature.
6. Now in the Options area > CPUID Mask click on Advanced
7. Add the following CPU mask Level ECX: ---- ---- ---- ---- ---- ---- --H- ----
8. Now Install Hyper-V or Windows 2008 R2 and enable the Hyper-V role.
9. You are ready to roll.
Gotchas/Tips
Here are a few tips from Ricky to avoid any of the stopping points along the way:
- On my system part way through install of Microsoft Hyper-V the OS requires a reboot. When you do this after Hyper-V has been installed it blue screens...DON’T PANIC because it doesn’t blue screen while actually using Hyper-V
- With both my server and laptop I had no way of telling if my systems had Intel EPT it was a case of seeing if VMware passed Intel EPT without complaining and if Hyper-V spotted it. The give a way for me was when I’d tried VMware Workstation first and it worked straight off. I’ve read a million and 1 things about this subject, but my gut feeling is if you look for Nehalem or Core i7 and a motherboard that supports Intel VT. I think that is a safe bet. I read you need Intel VT –x2 which I don’t have (I don’t think) so that was misleading...If I can narrow the field of information I will update this post.
- Remember nesting a hypervisor means it’s going to run very, very slow...however installing the nested hypervisor in a datastore that is on SSD disks helps big time.
- The 2 blogs linked above presented 2 methods for creating the VM using version 4/7 hardware or version 8 hardware. I first went with version 8 hardware and no joy at all. All I got was a blank black screen. I actually tried a combination of the tweaks in both methods and that is what worked for me.
- The port group that the nested Hyper-V machine resides on should be set to Promiscuous Mode: Accept
- In one of the blogs there was a note suggesting making the entries manually in the config files (instead of using the GUI) was more stable. I found this too, so hence why I changed the config files in a shell session using putty.

Sign In
English
Deutsch
Français
Русский
Italiano
Español
Nederlands
中文
日本
Český
Polski
Türkçe









about 5 months ago
I recorded a video to show you the power of doing such acts:
about 5 months ago
Hi,
Amazing detailed instructions. I am going to try both during this weekend and see how it goes. Definitely this kind of instructions are very valuable for people who like to try out in home environment. Thanks for sharing….
about 5 months ago
How to configure Nested 64 bit VM in Win 7 64 os>>VMworkstation 8>>Esxi 5>>64 bit esxi 5??
about 5 months ago
A little tip… when editing the config file make sure you use the standard quote symbols ” as some fonts skew the quotes symbol to ” …
” is not the same as “
about 5 months ago
If you are running a Sandy Bridge CPU and testing this on RTM Server 2008 R2 – you may need to apply the following hotfix
this resolves the ” could not initialize. (Virtual machine ID )” errors.
about 5 months ago
Really a great article i was researching in such issue with my manager and he said you cant do so u must put hyper-v on a physical device That really great and shows me how great vmware is .
about 5 months ago
Can we doing the same thing with Citrix Xen Server 5.5 by chance?
about 5 months ago
@Stefan: As far as I know – no.
about 4 months ago
Well done Ricky great work!!
about 4 months ago
Hi, I have a Dell Poweredge 2900 with ESXi 5.0 installed, followed your instructions but doesn’t work – get the usual error when trying to select the Hyper-V role.
I have the X5355 processor which is v1 of Intel VT-x and doesn’t have EPT which I think is required although your post above differs? Can you confirm which processor you have?
EPT was added to the 5500 series processor. I might rebuild the box and try Workstation 8.0 to verify if I can get the time.
Thanks,
David
Thanks,
David
about 4 months ago
Update:
As my machines processor doesn’t have EPT, I kept to your instructions but at point 5 I went to Options > CPU/MMU Virtualization and chose the 3rd option to use software for MMU and lo and behold I was able to install the Hyper-V role but not using the 4th option.
David
about 4 months ago
Hi David I just wanted to comment on your feedback.
In your first post you say I suggested I inferred that you don’t need Intel EPT, this was not my point. I was just saying I had no way of finding out whether my systems had this feature. Clearly they did otherwise I would not have been able to pass this feature.
In your second post I found the same result however this would not work if you want to boot/install a nested VM say Windows 2008 x64 inside the nested Hyper-V VM.
Ricky
about 4 months ago
Hi Stefan Nguyen
My colleauge was testing this with Xen at the same time as me and had better results than trying to make Hyper-V work. This was before my post though.
about 4 months ago
Excellent post, i am able to host 2 esxi 5 and deployed 4 VMs (x86 and x64) on both the VMs with iSCSI (openfiler).
My system spec:
i7 2720qm
8gm Ram
1tb HDD
Thanks again!
Lakshman
about 4 months ago
Hi Ricky.
I installed Hyper-V role on Server 2008 R2 SP1 virual machine (on ESXi 5.0).
But after create a virtual machine on hyper-v, it cannot be started.
In device manager, it shows “Virtual Machine Bus” and ” Virtualization Infrastructure Driver” with yellow warning, and message “windows cannot load the device driver for this hardware” in properties.
How to fix this error.
Thanks in advance
//And sorry for my bad english
about 4 months ago
Hi hvtruong
Did you make sure you edited the vmx file to include hypervisor.cpuid.v0 = “FALSE” ? The Hyper-V role can be enabled without this line however you won’t be able power up VMs without it.
Also it might be worth looking at the hotfix Chris Dearden mentioned.
about 4 months ago
Hi Ricky.
I’ve added this parameter to vmx file. After that I reconfigured port group to Promiscuous Mode: Accept, and now hyper-v works correctly.
Thank you very much.
about 4 months ago
Please take a look at this document:
If this doesn’t cover all of the configuration issues for guest hypervisors under ESXi 5.0 or Workstation 8.0, please let me know what’s missing.
BTW, XenServer actually works pretty well as a guest hypervisor.
about 4 months ago
Hi Ricky
Great post! Thank you !
Do you know if you can do this in Fusion 4? I was looking for the VT setting in Fusion but can’t seem to locate it.
Thanks!
David
about 4 months ago
Hi Dave.
Me and @vinf_net worked it out on Fusion today. You need vhv.enable = TRUE and hypervisor.cpuid.v0 = FALSE < hope this helps
about 4 months ago
To ensure EPT is enabled on your 2k8 R2 VM check this:
By browsing the datastore The 2k8 R2 VMs is on in the vCenter datastore browser, copy the vmware.log file to your desktop and open w/ Notepad++..
Or just SSH in to the host and look using vi.
(Per jmattson @ VMware)
If the VM is using EPT, you will see:
HV Settings: virtual exec = ‘hardware’; virtual mmu = ‘hardware’
More info:
about 4 months ago
? Do we want to install the VMware tools on the ‘root’ HyperV VM. I saw a “You must install the tools on a VM”.
But perhaps they would be installed before ‘hacking’ on the vCPU/VMX.
Or perhaps its just a bad idea?
about 4 months ago
To easily test if your cpu can use slat support :
about 4 months ago
Hi Jonathan Reinigner
I don’t install the complete VMware tools but rather just the Video and Mouse driver. That’s it. I do it just for smoother interaction with the VM. So no not a bad idea!
about 4 months ago
Hi John Thanks for the link to test CPU support. This is great.
about 4 months ago
Hello Ricky, Great post.
Does your laptop support EPT? If so would you mind sharing the brand/model. This is exactly what I’m looking for.
Thx
about 3 months ago
Ricky i think you should try this link
about 3 months ago
Thanks Ricky! This really helped me out!
about 3 months ago
Can you provide hardware specs and price of the pc.
about 3 months ago
Hey, Hyper-v Install but when I go to power on my first VM I get a Failed to create partition: unspecified error. I have tried to create the VM on the local drive and on the iSCSI SAN (using MS iSCSI emulator) This a simple test of an XP 32 bit VM. Doesn’t seem to care if it is a local disk or on the emulated SAN. Any ideas what I am missing something simple maybe?
about 3 months ago
Dear pic.micro23 may laptop is a Dell M4500
about 3 months ago
Dear Jenny my post is not about install Hyper-V in general but running it inside a VM.
about 3 months ago
Dear Carlos my laptop is a Dell M4500 but details about my lab system can be found here >
about 3 months ago
Dear William Gismore, me thinks either you missed a step in my instructions or your system doesn’t support EPT.
about 3 months ago
Thanks, I will Machine is a new EliteBook 8560w with i7 with 16GB of RAM, and Intel-VT enable in the BIOS. Also, nice and fast with 250GB SSD working drive form VMs. I will re-do and go through all the steps. Does it seem to matter in VMWare Workstation 8 if you use thin, or does it help if it is a THICK disk? Build first one thin provisioned as default.??? I will post here once I figure it all out.
about 3 months ago
OK! Joy! The Hotfix listed by Chris Dearden fixed it! Sandy Bridge problem with RTM Windows Server 2008 R2, Note: You can also just re-install to Server 2008 R2 SP1 based on the KB that comes with the hotfix. But, I haven’t tried that yet. But, yikes this is fantastic!! I have been doing this with vSphere for a while now, now I can go both ways!! Very cool! Thanks everyone.
about 3 months ago
Hello
I followed the steps and when I boot the VM says, “Intel VT-x/EPT virtualized platform support for Intel Requires VT-x/EPT. Continue Without virtualized Intel VT-x/EPT?”
I do not work after the Hyper-v.
My processor is the Intel E8400 that supports VT-X
PLEASE HELP
about 3 months ago
hi,
plz guide me, for Hyper-v rule configuration, my Physical machine run on win7 32 Bit( i install Server2008R2 64bit on VMware Workstation 8.0).i want to knw that, Hyper-v cannot install if the (Pysical machine)32 Bit operating system running?
about 3 months ago
Hello
I followed the steps and when I boot the VM says, “Intel VT-x/EPT virtualized platform support for Intel Requires VT-x/EPT. Continue Without virtualized Intel VT-x/EPT?”
I do not work after the Hyper-v.
My processor is the Intel E8400 that supports VT-X
PLEASE HELP
about 2 months ago
Anushka, hi.
Intel “VT-x/EPT” is not the same as “Intel VT-x”. The first one is newer and is supported by the latest Intel CPU families only.
So your E8400 has only “VT-x” technology.
So don’t mention the “Virtualize Intel VT-x/EPT or AMD-V RVI” checkbox.
about 2 months ago
i do same step but when try to install Hyper-v rule”your processor cannot support hyper-v feature” but i run hvdetector tool and verify that my procesoor compatible with hardware-assisted virtualization.but unfortunately i cannot install Hyper-v rule.plz help me.
about 2 months ago
Thanks Ricky, this is gold. Runs like a dream (for a test setup) on i7, 16GB RAM, SSD notebook.
Thanks for your efforts.
about 2 months ago
Hello
I think I’ve seen the problem. My processor supports VT-x but not VT-x/EPT ………
That new processor supports VT-x/EPT? I want to upgrade my pc but do not know what to buy ..
thanks
please help me in omoyanogo@gmail.com
about 1 month ago
Is it possible on ESX 4, if not – why?
Could You explain?
about 1 month ago
this does not work… idk what else to do, i have tried all the options and all of the entries are written to the correct places? after i made all the changes i installed server 2008 r2 and tried to enable the hyper v role, but it always gives me the error message about my cpu not supporting virtualization???
my cpu is a phenom x6 1100t, which supports the amd rvi feature (ept equivalent). please help?
about 1 month ago
never mind i got it to work by adding the extra cpuid lines from the link that Jonathan provided, thanks mate!
about 1 month ago
Ok, I have AMD 1075 X6 processor, and I am trying to use VMware Player 4.0.1 build 528992 which I believe is the same engine as Windows 8 uses, since VMware Workstation 8 has VMware Player under the hood? (It is installed with VMware Workstation 8). I have the VMX files configured and the vmware log for my hyper-v VM looks right…
2012-01-20T07:37:08.976-08:00| vmx| I120: MONITOR MODE: allowed modes : BT HV HWMMU
2012-01-20T07:37:08.976-08:00| vmx| I120: MONITOR MODE: user requested modes : BT HV HWMMU
2012-01-20T07:37:08.976-08:00| vmx| I120: MONITOR MODE: guestOS preferred modes: HWMMU HV BT
2012-01-20T07:37:08.976-08:00| vmx| I120: MONITOR MODE: filtered list : HWMMU HV BT
2012-01-20T07:37:08.976-08:00| vmx| I120: HV Settings: virtual exec = ‘hardware’; virtual mmu = ‘hardware’
2012-01-20T07:37:08.976-08:00| vmx| I120: SVM Revision: 1
2012-01-20T07:37:08.976-08:00| vmx| I120: ASIDs Supported: 64
2012-01-20T07:37:08.976-08:00| vmx| I120: Nested Paging: yes
2012-01-20T07:37:08.976-08:00| vmx| I120: LBR Virtualization: yes
2012-01-20T07:37:08.976-08:00| vmx| I120: SVM Lock: yes
2012-01-20T07:37:08.976-08:00| vmx| I120: NRIP Save: yes
2012-01-20T07:37:08.976-08:00| vmx| I120: TSC Rate MSR: no
2012-01-20T07:37:08.976-08:00| vmx| I120: VMCB Clean Bits: no
2012-01-20T07:37:08.976-08:00| vmx| I120: Flush by ASID: no
2012-01-20T07:37:08.976-08:00| vmx| I120: Decode Assists: no
2012-01-20T07:37:08.976-08:00| vmx| I120: Pause Filter: yes
2012-01-20T07:37:08.976-08:00| vmx| I120: Pause Filter Threshold: no
But Windows 2008 R2 SP1 fully patched with hyper-v role enabled fails on reboot with to errors in the System Log… saying that hvboot.sys and vmbus.sys failed to load. Any ideas?
about 1 month ago
I need some help here. I have followed the exact same method, Enabled the Virtualize Intel VT-x/EPT, edited the .vmx file and tried different combination of 2-1 / 1-2 CPU core, have sufficient RAM of 3GB and 60GB of HDD space on my HyperV Windows 2008 R2 server.
Using VMware Workstation 8
Have Compatible hardware CPU Intel Core i2500 not the K one and a motherboard MSI z68A-G43 (G3).
Have enabled Intel Virtualisation Technology and Intel VT- D tech in BIOS.
For some reason I just cannot get the VM to start up on hyper-v server.
‘New Virtual Machine’ could not initialize.
‘New Virtual Machine’ could not initialize. (Virtual machine ID 7DF06815-6A2C-424E-8E83-046264ACC541)
Read more:
about 4 weeks ago
Is it OK to add this line (echo ‘vhv.allow = “TRUE”‘ >> /etc/vmware/config) to ESXi 5 production servers? Is there any stability issues? I have an ESXi 5 lab setup in an ESXi 5 host ESXi 5 production envirnment. I want to run nested 64bit as well as nested VM’s using FT for training purposes. I added the replay statements on the nested VM’s running on the virtualized ESXi server but Host configured for FT states “Host CPU does not support virtualization which is required for replay. When I enable FT on the nested VM I get this error message “A general system error occurred: Source detected that destination failed to resume. I am thinking I need to add the (echo ‘vhv.allow = “TRUE”‘ >> /etc/vmware/config) to make this work? Anyone have an idea?
about 5 days ago
You don’t need to add the monitor.virtualexec = “hardware” .
That is done when you select the bottom radio button in the CPU/MMU Virtualization settings. (it will give you an error that the config is invalid since you now have 2 monitor.virtualexec lines in the vmx).
I have tried every one of those radio button settings with no luck.
I am doing 2008 R2 SP1 Full install and Hyperv 2008 R2 SP1.
The only thing I hadn’t tried before was the CPU mask.
about 5 days ago
FYI, I have an Intel 2nd Gen i5 2500k processor/MSI Z68A-G45 (G3) motherboard and esxi 5 installed and have both XenServer 6 installed (performance is good) and esxi 5 installed (not as good) as VMs.
For both Xen and esxi 5 I just picked OS option esxi 5 and no problems (other than needing to turn on promiscuous mode on the VM switch and reboot, URGH!)
Funny that the Xenserver VM guest transfers files from a CIFS share about as fast as the host ESXi does from a DVD. ESXi guest I/O is slooowwww when installing Windows VM even with the iso copied to the local datastore.
about 5 days ago
I think I have it figured out, at least in my case in ESXi 5:
Workstation 08 VM
2008 R2 X64 guest OS
Add hypervisor.cpuid.v0 = “FALSE” to .vmx (worked from VM properties panel)
Add the NX bit CPUID mask: ———————-H—– (also worked from VM properties panel)
You could add that via the vmx file also as cpuid.0.ecx = “—————H—–” (26 dashes H 5 dashes)
CPU/MMU set to 2nd radio button from bottom:
Use Intel VT-x/AMD-V for instruction set virtualization and software for MMU virtualization (shows up as monitor.virtual_mmu = “software” and monitor.virtual_exec = “hardware” in the vmx)
When I used the bottom radio button (hardware/hardware) it caused blue screens at shutdown. Automatic caused blue screen at boot.
Installed Hyper-V and VM in HyperV, performance is a bit slow.
vXenServer is the winner at being a guest Hypervisor I think. I can’t tell that it is a VM at all… (has the same bugs it does on hardware of course ; ) )