So, if you are an IT Pro you probably know that with Microsoft Server 2016 comes with something called Nano Server.

In my opinion it is the best of new thing that Server 2016 have. To see what is new in Windows Server 2016 check out this link on TechNet and if you have more time available there are a series of really good Microsoft Virtual Academy resources here.

Over the last few years the Microsoft tried to downsize their Windows Server product and answer on many issues that users had.

The first attempt to resolve these issues was in Server Core released as an installation option in Windows Server 2008. A command line only version of the Server OS that can be managed remotely and to a limited degree from a direct console This ‘server core’ did away with a lot of extraneous ‘stuff’ and meant fewer updates, smaller images and smaller, quicker installations.

But this was not enough and so the Server Product team in Microsoft went back to the drawing board and produced a deployment option now known as Nano server. This cannot be installed from the DVD or ISO, it has to be installed using PowerShell and each individual image built up to only contain the roles and services that are required for that particular server.

If you fancy trying it now and don’t want to step through it in this post with me, then head off to this is the landing page for the Getting Started with Nano Server walkthroughs. You could also do worse than to head over to Channel 9 here for the Nano server channel. or here for the Windows Server channel

If however you would like to step through how to deploy this innovative new server that can sit in as much as 150MB or RAM and on a VHD of as little as 450MB in size, then read on.

Deploying a Nano Server

There are several ways to deploy a Nano Server. You can deploy a bare metal bootable image, a boot to VHD physical host and a VM image. All three require different tasks and commands. This post will concentrate on the VM method as this is the easiest for a new user to get up to speed with.

The first step is to download the Windows Server 2016 ISO. If you have an MSDN subscription you know where to get it from, if not you can sign up to evaluate the server here. Just sign in with a Microsoft Account and download the ISO.

So to be able to follow these steps, the minimum you require is.

  1. ISO for Windows Server 2016
  2. A  PC or server with an operating system and a hypervisor.
    1. Windows 8 or 8.1 or 10 with Hyper V installed.
    2. Windows Server 2008,2012 or 2016 with the Hyper V role installed

The instructions I will use will show screenshots from Hyper V running on Windows 10. Hyper V does not come installed by default so you can follow  these instructions on Windows 10.

The first step is to mount the Server 2k16 ISO, to do this copy the ISO to a folder and right click on the file. then click MOUNT (alternatively double clicking the file mounts and opens the ISO, in my case on a Drive Letter D:).

You will see a folder named NanoServer

Copy folder to your hard disk root

Now for the good stuff. We need to run PowerShell to be able to create a VHD containing a NanoServer deployment image. Make sure you run PowerShell as an administrator (right click the icon and run as administrator).

Now change directory to where you placed the Nano Server and open NanoServerImageGenerator folder in my case that is the C:\NanoServer\NanoServerImageGenerator then type

import-module .\NanoServerImageGenerator –verbose

I have added the verbose switch so that you can see the commands (or cmdlets that are imported)

You are now able to use the cmdlets above to create your Nano Server VHD.

Type (all on one line)

New-NanoServerImage -Edition Standard -DeploymentType Guest -MediaPath D:\ -BasePath .\Base -TargetPath .\NanoServerVM\NanoServerVM.vhdx -ComputerName NanoServer01 –compute –storage –clustering

break down below, what means what:

New-NanoServerImage(This calls the cmdlet you imported)
-Edition Standard (This switch sets either standard or datacenter edition)
-DeploymentType Guest (This switch defines whether the VHD is for a physical host or a guest VM)
-MediaPath D:\ (This is where you mounted your Server 2016 ISO file)
-BasePath .\Base (This is where you are going to copy the installation files and packages, .\ signifies the current folder)
-TargetPath .\NanoServerVM\NanoServerVM.vhdx (This is the full path including filename to your output VHD or VHDX, if you put VHD it will be Generation 1 VM and if you put VHDX it will Generation 2)
-ComputerName NanoServer01 (This is the internal computer name)

There are more switches, these allow you to install roles and features into your image. This can be done at creation or by using PowerShell or DISM after the image has been built.

I want this VHD to be a file server, a failover cluster node and a hyper v host, so I need to add the following switches to the end of the command.

–Storage –Clustering –Compute

Then run that command by selecting it all and pressing F8. This will take some time and will take longer the first time you run it as the cmdlet copies the media files to your hard disk and creates a base Nano VHD as well. Not all these tasks are required for future image creations.

The script will run and will ask you to enter an Administrator password. I recommend some easy one so that you don’t forget it and This will be the local administrator password. You can join a Nano to an Active Directory Domain (we will cover this in other post).

When finished, you will have two new folders as shown

Base contains all the NanoServer software, a .wim file and the packages to install inside and the NanoServerVM folder contains your new VHDX.

This one is 659 MB in size, not bad for a Hyper-V host, file server and failover cluster node.

Now that we have the VHD we need to use Hyper-V (or PowerShell to create a VM) – I will use PowerShell

I am going to assume that you already have a Virtual switch in your Hyper-V manager (if not use this link to do that now)

The PowerShell to create a VM for my circumstances is below, change it to suit your drive letters and paths.

New-VM -Name AldinNANO -Generation 2 -SwitchName Interni -Path C:\NanoServer\NanoServerImageGenerator\NanoServerVM -VHDPath C:\NanoServer\NanoServerImageGenerator\NanoServerVM\NanoServerVM.vhdx

Once this has completed with a result as shown

You can then head on over to Hyper V Manager and start the VM and connect to it.

The VM takes about 6 seconds to start and connect and will show this screen

Enter the Administrator username and password and you see the Nano Server Recovery console as below

The Nano Server is not designed to be administered locally but uses any or all of the traditional server management tools (and can also be managed from Azure)

From this point I suggest you explore the local configuration possibilities.

To connect to the Nano-Server remotely we need to get back to PowerShell, we can either use the new Windows 10 PowerShell direct feature or connect to the IP address of the server.

So from PowerShell use this command

Enter-PSSession -VMName AldinNANO

resulting in this output

You can see from the revised command prompt, that we are now working directly in the AldinNANO VM.

Check this by typing a number of commands to see what output you will get

ipconfig, hostname, get-process

You can also look at the Hyper V manager in the Memory tab of the VM

a total of 256MB for a running server and then inspect the virtual disk from the VM settings menu.

A full running server in a hard disk of 676MB

All look pretty amazing.

Future posts will show what we can do with this great new technology. I encourage you to try this new technology it is really great.