Enable nested VM’s inside Windows 10 1607

Windows 10 1607 now supports nested VM’s inside Hyper-V with 2 simple PowerShell commands. I use this on my Surface Book a lot, in order to test all kinds of features inside Windows Server 2016. For instance, I can even run a complete Hyper-V Replica deployment on my Surface Book.

  1. Enable Hyper-V role on the host (my Surface Book running Windows 10 1607)
  2. Install some VM’s. Now, shut them down and run these PowerShell commands to enable nested VM support:
    Set-VMProcessor -VMName vm1 -ExposeVirtualizationExtensions $true
    
    Get-VMNetworkAdapter -VMName vm1 | Set-VMNetworkAdapter -MacAddressSpoofing On
  3. That’s it. Start vm1, install Hyper-V role inside this VM and configure some VM’s to run inside this VM.

 


Improve Hyper-V disk I/O performance in Windows Server 2012 R2

We have a lot of HP ML350/DL380 G6, Gen8 and Gen9 Hyper-V servers running Windows Server 2012 R2. Storage wise, this means we have Smart Array P410i, P420i and P440ar, and when we fill the cages with SSD‘s in RAID-1+0, we sometimes measure a HUGE I/O difference between the parti tion in the Host (where the VM resides), versus inside the VM itself. In this case, the I/O inside the VM is extremely slow, like 140 MB/sec read vs.1500 MB/sec on the Host on the same partition.

There seems to be an I/O load balancer in Hyper-V, but I don’t know when it kicks in. I have the feeling that it kicks in when you reach a specific number of VM’s in the Host, and that it doesn’t turn off when you get below this certain number. Continue Reading


Enabling Storage Spaces Direct in Virtual Machines

I’m currently testing Storage Spaces Direct in Windows Server 2016 TP5 with VM’s. Enabling S2D is a lot easier thanks to the cmdlet:

Enable-ClusterStorageSpacesDirect

However, when you’re using VM’s, the MediaType of the disks is not exposed, so you’ll get an error, something like:
EnableClusterStorageSpacesDirect : Disk eligibility failed At line:1 char:1. CategoryInfo : InvalidOperation(MSCluster_StorageSpacesDirect:root/MSCLUSTER/…ageSpacesDirect)

Using these commands solves the problem:

Continue Reading


Enable Hyper-V Nested VM’s in Windows Server 2016

I’m currently building a Windows Server 2016 TP4 Scale-out File Server cluster, based on VM’s. This is not ideal, but with a fast CPU and a bunch of SSD’s you can get it up & running pretty easy.

However, installing the Hyper-V role inside a VM (nested) is not supported, but you can enable it on the host with the following script:

Invoke-WebRequest https://raw.githubusercontent.com/Microsoft/Virtualization-Documentation/master/hyperv-tools/Nested/Enable-NestedVm.ps1 -OutFile ~/Enable-NestedVm.ps1
~/Enable-NestedVm.ps1 -VmName <VmName>

Just open PowerShell as Administrator and run the script while changing the <vmname> accordingly. It even works on my Windows 10 1511 workstation. 🙂