Building your first Nano Server

Building on the idea of Server Core, Nano Server is a brand new capability in Windows Server 2016 that enables you to create some incredibly small servers. The interface is almost truly headless, meaning that the majority of administration on these servers is going to be done remotely. We will discuss management in just a few minutes with the final recipes in this chapter, but the first thing you need to do in order to start working with Nano Server is to build a Nano Server! Putting together your first Server Core or full Desktop Experience machine is as simple as choosing the correct option from the installation DVD, but the process to build a Nano Server is quite different. Let's walk through the steps together to get you started.

Getting ready

Today we are trying to spin up a virtual machine that is running Nano Server 2016. Since there is no installation option for Nano Server on the Windows Server 2016 installation DVD, we will figure out together how to implement this new version of the operating system.

How to do it…

Rather than run through a traditional installation wizard, in order to spin up our first Nano Server we will be taking a few steps to build out a VHD file. This virtual hard disk will be compiled with all the data that it needs to be a Nano Server, and afterwards we can simply boot our new VHD as a virtual machine on any Hyper-V platform. Follow these steps to do it yourself:

  1. Copy the Windows Server 2016 installation media onto your computer as an ISO file. Then go ahead and mount this ISO to your computer, which assigns it a drive letter. For example, I downloaded the ISO to my computer and simply double-clicked on it, and now I have a new D: drive on my computer that shows me the data contained within that ISO.

    How to do it…
  2. You can see there is a folder in the installer called NanoServer. Copy this folder and place it into the C: drive of your computer. You now have a C:NanoServer folder on your machine that contains all the parts and pieces that Nano needs in order to build a VHD file.
  3. Now open up an administrative PowerShell session.
  4. Import the Generator script into the PowerShell session with the following command: Import-Module -Name C:NanoServerNanoServerImageGeneratorNanoServerImageGenerator.psm1 -Verbose.

    How to do it…

  5. Next we run a single command to build out our VHD file. There are many different ways that this command can be run, with various switches and parameters that can change the outcome of your generated file. I am going to implement a pretty basic standard install of Nano Server to start experimenting with it. Use the following command to output a Nano Server virtual hard disk:
          New-NanoServerImage -MediaPath D: -DeploymentType Guest -Edition
          Standard
          -TargetPath C:NanoServerNANO1.vhd -ComputerName NANO1
    
  6. Some of the variables used here are pretty self-explanatory. I need to specify the path of my Windows Server 2016 installation files, which is my D drive, and I need to specify an output location for my new VHD file that is being created. I also have the opportunity right here in the command to give my new Nano Server a hostname, for which I specified NANO1. The last switch I included here was an Edition, and I chose Standard. If you needed a Nano Server running the Datacenter SKU, you could specify that information right in the command. The item here that is not as self-explanatory is the DeploymentType variable. For this you can specify either Guest or Host. Your decision here depends upon whether you want this Nano server to be running as a virtual machine, or on a physical host server. Most often we will be specifying Guest for this option.
  7. After pressing Enter on the command, you are asked to specify a local administrator password for this new server, and then PowerShell will sit and work for a minute while it compiles and builds your new VHD.

    How to do it…

  8. Once finished, you will see inside your C:NanoServer folder that a brand new NANO1.VHD file exists. Next, simply create a new VM inside Hyper-V just like you would for any other server, and specify this new VHD as the hard disk for your virtual machine.
  9. Boot up the server and you will be sitting at an unfamiliar console, which is your entrance into the world of Nano Server.

    How to do it…

How it works…

In this recipe, we learned how to use PowerShell in order to create a virtual hard disk on our computers, which can then be used to boot into a new instance of Nano Server. This is the first step you will need to take in order to start working with Nano Server and get one up-and-running so that you can start exploring inside the interface. Now that we have a Nano Server running, continue on with this chapter to look further into the administration and management of these servers. You may need to adjust your thinking a little bit as we start figuring out that remote management is a key part in the way that Nano Server works.

See also

If PowerShell isn't your thing, you are not alone, and Microsoft recognizes this. While we should all be striving to become more comfortable with using PowerShell on a daily basis, graphical tools still rule most datacenters. Just released is a new tool that will help you create Nano VHD files, by using your good old color monitor and mouse.

Nano Server Image Builder

Use the Nano Server Image Builder tool in order to create these Nano servers, or even to create a bootable USB installer for placing Nano Server onto physical hardware! Rather than having to explore and remember all of the switches that accompany the New-NanoServerImage cmdlet in PowerShell, you can now run this simple graphical tool and walk through a few wizards in order to spin out your new Nano. From what I've seen, the nicest feature of this image builder is the ability to choose which roles will exist on your new Nano server by using check-boxes, just like when you are choosing which roles you want to install on your Server 2016 running full Desktop Experience. For anyone who will be working with Nano Server, this tool is definitely something you are going to want to check out!

Here is a link to some additional information: https://blogs.technet.microsoft.com/nanoserver/2016/10/15/introducing-the-nano-server-image-builder/. Here is a download link so you can try it for yourself: https://www.microsoft.com/en-us/download/details.aspx?id=54065.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.104.23