Latest posts by Brandon Lee (see all)
- Importing PST files to Office 365 with LAE Software PST Migrator - Thu, Mar 26 2020
- AdRemSoftware WMI Tester: Testing WMI connectivity - Tue, Mar 24 2020
- VMware vSphere 7: New features - Thu, Mar 19 2020
In a previous post, we examined the elusive Nano Server role in Windows Server 2019. The role has certainly changed between Windows Server 2016 and Windows Server 2019. In the evolution of the Nano Server role, Microsoft has positioned Nano Server as a "containers only" role that provides an ultra-thin platform for running containerized workloads on top of a Windows Server 2019 host.
Today, we will take a look at installing Nano Server 2019 and see how the Nano Server role in Windows Server 2019 is installed and configured for use with containerized workloads. We will look at the requirements, installation, and configuration.
Prerequisites for installing Nano Server 2019 ^
Standalone installation of Nano Server 2019 can no longer be performed onto bare metal or into a virtual machine, as was possible with Windows Server 2016. It must now run inside a container that is supported by Microsoft in Windows Server 2019. This means there are a few prerequisites that must be considered when you install Nano Server 2019 for serving out production workloads, including installing and running containers on top of Windows Server 2019. What are these prerequisites?
At a very basic level, you need the following to install Nano Server 2019 as a container on a Windows Server container host:
- Windows Server host – Server 2016, 2019, or one of the semi-channel releases
- Hyper-V if you want Hyper-V isolation
- Compatible hardware for virtualization (CPUs with virtualization technology, etc.)
Windows Server 2019 container host preparation ^
In the following installation of Nano Server 2019, I already have a Windows Server 2019 host up and running, fully patched, etc. In addition, the host has been loaded with the following:
- Nuget Provider
- Hyper-V role
- Housecleaning tasks – including reboot
As a sanity check, it is a good idea to check your Docker version and run a few other Docker commands to ensure your installation is up and running as expected. You can run a simple Docker command, such as:
docker version; docker info
This will display the version of Docker you are running on your Windows Server 2019 host.
If it has been a while since you installed Docker, you may want to make sure you are running the latest version of Docker. To find the latest available version of Docker for installation, run the following command:
Find-Package -Name Docker -ProviderName DockerMSFTProvider
To update Docker to the latest version available, run the following command:
Install-Package -Name Docker -ProviderName DockerMSFTProvider -Update -Force
Due to the nature of containers, they are much more ephemeral than virtual machines. Keeping your container infrastructure updated should allow you to run with the latest and greatest features in your production, development, and test environments.
Installing Nano Server 2019 ^
Now that we have Docker installed, configured, and updated (if needed) on a Windows Server 2019 container host, we are ready to install Nano Server 2019 using a base container image. The "installation" process for Nano Server 2019 is not the typical "boot from ISO" process to run a normal Windows installer.
Since Nano Server is no longer supported as a full standalone installation, as it was in Windows Server 2016, it is installed as a container image. This means that you pull the Nano Server container image from the Microsoft Container Registry (MCR).
Search Microsoft Container registry for Nano Server
You may wonder how to see which Nano Server images are available for pulling to your Windows Server 2019 container host. You can search the Microsoft Container Registry using a built-in Docker command:
docker search nanoserver
The search command returns all the available Nano Server container images that are available to pull down from the Microsoft Container Registry. By default, these are listed in order by the number of stars given to the download. So basically, you are seeing the rating given to the image.
There are two in particular that most will want to pay attention to. These are:
- Official Nano Server base image
- Official Nano Server insider base image
These official images are published by Microsoft. The base image is the current stable release of the Nano Server image that is for general consumption. The insider base image is the preview release that contains all the newest features and functionality; however, this image is not meant for production use like the preview builds that can be downloaded for Windows Server and Windows 10 in general.
Pulling the Nano Server 2019 image
There is a point to note about pulling a Nano Server image from the Microsoft Container Registry. The Windows container version compatibility post from Microsoft states the following:
“Because Windows Server containers and the underlying host share a single kernel, the container’s base image OS version must match that of the host. If the versions are different, the container may start, but full functionally [sic] isn't guaranteed. The Windows operating system has four levels of versioning: major, minor, build and revision.”
This means you need to match the version of the Nano Server container you are pulling with the version of Windows Server 2019 you are running on your container host. Microsoft has also deprecated the latest tag for pulling container images. You have to specify the version explicitly.
Since I am running the GA version of Windows Server 2019 (version 1809), I will specify this as the version of Nano Server to pull down as a container image.
docker pull mcr.microsoft.com/windows/nanoserver:1809
When you pull down a container image, it is extracted by default in Windows Server 2019 in the following directory:
Running Nano Server 2019
Once you have pulled the Nano Server 2019 image from the MCR, you can spin up a Nano Server 2019 container quickly with the following command:
docker run -it mcr.microsoft.com/windows/nanoserver:1809
The Nano Server 2019 container will spin up almost instantly. Using the "-it" switch, the Nano Server will launch with an interactive cmd prompt session.
Concluding thoughts ^
Installing Nano Server 2019 has changed quite a bit between Windows Server 2016 and Windows Server 2019. Now, with Nano Server 2019, this version of Windows Server is a "container only" image. As shown, the process to step through searching the Microsoft Container Registry, pull a Nano Server image, and spin up a Nano Server 2019 container is straightforward and easy to accomplish.