Vmware And Hyper-v On Same Host

Vmware And Hyper-v On Same Host Average ratng: 4,3/5 4666 votes
Contents of this article

Sep 14, 2014  I have a lot of VM's on VMware today and want to test Hyper-V, but I have only one server. Is it possible to run VMware Workstation and Hyper-V on the same computer at the same time? I tried this and it does work - but it is definitely not supported and may cause your computer to crash eventually. Cheers, Ben I don't think you can, and if it can.

  • Set up VMware Workstation
  • Installing the Hyper-V Server Role
  • Testing Nested Virtualization
  • Conclusion

Historically, we systems administrators have not been able to run a virtual machine (VM) inside of a virtual machine. However, the release of VMware Workstation 9 finally gives us the ability to perform nested virtualization.

Our goal here is to install and run the Hyper-V server role in an already virtualized instance of Windows Server 2012. We’ll then demonstrate that nested virtualization works by deploying a virtual machine (VMs) inside the “outer” VM.

Set up VMware Workstation ^

  1. Open VMware Workstation and create a new VM by using the Windows Server 2012 template. We will need to make two tweaks to the VM configuration in order to (fully) support Hyper-V Server:
  2. In the Virtual Machine Settings dialog box, enable the Virtualization engine options as shown in the following figure.
  3. Open the VM’s .VDX configuration file from the VM’s working directory. You can find the working directory by navigating to the Options page in the Virtual Machine Settings dialog box and checking the Working directory field.

Add the following three new entries to the .VDX configuration file to match the following screenshot. VMware configuration files can be opened with any text editor. I’ve given you a picture of my configuration file in the following figure.

  • hypervisor.cpuid.v0 = “FALSE”: This option tricks the Windows Server 2012 into “thinking” it is not running in a virtualized instance
  • mce.enable = “TRUE”: This option enables Machine Check Exception (MCE), which enable the Windows Server 2012 VM to report CPU hardware issues
  • vhv.enable = “TRUE”: This option enables nested virtualization
Same

You should check the Virtually Ghetto blog for a neat post that outlines a whole bunch of undocumented .VDX configuration parameters.

Tweaking the VM configuration file

Your .VDX file may already have an entry for vhv.enable. If so, then please ensure that you don’t have duplicate entries in the configuration file or your VM will fail to boot and produce the “Dictionary Problem” error. I’ve shown that error in the following screenshot.

Dictionary problem - A duplicate entry in your VDX file produces this error.

If you try to install the Hyper-V role in virtualized Windows Server 2012 without enabling nested virtualization, then Windows presents the “hypervisor is already running” error message shown in the following screen capture:

Hyper-V cannot be installed: A hypervisor is already running.

Installing the Hyper-V Server Role ^

Boot up the Windows Server 2012 VM and install the Hyper-V server role. We can do this either graphically via the Server Manager, or by using Windows PowerShell. For instance, we can open an elevated PowerShell prompt and submit the following command to install Hyper-V with its associated management tools.

PS:> Install-WindowsFeature –Name Hyper-V –Restart –IncludeAllSubFeature –IncludeManagementTools

After the “outer” VM restarts, we can fire up the Hyper-V Manager tool and test out the nested virtualization.

Testing Nested Virtualization ^

Open Hyper-V Manager from your Windows Server 2012 VM and click New > Virtual Machine.

Creating a new VM in a Windows Server 2012 Hyper-V VM

The rest of the process should be familiar to any Windows administrator who has used Hyper-V. The following screenshot should serve as proof that we can perform nested virtualization with VMware Workstation 9.

In the screenshot I’m installing a Windows 8 Hyper-V VM inside of a Windows Server 2012 VMware VM, which in turn runs on my Windows 7 hardware host.

Nested virtualization with VMware Workstation: A virtual machine running inside of a virtual machine inside of a hardware host.Hyper-v vs vmware 6

Conclusion ^

Because VMware Workstation is a desktop application and not an enterprise server product, we certainly aren’t looking to deploy production-quality Hyper-V server boxes from this platform.

However, the ability to perform nested virtualization makes it much easier for administrators and developers to build, test, and rebuild configurations with the least amount of administrative effort.

Win the monthly 4sysops member prize for IT pros

4+

Related Posts

Troubleshoot an unresponsive VMware vSphere VM
Install Docker on Windows Server 2019

Use the free VMware vCenter Converter Standalone (https://my.vmware.com/web/vmware/evalcenter?p=converter, registration required) to make a copy of your running VMware VM.

Vmware Hyper V Not Enabled

Use Microsoft Virtual Machine Converter 3.0 (https://www.microsoft.com/en-us/download/details.aspx?id=42497), 5nine V2V Easy Converter v6.4 (http://www.5nine.com/vmware-hyper-v-v2v-conversion-free.aspx) or some other utility (there are several) to convert your new VMware VM clone to Hyper-V.

Vmware And Hyper-v On Same Host Software

Remove VMware Tools, as required, install the Microsoft equivalent, and you should be good to go.