Running Nano from Windows Server 2016 TP3 on Hyper-V

Last week I blogged about “Running Hyper-V on Nano”.  Today I want to talk about the opposite process – running Nano from Windows Server 2016 TP3 as a guest on Hyper-V.

There are a number of changes in the TP3 build that make this really easy to do.  The first is the inclusion of PowerShell scripts that streamline the process of creating a Nano virtual machine.  All you need to do is:

  1. Mount the TP3 installation media
  2. Change to the “NanoServer” directory on the TP3 installation media 
  3. Load (via dotsourcing) convert-windowsimage.ps1
  4. Load (via dotsourcing) new-nanoserverimage.ps1
  5. Look at the help for “New-NanoServerImage”
  6. Create a VHD that contains the GuestDrivers package (and any other configuration options you want to choose).
This should look something like this:
 
At the end – create a virtual machine that uses this virtual hard drive and you should be good to go.  
One important note to make: this script produces virtual hard drives for generation 1 virtual machines, so it will not boot if you attach it to a generation 2 virtual machine.
 
Once you are up and running – there is extra good news.  PowerShell Direct now works for Nano guest virtual machines too! This makes it super easy to control and interact with Nano virtual machines:
 
 
You can jump straight into a PowerShell session on your shiny new Nano virtual machine without having to worry about network configuration at all.
Cheers,
Ben