Nutanix, Hyper-V, and Logical Switches

In this post we will cover Hyper-V logical Switch Configuration and adding hosts to the Logical Switch.

Requirements:

-2012 R2
-SCVMM 2012 R2 managing the hosts

Logical Switch Configuration

Logical Network Configuration

You can either use an existing logical network (I use ExternalSwitch in this example) or create a new one just for your logical switch.

Create the Network Site

Fabric -> Networking -> Logical Networks -> Properties

Create a network site and add the VLANs and subnets.  You will need to put each VLAN in here that you want VMs to use.

Create an IP Pool

You only need to do this for the infrastructure.  You will use these to assign temporary static addresses.  If you have DHCP on your infrastructure VLAN you won't need this, but this guide assumes that you do not.


Choose the correct logical network and name the IP Pool 


Select the site you created in the last step and the correct subnet. Fill out the rest of the wizard according to your network.


Uplink Configuration

Fabric -> Networking -> Port Profiles -> Create Hyper-V Port Profile

Since we are making an uplink port-profile select that radio button.

What should I choose for Load Balancing Algorithm and Teaming mode?

Load Balancing Algorithm is a tricky subject, as each one will perform better depending on the load.  A good default is "Hyper-V Port" which means that all traffic out of that VM will use the same uplink

Teaming Mode on the other hand is easier.  There are 3 modes:
Switch Independent - Use this if you connect to switches upstream without a port-channel
Switch Dependent - Use this if your upstream switches are stacked or support vPC (or MLAG) and use that technology
LACP - Use this if you want to negotiate the port-channel using LACP.

The two standard configurations would be:

Hyper-V Port -- Switch Independent.  Upstream configuration would be standard trunk ports.
Address Hash -- LACP.   Upstream configuration would be vPC/mLAG

Select your network Site.  Make sure to use the correct Logical Network

Now that we've created our uplink PP, we need to create the logical switch.

Creating the Logical Switch

Fabric -> Networking -> Logical Switches -> Create Logical Switch

The first couple of pages are just the name and extensions.  On this page choose Uplink Mode "team" and add the port-profile you created in the previous step.

Once you have this completed, you can add hosts to the basic switch we've created.

Adding hosts to the Logical Switch

Now that we have all the SCVMM constructs created, we can add hosts.  Here's the procedure we will follow:

1) Remove one NIC from the network team
2) Add this NIC to the Logical Switch.
3) Create a temporary vEth on the Logical Switch for Hyper-V
4) Move all VMs over (including the CVM)
5) Remove the Standard "External Switch" from Hyper-V (leave Internal Switch alone!)
6) Create a new vEth on the Logical Swtich, give this the IP from ExternalSwitch (so that it matches what it was before, otherwise genesis will have problems)
7) Delete the temp adapter
8) Delete the NIC Team and move the second interface over to the Logical Switch

After this you will be running fully on the n1k!  Let's break this down step by step

Using your favorite tool, remove one of the 10gb interfaces from the team.  This particular one is from Right-Clicking on the Server in Server manager and choosing "Configure NIC Teaming"

Right-click on the host you are moving and go to virtual switches.  Create a new logical switch

Add the adapter you removed from the team and assign it the uplink you created.  If you don't see the uplink here, make sure you have configured the logical switch for the uplink under "Fabric" and that you are using the correct Logical Switch

Add a temporary adapter to the logical switch and put it in the appropriate VM Network.  Choose "Static" or "DHCP" according to your network (if you use static the pool that you created above will show up here).  Make sure you can reach the host at this address (Ping, RDP, etc.)

Now you can move the CVMs over.  Right-click on the VM and move it from "Standard" to "Logical" switch.  Verify the cluster can reach the CVM as up before continuing.  Repeat for each VM on the host.  

I've combined a few steps here.  At this point you can Delete the Standard ExternalSwitch.  After that, Delete the NIC team.  Finally come back in here and add the second Ethernet interface to the Logical Switch.  You will need to issue flush the DNS cache on the SCVMM server to reconnect the host (ipconfig /flushdns)



After that, create a new Virtual Network Adapter, name it "ExternalSwitch" and configure it with the IP that it had before.  Don't use a different IP or Genesis will not be able to start.  

Once you have verified connectivity through this second interface you can delete the TempManagement adapter.  Remember to ipconfig /flushdns to reconnect.

Repeat for each host.  Once this is finished, congratulations!  You're running Nutanix on the Logical Switch!