Running nested Windows Server 2012 Hyper-V on Windows 8 Client Hyper-V & alternatives

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. 

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.

More information
Vladan Seget wrote a free ebook describing how to setup a vSphere lab on a single computer. Download the e-book here. 

VMware support

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:

  1. Download and install the Windows assessment and deployment kit for Windows 8 http://www.microsoft.com/en-us/download/details.aspx?id=30652
  2. Mount the Windows 2012 installation DVD to your technician computer and copy the contents of this DVD to C:DeploymentWindowssetup
  3. Open a command prompt and execute the command
    dism /get-ImageInfo /ImageFile:C:DeploymentWindowssetupsourcesinstall.wim

    Determine which index number your preferred installation has

  4. Execute
    dism /Mount-Image /ImageFile:C:DeploymentWindowssetupsourcesinstall.wim /Index:4 /MountDir:C:Deploymentmount
  5. Check the features that can be enabled by using the command
    dism /Image:C:Deploymentmount /Get-features /Format:List
  6. Enable the Hyper-V feature
    dism /Image:C:Deploymentmount /Enable-Feature:Microsoft-Hyper-V
  7. 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

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

    1. On the technician computer open the Windows 8 assessment and deployment kit command-line and execute
      Copype amd64 C:Deployment
    2. Makewinpemedia /iso C:Deployment C:DeploymentMyOwnPe.iso
  2. net use R: \technician_computer_nameWindowssetup
  3. setup.exe

  4. Install Windows 2012 by following the installation instructions

  5. Once Windows 2012 is installed Hyper-V is also enabled

Advertisements

About Marcel van den Berg
I am a technical consultant with a strong focus on server virtualization, desktop virtualization, cloud computing and business continuity/disaster recovery.

One Response to Running nested Windows Server 2012 Hyper-V on Windows 8 Client Hyper-V & alternatives

  1. kbaggerman says:

    If you really want to get going with it you could enable data dedup in Windows 8 too (not really supported but it could be usefull): http://weikingteh.wordpress.com/2013/01/15/how-to-enable-data-deduplication-in-windows-8/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: