Deploy a Nested VMware ESXi host in Hyper V
Introduction: Nested VMware virtualization allows you to run VMware ESXi as a Virtual Machine within Hyper-V. This can be a practical solution for those who don’t have access to new hardware or wish to test VMware products on a Windows 10 desktop.
Disclaimer:
- This Nested VMware virtualization process isn’t officially endorsed by VMware or Microsoft.
- While it’s feasible to set up an ESXi environment using Hyper-V, the experience might not be seamless.
Prerequisites:
- Preparation of the ISO:
Before initiating the process, it’s crucial to prepare the ISO by injecting Hyper-V compatible network drivers. Failing to do this will result in an unsuccessful setup, and you won’t be able to connect to your ESXi server. - VMware PowerCLI:
Ensure you have VMware PowerCLI installed, as it’s essential for this procedure.
Step 1 – Prepare the ESXi Hypervisor image for Nested Vmware virtualization
There are two ways that you can prepare the ESXi Hypervisor Image.
Method 1: Using the ESXi Customizer Tool
Download and Save:
- Obtain the ESXi customizer tool and save it to a local directory; for instance,
C:\ESXi
.
Enable Script Execution in PowerShell:
- Launch PowerShell.
- Enter the following command:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Run the Customizer Script:
- Navigate to the directory containing the downloaded script, e.g.,
C:\ESXi
. - Execute the command:
.\ESXi-Customizer-PS-v2.5.1.ps1 -v60 -vft -load net-tulip
(Note: ‘Net Tulip’ refers to Hyper-V compatible network drivers).
- Wait for the process to complete, which might take several minutes.
Retrieve the Customized ISO:
- Navigate to your specified folder (e.g.,
C:\ESXi
). Here, you’ll find the customized ISO image. Use this image to set up your ESXi server in Hyper-V.
Method 2: Alternative Approach (Manual Injection of net-tulip drivers)
Note: This method was tested on a Windows 7 laptop and may not work on Windows 10 or 11.
- Download Necessary Files:
- Install the legacy ESXi Customizer application.
- Download the ESXi Hypervisor from MyVmware. For this example, version 5.1 was used.
- Obtain the Net-tulip drivers (Updated Link Oct 2022) and extract them to your computer.
- Run the ESXi Customizer:
- Execute
ESXi-Customizer.cmd
with administrative privileges. - Choose the ESXi Hypervisor, select the Net-Tulip .vib file, set the working directory, and click ‘Run’.
- Disregard any warning messages by selecting ‘NO’.
- After a few moments, the custom ISO will be generated.
- Execute
Step 2 – Install ESXi on Hyper-V ready for Nested Vmware
Setting Up VMware ESXi as a Virtual Machine in Hyper-V
Prerequisites:
- Ensure Hyper-V is enabled on your Windows 10/11 or Windows Server. If not:
- Use the
Turn Windows Features on or off
from the Control Panel. - Alternatively, use the command:ruby
- Use the
DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
Step-by-Step Procedure:
Setting Up the Virtual Machine:
- Launch
Hyper-V Manager
.
- Right-click and select
New > Virtual Machine
. - Follow the on-screen prompts, ensuring you:
- Name the VM and choose its storage location.
- Select
Generation 1
for the VM generation. - Allocate RAM and ensure Dynamic Memory usage is unticked.
- Skip network connection configuration for now.
- Define the VM size (10GB recommended).
- Choose the VMware ESXi Hypervisor ISO image created earlier.
Configuring VM Settings:
- Right-click on the VM and choose
Settings
. - Allocate the vCPU count.
- Remove any existing Network interfaces.
- Add a
Legacy Network Adapter
(this uses the NET-TULIP driver). - Connect the Legacy Network Adapter to your physical network.
Enabling Nested VMs on Windows:
- Download the PowerShell Script that enables NestedVMs.
- Open PowerShell as an administrator.
- Navigate to the script’s location.
- Run the following commands:
Set-ExecutionPolicy -scope Process -ExecutionPolicy Bypass .\Enabled-NestedVM.ps1 -vmname โYOUR VM NAME"
- Confirm enabling MAC Spoofing when prompted.
Installing ESXi:
- Start the VM.
- During boot, press
TAB
to edit boot options and typeignoreHeadless=TRUE
. - Follow on-screen instructions to install ESXi, selecting the 10GB partition created earlier.
- After installation, disconnect the Virtual CD-DVDROM Drive and reboot.
Configuring ESXi Server:
- Once VMware loads, note the IP address displayed.
- Access ESXi settings using
F2
and log in as ROOT. - Enable the ESXi Shell via
Troubleshooting options
. - Press
ALT + F1
to access the ESXi Shell and log in. - Run the command:
esxcfg-advcfg โset-kernel โTRUEโ ignoredHeadless
- Reboot the server.
Final Configurations:
- Disable the ESXi Shell for security.
- If you can’t ping the ESXi server, add a static route using Command Prompt:
route add -p 192.168.1.240 192.168.1.1
- Access the ESXi host via a web browser.
- Download and install the vSphere Client.
- Open vSphere client and connect to your ESXi server using the root credentials.
Completion: Your ESXi setup in Hyper-V is now complete.
Overview of Setting Up Nested Vmware ESXi in Hyper-V
The procedure outlines the process of running VMware ESXi as a Virtual Machine within Microsoft’s Hyper-V, a feature available on Windows 10/11 and Windows Server. This setup allows users to harness the capabilities of VMware within a Hyper-V environment, which can be particularly useful for testing, development, or specific configuration needs.
Initially, the guide ensures that the Hyper-V feature is activated on the host system. Once that’s confirmed, the user is guided to set up a new virtual machine tailored for ESXi, emphasizing the importance of certain configurations like selecting the right VM generation and integrating the NET-TULIP driver, which ensures network compatibility.
Post VM setup, the procedure delves into the intricacies of enabling nested virtualization on Windows, a crucial step to ensure the ESXi can run smoothly within a VM. The ESXi installation follows, with specific steps to ensure it boots and operates correctly within this nested environment.
Lastly, the guide touches upon final configurations and connectivity, ensuring that the user can seamlessly interact with the ESXi host, culminating in the integration of the vSphere Client for enhanced management capabilities.
In essence, this procedure provides a comprehensive pathway for tech enthusiasts and professionals to run VMware ESXi within a Hyper-V environment, merging the strengths of two powerful virtualization platforms.
Thanks for taking the time to read this article. if you have any questions or feedback, please write in the comment section below.
Apparently this method no longer works.
I tried different VMWare 6.5 images (from GA to recent), but on the Hyper-V 2016-2019 ESXi does not see the legacy network adapter…
I have tried the same image shown in the screen shot, but it doesn’t work. Will you please share the image that you are claiming to work.
Ive updated the procedure with the latest working links to the images
Hi Richard, great guide thanks!
I got up to step 27 without any issues, then the ESXi installer seems to get stuck at ‘Relocating modules and starting up the kernel’
Just wondering if you’ve seen this before?
I most likely missed a step so I’ll have another go later on and see how I go.
Ah, never mind I worked it out.
What I did wrong was when I typed ‘ignoreHeadless=TRUE’ I accidentally replaced the exiting text rather than append to it. Works now!
๐
That’s great news! Have fun using it.
Hi! I followed the steps but network is not working ๐ I cannot ping/reach the ESXI hist from my Windows Server 2016 Hyper-V box ๐ Adding the static route didn’t solve the issue unfortunately, any idea?
This could be many things.
It possible you have missed a step when injecting the Tulip drivers.
Look in the ESX host logs to see if it will give you any clues /var/log/hostd.log
Also try turning off the Windows Firewall to make sure that’s not causing the issue
Hello, personnaly i added a usb to Ethernet network adapter, and plugged another cable, and it worked well, i think this is because we have to use a legacy network adapter in the ESXI VM, because i can ping anothers VM with the classic network adapter in Hyper-V, but not this one ๐
Hello, anyone tried VSphere 8?
Hello, somehow my custom iso with the network drivers only display a PSOD
can you please share your finished iso?
unfortunately, I don’t have my original ISO. I did this work about 3 years ago ๐