Fist of all*, I’d like to announce that e-book “Introduction to Windows Server 2016 (Russian Edition)” with my technical review and translation had been published and became available for download.
It was originally written for technical preview but this new edition has plenty fixes and additional notes with full adaptation to the current version of Windows Server. I believe we did the great work in a short time. If you find some typo or mistake, feel free to contact me. *I’m sorry..we’re way off topic..let’s back to Azure
Another important news that I’ve missed – Azure is going to support nested virtualization. However, only new Ev3 and Dv3 VM series will support it. + Azure team has increased maximum disk size to 4096 Gb for both Premium and Standard disks. Hallelujah 🙂
These VMs come with enabled nested virtualization and completely ready for guest VMs or Hyper-V containers. There are many scenarios where it’d be helpful. For instance, you can create smaller number of large VMs using Ev3 or Dv3 VMs with a full control of resource allocation for any guest VMs. I tested nested VMs in WS2016 and now I’m looking forward to test them in Azure as well.
In Windows Server 2012/2012 R2 we could install Hyper-V role inside a virtual machine, create VM (to test hyper-v replica, for example) but it was impossible to run VMs.
Since Technical Preview 4 and Windows 10 Build 10565 have been announced, Microsoft has added ability to run VMs inside virtualized environment
Nested Virtualization lets you run VMs inside the guest OS. In other words, It allows you to run Hyper-V Server inside a virtual machine.
When nested is not supported or not enabled, Hyper-V has privileged access to the hardware virtualization extensions (lower level) and does not expose them to the guest operating system. Once nested virtualization is enabled (ExposeVirtualizationExtensions = True) for VM Hyper-V exposes required extensions to guest VMs and then we have an ability to install Hyper-V and run guest’s own VMs.
You can set and check ExposeVirtualizationExtensions value by using PS:
Nested virtualization is especially useful for development, demo labs, training labs and other test environments (It’s not recommended to use in production). MCTs should be happy.
There is no information about changes in Windows Server 2016 licensing program yet. I hope we won’t have to buy additional licenses to cover nested Hyper-V VMs
If you are interested in tasting nested virtualization you have to firstly check host requirements:
4 GB RAM available minimum (we need to create a VM with 4 Gb static RAM. It will be our nested Hyper-V)
At least Windows Server 2016 TP4 or Windows 10 Build 10565 on both physical host and virtualized host. It’s highly recommended to have same builds in all environments.
This feature is currently Intel-only. Intel VT-x is required. There is no support for AMV-V yet
To enable nested virtualization:
1. Create virtual machine running the same build as host(TP4-Child, 2016 TP4, in my case)
Run this script on your host or you use the following lines:
#Download and run
Invoke-WebRequest https://raw.githubusercontent.com/Microsoft/Virtualization-Documentation/master/hyperv-tools/Nested/Enable-NestedVm.ps1 -OutFile ~/Enable-NestedVm.ps1
~/Enable-NestedVm.ps1 -VmName "TP4-Child"
#If you don't have internet connection, download and copy script to host and run then
.\Enable-NestedVm.ps1 -VmName "TP4-Child"
Script does the following:
disables dynamic memory on VM
enables virtualization extensions
enables MAC Address Spoofing (for network connectivity inside the guests)
Copy-VMFile -SourcePath "unc or local path to ISO" -DestinationPath c:\iso\nameofiso.iso -CreateFullPath -FileSource Host -VMName TP4-Root
6. Create VM (I named it as “TP4-Child”) inside VM (sounds weird ), attach ISO that we copied earlier and install OS as usual.7. Homer – is my Hyper-V (virtualized) running on Hyper-V HV02 (physical host) , Bart – Homer’s child (I guess you know)
Please keep in mind some known issues and limitations:
Hosts with Device Guard enabled cannot expose virtualization extensions to guests.Hosts with Virtualization Based Security (VBS) enabled cannot expose virtualization extensions to guests. You must first disable VBS in order to preview nested virtualization.
Once nested virtualization is enabled in a virtual machine, the following features are no longer compatible with that VM (Homer)
Dynamic memory must be disabled
Runtime memory resize does not work
You cannot apply checkpoint to a running VM
VM which hosts other VMs cannot be live migrated.
You cannot save or restore VM
VM connection keeps being lost : if you are using blank password, change it and check connection again
I’d like to thank you for reading and have a nice virtualization! …and NESTED VIRTUALIZATION!