How to Deploy Virtual Windows Nano Server 2016 (Technical Preview 5)

Author by Concurrency Blog

Today we are going to walk through my experiences of installing Nano Server and later on Storage Spaces Direct with Nano server, so stay tune if you're interested.  This is will be split up into Multiple Sections.

Intro Nano Server

So what is Nano Server?  It’s a scaled down version of Server 2016 which has just the bare essentials to run.  What do I mean by this?  Nano server is doesn’t exactly have a GUI to configure nor a windows features to click to install or predefined/installed features.  The only GUI it has is the Recovery Console other than that it has to be administered by a remote PowerShell session.

Nano Server Recovery Console

Recovery console is the only GUI interface Nano Server has.  From here you can configure your NICs.  I did not find an option for vlans with my NICs. 

Machine generated alternative text:
|0admini strator 
ENTER: 
User name: 
Password: 
Domain: 
Authenticate

Recovery console login (above), Recovery main menu (below)

Machine generated alternative text:
|0Recovery Console 
Computer Name: 
Domain: 
os: 
Local date: 
Local time: 
Time zone: 
> Networking 
Nano Server 
S2D3-A 
concurrency . com 
Microsoft Windows Server 2016 Datacenter Technical 
Wednesday, July 6, 2016 
9:37 AM 
Pacific Standard Time 
Preview 5 
Inbound Firewall Rules 
Outbound Firewall Rules 
WinRM 
I ESC: 
Up/Dn: Scroll 
Ctl+F12: Shutdown I 
Log out I F 5: 
ENTER: Select 
Refresh 
Ctl+F6: 
Restart

You can also reset your remote settings here if something has gone wrong with your remote PowerShell sessions and you can no longer connect.  I haven't had this happen to me yet fingers crossed.

Machine generated alternative text:
|0Windows Remote Management 
Windows Remote Management (WinRM) is the Microsoft implementation of 
the INS -Management (WS-Man) protocol which provides a secure way to 
communicate with 
If you have lost 
this option will 
configuration to 
For more details 
local and remote computers using web services. 
the ability to remotely manage this server over WinRM 
allow you to RESET the WinRM firewall and service 
their default settings and allow connections from ANY subnet. 
please visit: 
https : //msdn . microsoft . . 85) . aspx 
ENTER: 
Confi rm 
ESC: 
Back

Nano Server General Deployment Notes

First off when doing deployments just remember when deploying Nano server, it is vanilla and plain.  In order to make yourself a Nano server that knows "file server" you must specify it while creating the Nano server VHDX.  As stated before it does not have the ability click to install features or do a "Get-WindowsFeatures" with PowerShell to install features.  If you have forgotten to add a feature it is better off to recreate the Nano Server rather than trying to add it in afterward.  Also if you ever have issues with a Nano Server just recreate it rather than spend time trouble shooting it.

Prerequisites

800MB of disk space, YES only 800MB for a Nano server deployment.  It does grow a bit larger adding other features.

Requirements

Server 2016 TP 5 ISO

  • If you don’t have it download it from here, sign up for an account if you don’t have one as its free.

    https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-technical-preview

    Machine generated alternative text:
|0Microsoft 
TechNet Evaluation Center 
My Evaluations 
Evaluate Now v 
Tech Journeys v 
Explore 
Try 
Windows Server Evaluations 
Learn 
Type Keyword here... 
B Explore 
B Explore 
Inside look from the experts on what's new 
in Windows Server 2016 
B Explore 
Are you a master of all things DevOps? See 
where you stack up when you explore the 
DevOps Factory. 
Find DevOps stories from experts and 
practitioners to support and inspire your 
transformation 
Windows Server 2016 Technical Preview 5 
Evaluations 
Download 
Please sign in to download Windows Server 2016 Technical Preview 5. If you have not registered before, you will be asked to do so. 
Sign In

    Once you have the iso extract it somewhere (I used a program called 7zip to extract it).  I prefer it to be on the root of the c drive.

    Machine generated alternative text:
|014300.1000.160324-1723. 1 _ 
File Edit View Favorites Tools Help 
Add Extract Test Copy Move Delete Info 
RELEASE SVC SERVER OEMRET X64FRE EN-US.ISO\ 
Name 
boot 
NanoServer 
sources 
support 
autorun.inf 
bootmgr 
bootmgr.efi 
setup. exe 
0 object(s) selected 
Size 
18 239 2... 
20 833 0... 
403 767 
4 734 43... 
15 297 
128 
405 710 
1 164 776 
80 560 
Packed Si... 
18 257 9... 
20 854 7... 
403 808 
4 735 23... 
15 429 6... 
2 048 
407 
552 
1 165 312 
81 920 
Copy 
Copy to: 
c:\tp5 
Folders: 5 
Modified 
2016 03 
2016 03 
2016 03 
2016 03 
2016 03 
2016 03 
2016 03 
2016 03 
2016 03 
Accessed 
2016 03 
2016 03 
2016 03 
2016 03 
2016 03 
2016 03 
2016 03 
2016 03 
2016 03 
Folders 
3 
5 
3 
79 
7 
Files 
28 
28 
41 
872 
126 
(5 192568406 bytes) 
Files:4 (1651 174bytes) 
Size: 5 194 219580 bytes 
x 
RELEASE SVC SERVER OEMRET X64 
boot\ 
efi\ 
NanoSever\ 
sources\ 
support\ 
OK 
Cancel

    Virtual Deployment of Nano Server

    Time to go exploring, open the C drive and go to the files you have just extracted (c:\tp5).  Once in the TP5 folder copy the "NanoServer" Folder to the Desktop.

    Open PowerShell as an administrator Import the PowerShell modules from the recently copied NanoServerImageGenerator folder, from here run the following command

Set-ExecutionPolicy RemoteSigned

Import-Module .\NanoServerImageGenerator -Verbose

Machine generated alternative text:
|0PS c:\users\yher\desktop\Nanoserver\Nanoserver1mageGenerator> set-Executnonpolncy Remotesngned 
Execution policy change 
The execution policy helps protect you from scripts that you do not trust. changing the execution policy might expose 
you to the security risks described in the about _ Execution_policies help topic at 
http://go.microsoft.com/fw1ink/?Link1D=135170. Do you want to change the execution policy? 
[s] suspend [?] Help (default is "N"): A 
[Y] Yes [A] Yes to All 
[N] No [L] No to All 
PS c:\users\yher\desktop\Nanoserver\Nanoserver1mageGenerator> Import-Module .\Nanoserver1mageGenerator 
-verbose 
VERBOSE: Loading module from path 
' c : \use rs\yhe r\desktop\Nanose rve r\Nanose rve rlmageGene rator\Nanose rve rlmageGene rator . psdl ' 
VERBOSE: Loading module from path 
' c : \use rs\yhe r\desktop\Nanose rve r\Nanose rve rlmageGene rator\Nanose rve rlmageGene rator . psml ' 
VERBOSE: Importing function 'Edi t-Nanoserver1mage ' 
VERBOSE: Importing function 'Get-Nanoserverpackage' 
VERBOSE: Importing function 'New-Nanoserverlmage ' 
PS c:\users\yher\desktop\Nanoserver\Nanoserver1mageGenerator>

Creating the Nano server VHDX for Virtual machine

Nano server can be created in 1 line of code, it’s a bit tricky at first but once you have your line of code it is fairly straight forward and repeatable.

The break down. Read through the break down before trying to create one.

New-NanoServerImage -Edition <edition> -DeploymentType <Guest/Host> -MediaPath <path to root of media> -BasePath .\Base -TargetPath .\NanoServerVM\NanoServerVM.vhd -ComputerName <computer name>

Machine generated alternative text:
|0Guest 
h 
c:\Users\yher\Desktop\Nanoserver1mageGenerator> New-Nanoserverlmage 
c:\tp5 
-Basepath 
. \Base 
-Targetpath 
. \Nanose rve rVM\Nanose rve rVM . vhd 
-Edition 
standard 
-DeploymentType 
-computerName 
Nanoserver 
-Medi apat

Edition - this is "Standard" or "Datacenter"

So far the only difference between the Standard and Datacenter software wise is having access to Storage Spaces Direct and Storage replica with the Datacenter edition.

Deployment Type - This specifies if it will be a "Guest" VM hosted by a Hyper-V host or "Host" which will be deployed on an actual machine, for this instance we will be making this a guest.

MediaPath - This is where I had the TP5 ISO extracted earlier to (C:\TP)

TargetPath - This is where your VM will be stored and the name of the VM so rename the NanoServerVM.VHD accordingly.  (It will create the Nano server VHDX in PowerShell’s current location unless specified)

NOTE: Also note the extension Specify VHD (gen1) or VHDX (gen2) machine type.

ComputerName - Just straight forward this will name the machine.

NOTE! This deployment will get you a dummy server as it has no option to install other services or features yet!

This is my example so far

New-NanoServerImage -Edition Standard -DeploymentType Guest -MediaPath  c:\tp5 -BasePath .\Base -TargetPath .\NanoServerVM\NanoServerVM.vhdx -ComputerName NanoServer

Adding Nano Server Features

So now that you have your line of code how do you add features?  Simple add it at the end of the code you just wrote.

Machine generated alternative text:
|0PS c:\users\yher\desktop\Nanoserver\Nanoserver1mageGenerator> New-Nanoserverlmage 
-Edi on 
standard 
-Depl oymentType 
-compute -clustering 
sepath 
. \Base 
-Targetpath 
. \Nanose rve rVM\Nanose rve rVM . vhdx 
-computerName 
Nanoserver 
Guest 
-Medl apath 
c:\tp5 New-NanoServerImage -Edition Standard -DeploymentType Guest -MediaPath  c:\tp5 -BasePath .\Base -TargetPath .\NanoServerVM\NanoServerVM.vhdx -ComputerName NanoServer -compute -clustering

Now this will have Hyper-V and Fail over clustering installed once the VHDX is compiled.

Below are the options that you can add depending on your deployment. (provided by Microsoft)

Role or feature

Option

Hyper-V role

-Compute

Failover Clustering

-Clustering

Basic drivers for a variety of network adapters and storage controllers. This is the same set of drivers included in a Server Core installation of Windows Server 2016 Technical Preview.

-OEMDrivers

File Server role and other storage components

-Storage

Windows Defender Antimalware, including a default signature file

-Defender

Reverse forwarders for application compatibility, for example common application frameworks such as Ruby, Node.js, etc.

Now included by default

DNS Server role

-Packages Microsoft-NanoServer-DNS-Package

Desired State Configuration (DSC)

-Packages Microsoft-NanoServer-DSC-Package Note: For full details, seeUsing DSC on Nano Server .

Internet Information Server (IIS)

-Packages Microsoft-NanoServer-IIS-Package Note: See the IIS on Nano Server sub-topic for details about working with IIS.

Host support for Windows Containers

-Containers

System Center Virtual Machine Manager agent

-Packages Microsoft-NanoServer-SCVMM-Package

 

-Packages Microsoft-NanoServer-SCVMM-Compute-Package 

 

Note: Use the SCVMM Compute package only if you are monitoring Hyper-V.

Network Performance Diagnostics Service (NPDS) (Note: Requires Windows Defender Anti-Malware package, which you should install before installing NPDS)

-Packages Microsoft-NanoServer-NPDS-Package

Data Center Bridging

-Packages Microsoft-NanoServer-DCB-Package

Ability to boot and run from a RAM disk

Microsoft-NanoServer-BootFromWim-Package

Deploying on a virtual machine

Microsoft-NanoServer-Guest-Package

Deploying on a physical machine

Microsoft-NanoServer-Host-Package

Secure Startup

-Packages Microsoft-NanoServer-SecureStartup-Package

Shielded VM

-Packages Microsoft-NanoServer-ShieldedVM-Package Note: This package is only available for the Datacenter edition of Nano Server.

Once you choose the options you would like to add press enter.  This will now prompt you for a password, NOTE it will only ask you this once so don’t fat finger it! Or else you will have to compile another one.

It will then Prompt you for a password for the Nano server VHD

Machine generated alternative text:
|0cmdlet New-Nanoserverlmage at command pipeline position 1 
supply values for the following parameters: 
Admi n s t r a to r password : * *

The VHDx will now be provisioned

Machine generated alternative text:
|0windows (R) Image to vi rtual Hard Disk converter for windows (R) 10 
copyright (c) Microsoft corporation. All rights reserved. 
version 10 . 0.14300.1000. amd64fre . rsl_rel ease_svc. 160324-1723 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
INFO 
Done . 
Looking for the requested windows image in the WIM file 
. Image 1 selected (serverstandardNano) .. 
. creating sparse disk.. 
. Mounting VHD.. 
. Initialnzing disk.. 
. creating single partition... 
Formatting wnndows volume.. 
. windows path (D:) has been assigned. 
system volume location: D: 
. Applying image to VHD. This could take a while.. 
. Image was applied successfully. 
. Maknng image bootable.. 
Fixing the Device ID in the BCD store on VHD.. 
Drive is bootable. 
cleaning up.. 
Di smounting VHD. . 
. closing windows image.. 
Done . 
The log is at: log

Go get Coffee or make a sandwich as this can take anywhere from 10 to 30 minutes or more to complete.

The VHDx will located where you set the -targetpath ".\nanoServerVM" from above.  When I ran the code to create the Nano Server I was currently at "c:\users\%username%\desktop\NanoServerImageGenerator"

Machine generated alternative text:
|0Guest 
h 
c:\Users\yher\Desktop\Nanoserver1mageGenerator> New-Nanoserverlmage 
c:\tp5 
-Basepath 
. \Base 
-Targetpath 
. \Nanose rve rVM\Nanose rve rVM . vhd 
-Edition 
standard 
-DeploymentType 
-computerName 
Nanoserver 
-Medi apat

It will be generated under "c:\users\%username%\desktop\NanoServerImageGenerator\NanoServerVM"

Now load it into HyperV the same way we are importing a normal server. Create a new Hyper-V host and select with an existing Harddrive then select the VHD we had just generated. Turn on the VM and now say hello to the recovery console which was shown in the beginning of the post.

Machine generated alternative text:
|0ENTER: 
User name: 
Password: 
Domain: 
Authenticate

Log in with the user name: Administrator and the password you choose when we provisioned the VHDx

Machine generated alternative text:
|0Computer Name: 
Workgroup: 
os: 
Local date: 
Local time: 
Time zone: 
> Networking 
Nano Server Recovery Console 
NanoServer 
WORKGROUP 
Microsoft Windows Server 2016 Standard Technical 
Wednesday, May 18, 2016 
1:39 PM 
Pacific Standard Time 
Preview 5 
Inbound Firewall Rules 
Outbound Firewall Rules 
WinRM 
I ESC: Log out I F5: 
Up/Dn: Scroll 
Ctl+F12: Shutdown I ENTER: Select 
Refresh 
Ctl+F6: 
Restart

Configure the IP address under Networking.

Congrats! You have just deployed a Virtual Nano Machine, Next time we will be deploying this on actual hardware.

 

Author

Concurrency Blog

The latest about Concurrency