When working with a Hyper-V host or Hyper-V cluster, you may have access to other hypervisors, such as VMware vSphere. Hyper-V can easily be nested inside a VMware vSphere virtual machine, allowing you to play around with Hyper-V and clustered Hyper-V environments. Let’s consider installing Hyper-V in VMware vSphere for beginners and see how this is accomplished step-by-step.

What is VMware vSphere?

VMware vSphere is the predominant hypervisor used in the enterprise today. According to VMware, some 70+ million virtual machines are running in vSphere worldwide. It provides a robust virtualization platform that gives businesses the features and capabilities needed for enterprise virtualization.

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

Why install Hyper-V inside VMware vSphere?

You may wonder why you would want to install Hyper-V inside a VMware vSphere virtual machine. Many reasons come to mind with Hyper-V in vSphere. These can include the following:

  • You currently have access to a VMware vSphere environment
  • You already have VMware vSphere installed on your physical host
  • You know and understand VMware vSphere better than Hyper-V
  • You want to leverage the technologies in VMware, such as snapshots, to learn Hyper-V

Generally, one of the main reasons to install Hyper-V in a VMware vSphere virtual machine is that you already have a lab environment installed with VMware vSphere readily available. Therefore, installing Hyper-V in a guest virtual machine is the easiest way to create lab environments for learning Hyper-V.

Considerations for Nested Virtualization

There are a couple of considerations to make for Nested Hyper-V virtual machines running inside VMware vSphere. These include the following:

Download Banner
  • Exposing hardware-assisted virtualization from the physical CPU to the guest virtual machines
  • Enabling promiscuous mode on the virtual switch or MAC learning

Exposing hardware-assisted virtualization

We have already covered that Hyper-V nested virtualization requires a compatible CPU with built-in hardware virtualization instructions. VMware vSphere has the same requirements for nested virtualization. This requirement is satisfied with the following CPU technologies:

  • Intel processor with VT-x and EPT technology
  • AMD EPYC/Ryzen processor or later

Enabling Promiscuous mode or MAC learning

In addition to the considerations for your virtual CPUs that will have the hardware virtualization capabilities exposed to the guest operating system, virtual networking is also a consideration. Since the underlying Hyper-V network will be nested in the physical ESXi host, the virtual switch to which the Hyper-V VM is connected must have promiscuous mode enabled.

However, as of VMware vSphere 6.7, VMware has incorporated a VMware Fling that solves the underlying issue that requires promiscuous mode. The new functionality is incorporated into distributed virtual switches and provides additional capabilities to assist with nested virtualization. It supports learning multiple source MAC addresses on virtual network interface cards and filters packets from egressing the wrong port based on the destination MAC lookup.

Suppose you need Hyper-V virtual machines to connect to different VLANs. In that case, you must tag the VLAN traffic on the physical ESXi host and attach the nested guest virtual machine to those parent vSwitches on the physical ESXi host.

Configuring nested Hyper-V in VMware vSphere

Let’s look at specific settings that need to be enabled for nested Hyper-V installed in your VMware vSphere environment. First, when you create your nested Hyper-V virtual machine, you must ensure you have correctly configured the virtual CPUs before powering on the VM.

As mentioned, we need to expose the physical CPU virtualization capabilities to the guest virtual machine. In VMware vSphere, this is a simple checkbox. First, in the vSphere Client, edit the settings of your virtual machine. Then, expand the CPU, and you will see the setting Expose hardware-assisted virtualization to the guest OS.

Installing Hyper-V in VMware vSphere

Enabling the hardware-assisted virtualization in VMware vSphere

Make sure the vSphere virtual switch with the Hyper-V virtual machine connected has the required security changes on the virtual switch to allow nested virtual machines running in the nested Hyper-V environment to communicate.

Below is an example of enabling promiscuous mode for a distributed switch port group.

Installing Hyper-V in VMware vSphere

Enabling promiscuous mode on a distributed switch in VMware vSphere

Alternatively, and preferably, if you are running vSphere 6.7, you no longer need to enable promiscuous mode on your virtual switch. If you are running a distributed virtual switch, you have the new MAC learning configuration you can enable, which learns multiple source MAC addresses and can connect traffic accordingly.

Installing Hyper-V in VMware vSphere

Enabling the MAC learning functionality on a vSphere Distributed virtual switch

With either promiscuous mode or MAC learning enabled, nested virtual machines running in the nested Hyper-V environment can connect to the external network.

Nested Hyper-V in VMware vSphere FAQs

Can you run Hyper-V inside VMware vSphere?

Nested virtualization is possible in VMware vSphere with a few configuration changes, including CPU and network configuration.
What CPU settings are needed for nested virtualization in VMware vSphere?
You must enable the setting for your virtual CPU, Expose hardware-assisted virtualization to the guest OS.
What network configuration is required for nested Hyper-V VMs?
For successful connectivity with nested Hyper-V environments in VMware vSphere, you need to enable promiscuous mode in vSphere 6.0-6.5 or MAC learning in vSphere 6.7 and higher with distributed virtual switches.

Wrapping up

Running Hyper-V in VMware vSphere is a great way to take advantage of your existing VMware vSphere infrastructure and still have the ability to learn and work with Hyper-V hosts and clusters. Using the settings mentioned, you can easily expose hardware virtualization to your nested Hyper-V virtual machine and configure the virtual switches so that nested Hyper-V VMs can connect to the external network.

Read More:

Beginners’ Guide for Microsoft Hyper-V: Hyperconverged Hyper-V – Part-58

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

Rate this post