Hyper-V is a virtualization platform that allows you to run multiple Operating Systems on a single computer. Hyper-V on Windows Server 2012 has been extremely enhanced in terms of host processing and memory utilization. It now includes support for up to 64 processors and 1 Terabyte of Memory for its guest (Windows Guests Only). Hyper-V 3.0 in Windows Server 2012 has a new virtual hard disk format, VHDX with support of up to 64 terabytes.
Installing Hyper-V is not that difficult, and we will be using a Host installed Windows 2012 instead of using one on VMware Workstation. There are a few workaround to get Hyper-V to install on a VMware Workstation or ESXi Server.
Pre-Installation Steps: (optional)
These steps are required only if you are running Windows Server 2012 on a hypervisor (VMware Workstation, ESX, XenServer or VirtualBox).
If you have like me installed Windows Server 2012 on VMware Workstation you will face this error in when you select the Hyper-V Role from Add Roles and Features Wizard.
Error: Hyper-V cannot be installed: A hypervisor is already running.
To fix this follow the steps below
1) Enable Hardware-Assisted Virtualization (support for Intel VT-x or AMD-V)
- In VMware Workstation: Edit Settings of the VM, Select Processors and you will see the option to enable Intel VT-x/EPT or AMD-V/RVI. Select Virtualize Intel VT-x/EPT or AMD-V/RVI
- In Vmware ESXi: Connect to the ESXi Server via vSphere Client; Edit the settings of the Server 2012 VM. Click on Options and select CPU/MMU Virtualization. Select Use Intel VT-X/AMD-V for instruction set virtualization and Intel EPT/ AMD RVI for MMU virtualization.
- To do this First Turn off your Windows Server 2012 VM.
- If you are using VMware ESXi, you will have to browse the datastore & download the .vmx file.
- If you are using VMware Workstation / any other Desktop based Virtualization you can just browse to the location where you have saved the Virtual Machine.
- Create a backup of the files if required.
- Launch your favorite text editor, I use Notepad++
- Drag and Drop the vmx file on Notepad++ or click on Open & browse to the location of the vmx file.
- Scroll to the end of the file, and add the following lines: hypervisor.cpuid.v0 = "FALSE" mce.enable = "TRUE" Without these options your Hyper-V Role will crash.
- Once done Save it & replace the original file, upload the modified vmx file back to the ESXi datastore.
- Turn on the VM.
Note: Make sure Intel VT /AMD-V and Execute Disable Bit (XD) is enabled in BIOS.
I was unable to get Hyper-V to work on the VM original DC.Wackytechtips.com which we setup in the previous posts. A part of the problem was VMware Tools, So I did the above steps & reinstalled Windows Server 2012, promoted it to a domain Controller and then proceeded with the Hyper-V Role.
Let me know if just uninstalling VMware Tools works for you or not using the comments section below.
Installing Hyper-V Role
1) You begin by launching Server Manager, Click on Add role & features.
9) Select one or all Network Adapters that you want to assign for Hyper-V. It is recommended that we at least have 2 Network Adapters for production environment. But since this is a Test Lab we can continue with just 1 Network Adapter. Click on Next.
10) Live Migration is one of the features of Hyper-V in Windows Server 2012. We will be doing a separate post which will cover this feature. For now we will keep it disabled as we don’t want live migrations of VM’s it can be enabled later. Click on Next.
11. Specify the Location for the Virtual Hard Disks & Configuration Files. For Best Practices You should have 1 hard drive partition for 1 Virtual Hard disk. Meaning if you have a VM with 2 Virtual Hard disk, each of those Virtual hard disk should be placed in a separate partition better yet a separate hard drive, to achieve better performance on the VM. If you have multiple VM’s running from 1 single physical hard drive your entire server will be very slow. Since this is a Test Machine and we are not actually going to run any VM’s on the Hyper-V Server right now we will keep the default locations and continue with the setup.
You have now successfully installed Hyper-V Role on Windows Server 2012.