Step By Step: Running Hyper-V Cluster On #Nano From Windows Server 2016 TP4 Using PowerShell Direct #HyperV

[Updated: December 6th, 2015 – Nano Server 2016 Technical Preview 4 support]

Nano Server is a new installation option in Windows Server 2016 built for the cloud. It has been announced by Microsoft in April 2015 and is going to be shipped with Windows Server 2016 next year.

What makes Nano Server very special?

  • A very small disk footprint compared to traditional Windows Server deployments (500 MB instead of multiple GB).
  • A very limited attack surface.
  • A very limited number of components, which means fewer updates and fewer reboots.
  • Much faster deployment on virtual and bare-metal due to the reduced footprint.

How is this possible?

In short, the OS has been stripped from everything that is not needed in a cloud environment, in particular the UI stack, the x86 subsystem (WOW64), MSI installer support and unnecessary API.

Windows Server and System Center 2016 TP4 is publicly available now, and one of the key scenarios that’s available in Technical Preview 4 is the following:

  • Nano Server (Enhanced in TP4 – Covered in this post).
  • Windows Server Containers (Covered here), and Hyper-V Containers.
  • Storage Spaces Direct (Enhanced in TP4 – Covered in the next post).
  • Switch Embedded Teaming (Covered here).

There are a number of changes and enhancement in TP4 builds. The first one is renaming the Emergency Management Console (EMC) to Nano Server Recovery Console, the second one is the inclusion of Windows PowerShell script module that streamline the process of creating a NanoServer Virtual Machine, and last but not least is the inclusion of additional packages (Nano Containers, DSC, IIS Server, DNS Server, MPIO, DCB, SCOM and SCVMM agent).

What is the Nano Server Recovery Console?

The purpose of the Recovery Console, is to provide direct local access to a Nano Server OS in order to re-establish remote network connectivity. Please note that it does not provide you command line access neither PowerShell access locally, however it does provide you the ability to fix whatever might be causing the remote management tool (Remote PowerShell) to no longer work.

NANO-HV-Cluster-TP3-20

In Windows Server 2016 TP4, the Nano server team have added the following capabilities that you can manage through the Nano Server Recovery Console:

  • Show computer name
  • Show domain/workgroup
  • Logon / Logoff
  • Shutdown / Restart
  • Enable / Disable NIC
  • Show IPv4 / IPv6 address
  • Show Gateway
  • Show Primary / Secondary DNS
  • Show MAC Address
  • Show network driver name
  • Show network driver version
  • Show network driver date
  • Show network driver provider
  • Set Firewall
  • Set Networking

NANO-HV-Cluster-TP4-03

You can select Networking option, and on the network settings page, this where you can list all your network cards, then you can select which NIC you want to see.

By pressing F4, you can Toggle the State (Disable / Enable) for a particular NIC.

By pressing F10, you can see the routing table, and by pressing F10 again, you can Add a static route.

By pressing F11, you can Toggle the DHCP State, and by pressing ENTER, you can set/update the NIC IPv4 address for a particular NIC.

By pressing F12, you can Toggle the DHCP State, and by pressing ENTER, you can set/update the NIC IPv6 address for a particular NIC.

NANO-HV-Cluster-TP4-09

You can select Firewall option, and on the Firewall Rules page, this where you can view all the rules, then you can select which Rule you want to see.

By pressing F4, you can Toggle the State (Disable / Enable) for a particular Firewall Rule.

NANO-HV-Cluster-TP4-04

In today’s blog post, I will share with you on how to build a Hyper-V Cluster running on Nano Server in a Hyper-V Virtual Machines using PowerShell Direct.

I want to point out that this is not supported yet (used for demo purposes only), I am using Nested Virtualization to make it happen.

All you need to do is:

1. Mount the ISO of Windows Server 2016 TP4 installation media.
2. Change to “NanoServer” directory on the TP4 installation media.
3. Import NanoServerImageGenerator.psm1 module.
4. Create a VHDX that contains the Compute, Clustering and GuestDrivers packages.
5. Create two NanoServer Virtual Machines.
6. Create and configure Hyper-V Cluster with PowerShell Direct.
7. Assume you have a Storage Spaces Direct (S2D) as backend storage for Hyper-V.

Step 1

The script to create Nano image should look something like this:

NANO-HV-Cluster-TP4-01

NANO-HV-Cluster-TP4-02

Run above script from normal PowerShell console on your Hyper-V 2016 TP4 host domain joined and not from PowerShell ISE.  

Step 2

Preparing your Hyper-V Host Server to manage and deploy NanoServer Virtual Machines

Step 3

One important point to mention that starting with Windows Server 2016 TP4, if you create NanoServer image as VHDX, you need to use Gen 2 VM, and if you create the image as VHD, then you need to use Gen 1 VM instead. I strongly recommend using Gen 2 VM. 

We will create two Gen2 Virtual Machines (NANO-HV01, NANO-HV02) and then configuring them using PowerShell Direct.

Step 4

Configure NANO-HV01 and NANO-HV02 virtual machines using PowerShell Direct.

Step 4

Create and configure Hyper-V Nano Cluster.

Here you go… Hyper-V Cluster running on NanoServer in a Nested Virtual Machines.

NANO-HV-Cluster-TP3-06

NANO-HV-Cluster-TP4-05

NANO-HV-Cluster-TP4-06

NANO-HV-Cluster-TP3-08

I believe this is a great way to deploy Hyper-V, because you will get full Hyper-V functionality with only a 500MB disk footprint instead of multiple GB, so to get up and running you can follow the directions here.

Until then… Enjoy your day!

Cheers,
~Charbel

About Charbel Nemnom 311 Articles
Charbel Nemnom is a Microsoft Cloud Consultant and Technical Evangelist, totally fan of the latest's IT platform solutions, accomplished hands-on technical professional with over 15 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize performance of mission-critical enterprise systems. Excellent communicator adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design and virtualization.

Be the first to comment

Leave a Reply