This content is part of the Essential Guide: A guide to Microsoft Windows Server 2016

Essential Guide

Browse Sections

Devil's in the details for a Windows Nano Server install

Nano Server is a lightweight installation option for Windows Server 2016, but deploying it isn't easy. Here's what you need -- and what to look out for.

Windows Server 2016 features Nano Server, an extremely minimalistic Windows Server deployment that's smaller than Server Core but more difficult to install. Currently, administrators don't have an option to deploy Nano Server from Windows Setup. So, how do you deploy Windows Nano Server -- without an option in Windows Setup? Let's take a look.

The Windows Server 2016 preview 2 installation media contains a folder called "Nano Server" that contains a Windows Image file. This WIM file must be converted into a bootable virtual hard disk.

Microsoft provides a script on its website called Convert-WndowsImage.ps1 and this PowerShell script is designed to convert a Windows image file into a virtual hard disk. That may make it seem as though deploying Nano Server is a somewhat simple process; however, the devil is in the details.

If you convert the WIM file to a virtual hard disk file, that virtual hard disk won't be bootable. The easiest way around this problem is to run the script on a Windows 8.1 machine; the script does not currently work on Windows 10. The parameters you must include are:

WIN -- The path to and name of the .WIM file

VHD -- The path to and name of the virtual hard disk that you are creating

DiskType -- A fixed disk type is preferable

VHD Format -- VHD or VHDX

SizeBytes -- The virtual disk size -- 2GB should be enough

Edition -- This parameter must be set to 1

Running the Convert-WindowsImage.ps1 script with the specified parameters will create a bootable virtual hard disk. However, Windows Nano Server won't do anything if you stop there. The Windows Server 2016 preview 2 installation media contains a number of packages that need to be injected into the image.

To do this, mount the virtual hard disk and then use the Add-WindowsPackage PowerShell cmdlet to add the contents of each package to your virtual hard disk. However, the Add-WindowsPackage cmdlet is based on DISM; the Windows 8.1 version of DISM won't work with Windows Server 2016. Therefore, it's best to copy your virtual hard disk to a Windows 10 machine and perform the package injection there.

While the virtual hard disk is mounted, you will need to create a Windows installer answer file (unattend.xml) because Windows Server 2016 Nano Server does not include a user interface -- not even PowerShell. Without an answer file, there is no way to provide Setup with an administrator password. The Windows installer answer file should be exactly the same as any other answer file you would use when deploying a sysprepped image.

The last step is to dismount the virtual hard disk and connect it to a Hyper-V VM. But be careful: Compatibility problems have been noted between Windows Nano Server and Generation 2 VMs. I recommend creating a Generation 1 VM.

When you boot the VM, a Windows logo will appear and you'll have to wait for the process to complete. Windows has to install itself before it is ready to use. The process is complete when you see a solid black screen.

Next Steps

How containers affect applications in Nano Server

Use Boot to VHD to evaluate Windows Server Technical Preview

Take a peek inside Windows Server 2016

Dig Deeper on Windows Server deployment