Here we are with the first steps to install Hyper-V nested Hypervisor inside VMware Hypervisor. As already mentioned in the introduction article I will be using a laptop with VMware Workstation 12 to install Hyper-V 2012 R2 Core as a “VM Host”. This VM Host will then contain the Hyper-V Guests.
The steps to create a new VM in VMware Workstation are pretty simple so in our case let’s use the Microsoft Windows > Hyper-V built-in template offered by the wizard.
Hyper-V nested install steps into VMware Workstation
The first steps is to create a new VM. For this purpose we can use the VMware Workstation wizard to create an Hyper-V nested install. From the category let’s go for Microsoft Windows OS and Hyper-V as version.
I will use the same configuration settings for 2 Hyper-V VM Hosts as per pictures below. Feel free to add more based on your current physical resources available: RAM should be at least 4GB per hypervisor Host (VM in our case!)
Ideally in this case the first drive will be used to store the Hyper-V install binary files and the second one will be used to store the actual VM guest files. And this will be a combination of .xml, .vhd and .vhdx files.
Let’s adjust the vCPUs as desired (but always less than the physical ones!). Assuming the pertinent options are enabled in the BIOS on the physical machine I also recommend the enable the settings as per screenshot below. This will make sure the actual Hardware VMware Workstation is sitting on is exposed directly to the Hypervisor VM.
Each of the Hyper-V will have 2 SCSI disks: One for the Hyper-V Core OS installation and the other one to store Hyper-V Guest VHDx files. If 40GB might look not enough choose a bigger size. In my testing I did create a VM based on Windows 2012 R2 using dynamic disks (again same size 40GB!) and both from size and performance perspective they were absolutely fine (for a testing environment!).
Ideally if it’s possible to use a separate “physical” storage this will further improve the speed of the Hyper-V VMs. In my case using a laptop with SSD drive to host VMware Guests (including Hyper-V ones) is working with pretty decent speeds.
From a Network perspective I wanted to add multiple NICs. Why? Each one of these NICs will be configured either in TEAMING or UPLINK mode and associated with Hyper-V Logical Networks (this will be covered later on in the System Center Virtual Machines Manager Install and Configuration series).
This way we can simulate for example an Hyper-V Cluster connected to separate Logical Networks for Host Management, Live Migration and VM Guests communication. All of this will be covered later on in the dedicated series mentioned above.
At this point we are ready to start with installation of the first Hyper-V node of the Cluster. In my environment I opted for a Windows Hyper-V 2012 R2 Core.
The installer is now ready to start.
First thing we need to accept the EULA licensing and click next.
Let’s go for a Custom installation since with this option we can choose disk settings where to install the Hyper-V Core binary files.
In this screenshot only one drive is visible. The reason it is because I did take the screenshot before adding the second drive! The same will apply with the available network cards to configure. I took a screenshot of the added NICs just by adding them after the initial first boot of the VM. What can I say. I’m not so patient these days.. 🙂
All we have to do in this case is to select the intended Disk and continue. As a side note if this Hyper-V Host VM is sitting on a VMware install where there is plenty of space it is a good idea to create such virtual disk as allocated. This will ensure better performances over the time.
At this point the installer is ready with the installation which consist in copying files locally, execute them and activate features. All in all the installation process is very quick.
As per screenshot below now the installer is ready to reboot the Hyper-V Host and continue.
On the first login we need to provide a new password for the local Administrator account. Of course this password can be changed later on and even better we can join the Hyper-V Hosts to an Active Domain Controller environmant and benefit from the Domain authentication and policies.
At this point we are ready to start configuring our “Hyper-V Host” with the initial settings as per steps below including:
Configure Windows Update Settings
Configure Remote Desktop Client
Configure Network Settings
Join to Domain
Connect from Hyper-V Manager
Configure Hostname for the Hyper-V nested install
From the Configuration Wizard let’s go for option “2” and then select the desired Hostname. In my case this will be “HV-01” and will be joined to the domalab domain later on. I’ve decided to run all the configurations first and then add the Host to the domain and finally reboot the server to apply the changes.
Let’s enter the desired Hostname making sure to not exceed the 15 characters as this is the maximum number supported by NetBIOS names.
In my case I selected “No” and progressed with the installation for the other parameters.
Configure Windows Update Settings for the Hyper-V nested install
This is a great feature but this is not something I would like to enable in in my testing environment for the simple reason I don’t want to grow/use the necessarily the size of the virtual disks for the Hyper-V Host (which is running as a VM guest in my VMware Workstation on my laptop and space on the SSD is not infinite!).
But it is good to know we have this handy feature from Server Configuration menu (sconfig.cmd). Also let’s take into consideration some of the patch updates might require a reboot of the Hyper-V Host whilst it is running. That means we have to put the Host into Maintenance mode evacuating the VM Guests to complete such updates. Or even better we might leverage a Group Policies together with a WSUS server to manage the updates for the Hyper-V Hosts as well.
Configure Remote Desktop Client for Hyper-V nested install
Next step is to enable and configure the RDP protocol to access the Hyper-V Host. Since I’m using a variety of different clients I’m happy to enable this basic option for all of them as per steps below. So would be a number 7 followed by a number 2. In turn this will access and enable the RDP access to the Hyper-V Host.
And with the “option 2” now we can allow any RDP client connecting to the Hyper-V Host.
Configure the Network on Hyper-V nested install
At this point we can configure the network by selecting option 8 as per screenshot below.
In this screenshot it is only showing 1 Network Adapter (index# 11) for the simple reason I’ve added the other NICs after the first Boot and after taking this particular screenshot. Yeah I know I’m an impatient guy 🙂
Anyway the configuration is very easy after selecting the network card to configure as per screenshots below. The wizard also offers the option to set the DNS servers, useful when joining the Host to the Domain for full name resolution capabilities.
Let’s select the network adapter to configure.
At this point by invoking option 12 we can restart the server OR simply use a “shutdown -r -t 0” from the command prompt window in the background. This reboot will also make sure the Hyper-V Host will start with the new Hostname.
The reboot of the Host won’t take long. So to make sure the VM Host is communicating with the rest of the world let’s try a simple PING command to the Network Gateway IP Address (In my case I’m using VMware Custom NAT configuration) and if successful try to ping google just to make sure VM can go on the internet should we download anything apart from Windows Updates.
Another test that should be done is the one for the network connectivity from other VMs in the same subnet. In my case the other VM the one running the AD. We can notice the ping will fail due to the Firewall enabled on the Hyper-V VM Host. Rather than configuring the specific rules (best practice!) I’m happy to disable the Firewall completely for now.
So from a command prompt it’s a very quick task to perform. Make sure you are in the netsh > advfirewall context by typing these commands individually and then issue a:
“set all profiles state off”
Join the Host to the Domain of an Hyper-V nested install
To join the VM Host to the domain it is pretty simple process. From the main menu let’s go for “option 1” and follow the wizard. Since the Hostname has been set at the beginning there is no need to change it again unless we change our mind of course!
At this point we can specify the NetBIOS name of the Domain we want to join. Should this fail let’s make sure the following is working as expected:
- No firewall is blocking communication between Hyper-V Host and Domain Controller
- Routing between Hyper-V Host and Domain Controller is working
- DNS name resolution is working both ways for forward and reverse FQDN
- NSLookup utility is responding using the IPv4 protocol rather than IPv6 assuming the latter is not properly configured.
Connect to the Hyper-V nested install Host with Hyper-V Manager
Now from any machine in the same Domain (this is important otherwise otherwise extra configuration for the WinRM service on the Hyper-V Host) make sure the Hyper-V role and Management Tools feature is installed. From that machine in fact we can connect to the newly created Hyper-V VM Host as per screenshots below.
As a final note: If it happens to close the Wizard Blue Window by mistake it is possible to recall this one by issuing the command sconfig (Server Config wizard)
This concludes this part of the installation of the first VM Hyper-V Host. Ideally we want to repeat the same steps for a secondary VM Host so that we can then configure an Hyper-V cluster. This and a lot more will be covered in the next articles.