Windows Server 2016

Windows Server 2016 Containers Basic Setup

If you would like to lab and play around with containers, there is a really great setup script and a few easy steps you can follow to get a copy of Windows Server 2016 TP 4 setup with containers working.  First things first you will need to spin up Windows Server 2016 TP4 in your favorite hypervisor.  I am using VMware Workstation 12 Pro which works great with Server 2016.  After you have the OS installed and everything up and running along with Internet connectivity, we can use powershell to pull down a setup script that will do the heavy lifting for us to get containers setup and running.

wget -uri https://aka.ms/setupcontainers -OutFile C:ContainerSetup.ps1

The above of course will download the ContainerSetup.ps1 script.  Next, we need to run the containersetup.ps1 file.

C:ContainerSetup.ps1

containers01

containers02

The setup containersetup process above will start the setup and install process of the containers Windows feature.  Your server will reboot.  Setup will resume once the server has restarted.  Container networking is enabled along with the container switch, NAT, etc.

containers03

The step below will pull down the Windows Server Core container image.  This step will take a bit of time depending on your connection speed.

containers04

The script continues along – docker is installed and the script will finally complete.

containers05

containers06

Starting the Container

After you have run the setup script and it completes successfully, you can now start the container.

$container = New-Container -Name "TestContainer" -ContainerImageName WindowsServerCore

Start-Container -Name "TestContainer"

Now we can enter a powershell session to the running container:

Enter-PSSession -ContainerId $container.ContainerId -RunAsAdministrator

We can verify now that we have a subset of processes running in the container as opposed to our host OS:

Host:

containers11

Container OS:

containers10

As you can see the difference between the processes that show to be running in the container are definitely stripped down compared to our host processes.

Files and Storage

As far as where things are stored, we see a lot of the Hyper-V default storage locations being utilized with the containers technology as well as their DNA is very similar.

C:ProgramDataMicrosoftWindowsImages – This is the location where the Windows Server Core container image was located.  It weighed in at around 9GB.

C:ProgramDataMicrosoftWindowsHyper-V – This appears to house most of the container metadata and other container specific information.

containers12

Final Thoughts

Containers are basically like virtualization 2.0.  We will definitely see a tremendous amount of development around this super cool technology.  Hardware virtualization may become more of the old school way of doing things once container technology matures in the near future.  More to come on containers in future posts….stay tuned!

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.