Install Nano Server in Microsoft Azure

Posted on December 23, 2015 by Russell Smith in Windows Server 2016 with 0 Comments

In today’s Ask the Admin, I’ll show you how to install Nano Server in Windows Server 2016 Technical Preview 4 in Microsoft Azure. I’ll also walk you through on how to connect to the server using PowerShell Remoting from a local management PC.

Microsoft released the latest preview of Windows Server 2016 at the beginning of November, and as part of that preview is the Nano install option, designed for running apps and micro services in the cloud. For more information on Nano, see Windows Nano Server on the Petri IT Knowledgebase.

The easiest way to get up and running with Nano is to install it in an Azure virtual machine. To do that, you’ll need to set up an Azure subscription. If you haven’t done so already, you can sign up for a free trial.

Installing Nano Server in Azure

Let’s start by deploying Nano in a new Azure VM.

  • Log in to the Azure management portal, and sign in with the Microsoft account associated with your Azure subscription.
  • Click + NEW in the bottom left of the portal window.
  • Make sure that COMPUTE is selected in the pop-up panel, and then click VIRTUAL MACHINE in the second column.
Deploy Windows Server 2016 TP4 Nano in an Azure VM (Image Credit: Russell Smith)

Deploy Windows Server 2016 TP4 Nano in an Azure VM (Image Credit: Russell Smith)

  • In the third column, click FROM GALLERY.
  • In the CREATE A VIRTUAL MACHINE dialog, scroll down the list of featured VMs and select Windows Server Nano 2016 Tech Preview 4 from the list, and then click the next arrow.
  • On the Virtual machine configuration screen, give the new VM a name in the VIRTUAL MACHINE NAME field.
  • For the purposes of this demo, I’m going to install a small VM to keep costs down, so I’ve selected the BASIC tier and A1 VM size, in the TIER and SIZE options respectively.
  • Finally, type a username for the administrator account in the NEW USER NAME field, and then type and confirm a password.
  • Once you’re done, click the next arrow.
Deploy Windows Server 2016 TP4 Nano in an Azure VM (Image Credit: Russell Smith)

Deploy Windows Server 2016 TP4 Nano in an Azure VM (Image Credit: Russell Smith)

  • On the Virtual machine configuration screen, accept the default settings and click the next arrow.

If the cloud service name that’s automatically generated is already taken, you may need to type a different name in the CLOUD SERVICE DNS NAME field. Cloud service names must be globally unique in Azure. Additionally, you can change the region if required.

Deploy Windows Server 2016 TP4 Nano in an Azure VM (Image Credit: Russell Smith)

Deploy Windows Server 2016 TP4 Nano in an Azure VM (Image Credit: Russell Smith)

  • On the final Virtual machine configuration screen, accept the default agent and extension settings, and click the finish icon.
Sponsored

You’ll now need to wait a few minutes while the new VM is provisioned. To check the status of the new VM, click VIRTUAL MACHINES in the list of options on the far left of the management console. Once the VM is ready for use, its status should change to RUNNING.

Connect to Nano using PowerShell Remoting

You won’t be able to connect to your new VM using Remote Desktop because Nano doesn’t support the terminal services role, but Nano does support PowerShell Remoting. Before you can run the PowerShell cmdlets below, you’ll need to install the Azure PowerShell module and set up a secure connection to your PowerShell subscription. For more information on the necessary configuration steps, see Setup Windows Azure PowerShell Management on Petri.

On your local management machine, open a PowerShell prompt with administrator privileges and run the WinRM commands below to add the new Azure VM to the WinRM TrustedHosts lists. This is required for authentication if the VM and management PC are not joined to the same domain. You’ll need to replace nanopetri.cloudapp.net with the DNS name of your Azure VM, which can be found in the management portal on the VM’s dashboard page.

Configure the WinRM TrustedHosts lists on the management PC (Image Credit: Russell Smith)

Configure the WinRM TrustedHosts lists on the management PC (Image Credit: Russell Smith)

You can check that the VM was added to TrustedHosts by running the command below:

In my TrustedHosts list you can see two entries, one of which is for a local Hyper-V VM that I use for testing.

Close the elevated PowerShell prompt and open a PowerShell ISE window. Copy the code below into the script pane. If the script pane is not visible, you can enable it by pressing CTRL+R. You’ll need to replace the values for the variables $serviceName, $vmName, and $subName as appropriate for your Nano VM and Azure subscription, where $serviceName is the name of the cloud service where the Azure VM is deployed, $vmName the name of the Azure Nano VM, and $subName the name of your Azure subscription. Information about the Azure VM can be found in the management portal on the VM’s dashboard.

Run the above code in the Windows PowerShell ISE by pressing F5. If prompted to confirm the installation of the certificate, click OK in the prompt. When the credentials dialog appears, type the name of the local administrator account and password that you specified for the Nano VM earlier, and then click OK.

Install the VM's WinRM certificate and establish a PowerShell Remoting session to Nano (Image Credit: Russell Smith)

Install the VM’s WinRM certificate and establish a PowerShell Remoting session to Nano (Image Credit: Russell Smith)

Sponsored

After a few seconds, the remote PowerShell session should authenticate and you’ll see the prompt change in the output pane to indicate that you are now connected remotely to Nano. You can quit the PowerShell Remoting session by typing exit and pressing ENTER.

Sponsored

Tagged with , ,