Windows 8 has a nice feature called Client Hyper-V. This allows you to run virtual machines on Windows 8 just like running virtual machines on Windows Server Hyper-V. Client Hyper-V has the same functionality as VMware Workstation however Client Hyper-V is a free feature of a Windows 8 Pro edition licensed device.
This posting has a short overview of running a lab on Windows client. The conclusion is that VMware Workstation beats Client Hyper-V for nested configurations.
Windows 8 Client Hyper-V allows software developers to test their code on virtual machines they manage. It can also be used by IT Pro’s to test patches, new software or to obtain new skills.
Wouldn’t it be nice to use Windows 8 Client Hyper-V to create a virtual machine running Windows Server 2012, enable Hyper-V on that VM and run nested VM’s on that VM?
Unfortunately that is not possible when using Windows 8 Client Hyper-V. When the Hyper-V role is enabled in the guest VM you will see an error. There is a way to deploy a VM with Hyper-V role enabled using the method described at the bottom of this post. However it does not allow to start nested VM’s on the Windows Server which is a VM itself!
Bart van Keyenberg wrote a posting on how to enable Hyper-V role in a nested VM. His website is offline but the posting is still in the Google cache.
Romeo Mlinar also wrote a blogposting about this topic titled Hyper-V role inside Hyper-V virtual machine He writes:
It is possible to install Hyper-V role inside Hyper-V virtual machine! But (always that BUT) you can’t run virtual machine on virtualized Hyper-V host. You can install Hyper-V role inside Hyper-V virtual machine through PowerShell or Virtual Machine Manager. Of course, this is workaround and isn’t supported! In this blog post I’ll describe how to do that through PowerShell.
What are the alternatives?
Running nested VMware ESX on Windows 8 Client Hyper-V
With quite a bit of work it seems to be possible to run virtual machines on a ESXi virtual machine running on Windows 8 Client Hyper-V. See this posting of Kees Baggerman. Kees describes that he initially tried VMware Workstation but this was slow.
Running nested VMware ESX on VMware Workstation
It is no problem at all to run ESX as a virtual machine using VMware Workstation. It is even possible to run 64 bits guests in a nested ESXi VM. Many posts are available which describe how. See this example.
Running nested Microsoft Hyper-V on VMware Workstation
It is also possible to run Windows Server 2012 with Hyper-V role enabled on VMware workstation. running VM’s in that nested Hyper-V VM is possible. You need to make a few adjustments as described in this post How to run Hyper-V nested in VMware Workstation by Timothy Warner
Running nested Microsoft Hyper-V on VMware vSphere 5.1
It is possible to run Hyper-V servers with 64-bits guests on top on vSphere 5.1. You have to adust a few files. Instructions in this post.
Here is another post explaining how to run Hyper-V enabled VM’s on vSphere 5.5 and vSphere 6.0
Running nested Windows Server 2012 R2 Hyper-V on vSphere 5.5
This blogpost describes how to do that. It is actually very simple. Instead of doing a SSH to the host you can easily download the .vmx file to your client, edit the .vmx and upload it again using the datastore browser of the vSphere Client.
Vladan Seget wrote a free ebook describing how to setup a vSphere lab on a single computer. Download the e-book here.
VMware does not support running nested ESXi/ESX servers in production environments. This includes, but is not limited to:
- VMware ESXi/ESX running in VMware Workstation or VMware Fusion
- VMware ESXi/ESX running in VMware ESXi/ESX
- VMware ESXi/ESX running in other third-party hypervisor solutions
Issues running ESXi/ESX in a nested configuration fall outside of VMware’s Support and Service Level Agreements. If you experience issues, VMware is under no obligation to acknowledge or investigate immediately or to provide a resolution. However, VMware is interested in obtaining an easily reproducible scenario for our engineers to investigate through discussions in our VMware communities Nested Virtualization forum.
The procedure to install Hyper-V on a Windows Server 2012 VM running on Windows 8 Client Hyper-V is listed below :
However there is a way to avoid this error message and run Hyper-V in a virtual machine. The solution to this issue is the Windows assessment and deployment kit. By using the dism tool you can enable the Hyper-V feature in the installation image of Windows 2012, so that once you install WIndows 2012 Hyper-V is also immediately installed.
The precise steps to enable Hyper-V in a virtual machine running client Hyper-V are:
- Download and install the Windows assessment and deployment kit for Windows 8 http://www.microsoft.com/en-us/download/details.aspx?id=30652
- Mount the Windows 2012 installation DVD to your technician computer and copy the contents of this DVD to C:DeploymentWindowssetup
- Open a command prompt and execute the command
dism /get-ImageInfo /ImageFile:C:DeploymentWindowssetupsourcesinstall.wim
Determine which index number your preferred installation has
dism /Mount-Image /ImageFile:C:DeploymentWindowssetupsourcesinstall.wim /Index:4 /MountDir:C:Deploymentmount
- Check the features that can be enabled by using the command
dism /Image:C:Deploymentmount /Get-features /Format:List
- Enable the Hyper-V feature
dism /Image:C:Deploymentmount /Enable-Feature:Microsoft-Hyper-V
- Commit the changes and unmount the image
dism unmount-image /mountdir:C:Deploymentmount /commit
You now have the choice to put the content of C:DeploymentWIndowssetup on a new DVD and use this DVD as installation DVD or by installing WIndows 2012 over the network by making use of a WinPe disc. I chose the second option
Create a WinPe boot DVDMount the created WinPe disk to your WIndows 8 client Hyper-V VM where you will install Windows 2012 and Hyper-V on. Boot the VM from this WinPe disk
- On the technician computer open the Windows 8 assessment and deployment kit command-line and execute
Copype amd64 C:Deployment
Makewinpemedia /iso C:Deployment C:DeploymentMyOwnPe.iso
net use R: technician_computer_nameWindowssetup
Install Windows 2012 by following the installation instructions
Once Windows 2012 is installed Hyper-V is also enabled