How to run Hyper-V as a VM in VMware ESXi
This article explains the process of nesting Hyper-V virtualization solution inside VMware ESXi 5. It will be useful for those who want to try out the features of Hyper-V in a test environment
ESXi prereq:
Before we start, we need to ensure that ESXi 5 allows nested Hypervisors to be installed. For this you have to edit the /etc/vmware/config file . Steps given below
- Enable SSH through the security profile in the vSphere Client
- SSH to the ESXi system using putty
- Execute the following command, which updates the config file to allow nested hypervisors
echo 'vhv.allow = "TRUE" ' >> /etc/vmware/config
VM preparation:
Now that the ESXi host is configured to allow for nested VMs,create a new virtual machine using version 8 hardware, 4GB (or as much as you can spare), 2 x vCPUs, 2 or more vNICs and a 100GB virtual disk.Before booting the VM, we need to modify the virtual machine config file .vmx
- Access the VM through vSphere client. Go to virtual machine >edit settings>options tab>general>configuration parameters
- You can add a new row here and include the following parameters
HyperV.jpg
Or as an alternative,you can edit the vmx file of the VM through SSH and append the following
echo 'monitor.virtual_exec = "hardware" ' >> Hyper-V.vmx
echo 'hypervisor.cpuid.v0 = "FALSE" ' >> Hyper-V.vmx
Go to VM settings > Options > CPU/MMU Virtualization make sure you have the option to pass the Intel EPT feature.
Now in the Options area > CPUID Mask click on Advanced
Add the following CPU mask Level ECX: ---- ---- ---- ---- ---- ---- --H- ----
You can now install Windows 2008 R2 and enable Hyper-V
Notes:
- Nesting a hypervisor could lead to slow performance
- The port group that the nested Hyper-V machine resides on should be set to Promiscuous Mode: Accept
- Part way through install of Microsoft Hyper-V the OS requires a reboot. When you do this after Hyper-V has been installed it blue screens. However it doesn’t blue screen while actually using Hyper-V. So don’t worry if you get the blue screen
- The better option to update the config file is to enter the values manually using putty rather than using the GUI
ESXi prereq:
Before we start, we need to ensure that ESXi 5 allows nested Hypervisors to be installed. For this you have to edit the /etc/vmware/config file . Steps given below
- Enable SSH through the security profile in the vSphere Client
- SSH to the ESXi system using putty
- Execute the following command, which updates the config file to allow nested hypervisors
echo 'vhv.allow = "TRUE" ' >> /etc/vmware/config
VM preparation:
Now that the ESXi host is configured to allow for nested VMs,create a new virtual machine using version 8 hardware, 4GB (or as much as you can spare), 2 x vCPUs, 2 or more vNICs and a 100GB virtual disk.Before booting the VM, we need to modify the virtual machine config file .vmx
- Access the VM through vSphere client. Go to virtual machine >edit settings>options tab>general>configuration parameters
- You can add a new row here and include the following parameters
HyperV.jpg
Or as an alternative,you can edit the vmx file of the VM through SSH and append the following
echo 'monitor.virtual_exec = "hardware" ' >> Hyper-V.vmx
echo 'hypervisor.cpuid.v0 = "FALSE" ' >> Hyper-V.vmx
Go to VM settings > Options > CPU/MMU Virtualization make sure you have the option to pass the Intel EPT feature.
Now in the Options area > CPUID Mask click on Advanced
Add the following CPU mask Level ECX: ---- ---- ---- ---- ---- ---- --H- ----
You can now install Windows 2008 R2 and enable Hyper-V
Notes:
- Nesting a hypervisor could lead to slow performance
- The port group that the nested Hyper-V machine resides on should be set to Promiscuous Mode: Accept
- Part way through install of Microsoft Hyper-V the OS requires a reboot. When you do this after Hyper-V has been installed it blue screens. However it doesn’t blue screen while actually using Hyper-V. So don’t worry if you get the blue screen
- The better option to update the config file is to enter the values manually using putty rather than using the GUI
Comments
Post a Comment