Step-By-Step: Installing a Nano server in my test domain

Hello Folks,

I’m rebuilding my lab, and i decided to explore the benefits of the new Nano Server.  Windows Server 2016 TP3 offers a new installation option: Nano Server (which we discussed in the past. Nano, Core or Standard? That is the question).

Nano Server is a remotely administered server operating system optimized for hosting in private clouds and datacenters.  and we say remotely administered because there is NO UI to this server. There is no local logon capability at all. So It’s like Server Core, but much smaller. It takes up far less disk space, sets up significantly faster, and requires far fewer updates and restarts than Windows Server.

Nano Server is Fantastic for the following scenarios:

  • As a “compute” host for Hyper-V virtual machines, either in clusters or not (that is the scenario i’m preparing)

  • As a storage host for Scale-Out File Server, either in clusters or not

  • As a container or virtual machine guest operating system for applications that are developed using in cloud application patterns

IN any case, watch this great session from Jeffrey Snover at Ignite in Chicago. it’s a must if you’re interested in Nano server. 

>

To quickly deploy Nano Server on a physical computer

1- Copy Convert-WindowsImage.ps1 and New-NanoServerImage.ps1 from the \NanoServer folder in the Windows Server Technical Preview ISO to allocation on your machine.  in my case c:\nanoserver and the content of the ISO to c:\WS2016-TP3

2- Start Windows PowerShell as an administrator and change directory to the folder where you've placed these scripts and then "dot-source" the New-NanoServerImage.ps1 script (. .\New-NanoServerImage.ps1)

3- Create a VHD that sets a computer name and includes the OEM drivers and Hyper-V by running the following command which will prompt you for an administrator password for the new VHD:

New-NanoServerImage -MediaPath <path to root of media> -BasePath .\Base -TargetPath .\NanoServerPhysical -ComputerName <computer name> -OEMDrivers <role/feature options>

image

  image

 image

Copy the VHD that this script creates to the physical computer and configure it to boot from this new VHD. To do that, follow these steps:

1- In an elevated command prompt, copy the current boot loader entry on the computer where Nano Server is running, and then use that to create a new entry with this command: bcdedit /copy {current} /d “Nano Server”

2- Type bcdedit again and copy the GUID that appears in the ID field of the newly copied boot loader entry, including the curly brackets.

3- Run these commands, replacing {GUID} with the copied GUID (including the curly brackets):

  • bcdedit /set {GUID} device vhd=[c:]\NanoServer\NanoServer.vhd

  • bcdedit /set {GUID} osdevice vhd=[c:]\NanoServer\NanoServer.vhd

  • bcdedit /set {GUID} path \windows\system32\boot\winload.exe

I ended up with a dual boot machine. (in case i need a gui in my lab…. lol)

DSC_5557

To add Nano Server to a domain online

Now that the Nano server is installed booted and ready to go.  we need to make it part or our domain.  so first we need to harvest a data blob from a computer in the domain that is already running Windows Threshold Server using this command:

djoin.exe /provision /domain DEMO /machine Nano-Srv1 /savefile .\odjblob

This saves the data blob in a file called “odjblob”.

2- Copy the “odjblob” file to the Nano Server computer with these commands:

net use z: \\192.168.50.59\c$

md z:\Temp

copy odjblob z:\Temp

image

3- Open an elevated command prompt, start Windows PowerShell and then connect to the Nano Server computer with Windows PowerShell remoting with these commands:

Set-Item WSMan:\localhost\Client\TrustedHosts "192.168.50.59"

$ip = "192.168.50.59"

Enter-PSSession -ComputerName $ip -Credential $ip\Administrator

When prompted, provide the Administrator password, then run this command to join the domain:

image

run the following command in the remote session to join the server:

djoin /requestodj /loadfile c:\Temp\odjblob /windowspath c:\windows /localos

image

4- Restart the Nano Server computer, and then exist the Windows PowerShell session:

shutdown /r /t 0

Exit-PSSession

After you have joined Nano Server to a domain, add the domain user account to the Administrators group on the Nano Server

Manage a Nano Server

Starting with Windows Server 2016 Technical Preview, Nano Server includes an Emergency Management Console that ensures you can access your Nano Server even if you had trouble catching the IP address using DHCP or if the network configuration interferes with connecting to the Nano Server.

When you boot Nano Server in either a virtual machine or on a physical computer that has a monitor and keyboard attached, you'll see a full-screen, text-mode logon prompt.

DSC_5556

Log into this prompt with an administrator account to see the computer name and IP address of the Nano Server. You can use these commands to navigate in this console:

  • Use arrow keys to scroll

  • Use TAB to move to any text that starts with > ; then press ENTER to select.

  • To go back one screen or page, press ESC. If you're on the home page, pressing ESC will log you off.

  • Some screens have additional capabilities displayed on the last line of the screen. For example, if you explore a network adapter, F4 will disable the network adapter.

DSC_5558

To manage the role that we installed on it we need to use a server with the same level of OS installed.  In my case i have a full server with all the management tools installed.  From there you can use the management tools or PowerShell to manage this server. You may have to edit the firewall rules to allow remote management.  we’ll see that in the next post.  Now i need to get to bed.

Cheers!

Signature

Pierre Roman
@pierreroman