Sunday, August 30, 2015

Setup Nano Server of Windows Server 2016 TP3 version on Hyper-V virtual machines

In one of  Microsoft Ignite 2015 sessions, Jeffrey Snover introduced a new Window Server installation option, Nano Server, on the Windows Server 2016 Technical Preview 2. In Windows Server 2016 Technical Preview 3, Microsoft attached 2 PowerShell scripts on the installation media to let administrators to create a new VHD of NanoServer easily. At this moment, Nano Server supports the following features:
  • Hyper-V Compute
  • Windows Containers
  • Storage Server (SOFS)
  • Failover Clustering

For more information what Nano Server supports, please read Getting Started with Nano Server.

In this post, I will try to create a Nano Server VHD by the scripts which are provided by Microsoft. Then, boot the Nano Server VHD and VHDX on a Hyper-V Server.
Lab environment
  • 1 x Windows Server 2012 R2 Hyper-V Server

1. Log in a Hyper-V server as administrator.
2. Launch PowerShell as administrator.
3. Navigate to installation DVD path \NanoServer.

4. Perform . .\new-nanoserverimage.ps1 to load the PowerShell function.

5. Perform New-NanoServerImage -MediaPath <Source path of installation DVD of folder> -BasePath <Temporary folder path for conversion> -TargetPath <Target folder path> -<Feature Name> -EnableIPDisplayOnBoot to create a Nano Server vhd.

This script prompted you to enter the local administrator password for the Nano Server.

Eventually, the Nano Server was created on the destination folder.

Then, you can create a Generation 1 virtual machine and then attach the virtual hard disk.

Remark: The current script, New-NanoServerImage, created the VHD with MBR boot partition so we need to use generation 1 virtual machine to mount it. To use generation 2 virtual machine for Nano Server, we can update this script manually to change to vhdx with GPT boot partition. Based on my testing, I updated the following line numbers of this script.

Line 611, 701, 707, 925

As a result, we can set up Nano Server on virtual machines. To manage Nano Servers, we can perform PowerShell cmdlet, Enter-PSSession, to connect and manage the Nano Servers.

This posting is provided “AS IS” with no warranties, and confers no rights!

No comments:

Post a Comment