Running HYPER-V Containers in Windows 2016

Running HYPER-V Containers in Windows 2016

Hyper-V container in windows 2016

In this blog, we show you how to create a hyper-V container windows 2016.

 

REQUIREMENTS

  • Need to install Hyper-V role on the server.

Note : We are using the nested VM for this demonstration purpose.

 

CONFIGURE THE NESTED VM

Please follow the below blog to configure the nested virtualization for a VM.

https://www.assistanz.com/nested-virtualization-windows-2016/

 

INSTALLING HYPER-V ROLE

 

  • Click on start menu and select server manager.

hyper-V container windows 2016

 

  • Click on Add roles and features option.

hyper-V container windows 2016

 

  • From the welcome screen, Click Next.

hyper-V container windows 2016

 

  • Need to select Role-based or feature-based installation option and click Next.

hyper-V container windows 2016

 

  • Select the server and click Next.

hyper-V container windows 2016

 

  • Select the Hyper-V role and click Next.

hyper-V container windows 2016

 

  • Don’t select any components in this screen. Click Next.

hyper-V container windows 2016

 

  • Select the network adapter for Hyper-V VM’s and click Next.

hyper-V container windows 2016

 

  • We can configure the virtual machine migration later. Click Next.

hyper-V container windows 2016

 

  • Specify the default store for VM files. Click Next.

hyper-V container windows 2016

 

  • Click Install button to install the Hyper-V Role on the server.

hyper-V container windows 2016

SERVER REBOOT

  • Restart the server to complete the installation.

hyper-V container windows 2016

 

CREATING WINDOWS CONTAINER IN DETACH MODE

  • To create a windows container in detach mode, type the following command.

Syntax: docker run -d –name <name for the container> <container image name> <executing the command>

Example: docker run -d –name srv01 microsoft/nanoserver ping 127.0.0.1

hyper-V container windows 2016

 

 

CREATING HYPER-V CONTAINER IN DETACH MODE

  • To create hyper-V container, type the following command.

Syntax: docker run -d –name <name for the container> –isolation=hyperv <container image name> <executing the command>

Example: docker run -d –name srv02  –isolation=hyperv microsoft/nanoserver ping 127.0.0.1 -t

hyper-V container windows 2016

 

Note: It will take little bit of extra time while creating hyper-V containers when comparing to windows containers

 

DIFFERENCE BETWEEN WINDOWS CONTAINER AND HYPER-V CONTAINER

Windows containers are sharing the container host kernel. Hyper-V containers are having their own kernel as its own virtual machine. If we run docker ps we can see both the containers and there is no difference in it.

 

hyper-V container windows 2016

 

INSPECTING THE WINDOWS CONTAINER

  • Run the below command to inspect the first container srv01.

docker inspect srv01

 

hyper-V container windows 2016

 

It displays the JSON data related to srv01 container. In that data, we can find the isolation type for this container.

hyper-V container windows 2016

This was created as windows container using process isolation method.  This container is sharing the kernel with the host operating system.

 

INSPECTING THE HYPER-V CONTAINER

 

  • Run the below command to inspect the second container srv02

docker inspect srv02

 

It displays the JSON data related to srv02 container. In that data, we can find the isolation type for this container.

 

hyper-V container windows 2016

 

It created as Hyper-V container so it’s using its own kernel inside the virtual machine.  It will create virtual machine internally for this container and we will not see it in the hyper-V console.

hyper-V container windows 2016

 

FORMATTING INSPECT COMMAND

We can filter the data from the JSON file using –f option in the docker command.

  • To filter the isolation type for a container, type the below command.

Syntax: docker inspect -f “{{.HostConfig.Isolation}}” <container name> or <container ID>

Example: docker inspect -f “{{.HostConfig.Isolation}}” srv01

 

hyper-V container windows 2016

 

VIDEO

 

Thanks for reading this blog. We hope it was useful for you to learn how to create hyper-V container in windows 2016.

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn
More Interested Related Posts
zfs pool usage

ZFS Pool and Dataset Usage

ZFS Pool and Dataset Usage   I am back with another blog to provide the useful script to the Freebsd users to determine the zpool

Assistanz Networks

Installing Zabbix Agent in FreeBSD 12.0

Zabbix Agent Installation and Configuration Guide on FreeBSD 12.0   Zabbix is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual

DirectAdmin Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk
$ 99 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • NDA & SLA
  • SLA Review Meetings
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation
  •  

Platinum Support

24/7 Proactive Support
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Support

$ 30 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response Time
  • 4 Hours Resolution time for the Possible Issues
  • Security and Performance Optimization
  • React to Customers queries
  • Simple SignUp Process
  • Instant Account Activation
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support