How To Convert #HyperV Virtual Switch to Logical Switch With SCVMM 2016 #SCVMM #VMM

Introduction

A while ago, I wrote a blog post on How to Migrate from Hyper-V Virtual Switch to Logical Switch using System Center Virtual Machine Manager 2012 R2.

This was documented based on SCVMM 2012 R2 and covered the following two key scenarios:

  • Scenario 1: Migration Plan from Standard Switch to Logical Switch in Hyper-V Cluster Host.
  • Scenario 2: Migration Plan from Standard Switch to Logical Switch in Hyper-V Standalone Host.

Scenario 1 does NOT requires downtime, however, scenario 2 does!

Microsoft listened to our feedback and in System Center Virtual Machine Manager 2016, the VMM team added this functionality so you can now convert any existing Hyper-V virtual switch to logical switch on the fly without any downtime for both scenarios described above.

Convert-VSwitch-LSwitch-VMM02

This is very useful if you are adding an existing Hyper-V host or cluster into VMM and you need to leverage the logical switch capabilities.

In this blog post, I will share with you my experience on converting a production Hyper-V host from standard virtual switch to logical switch.

Document Your Exiting Hyper-V Virtual Switch Settings

In the first step, we need to document the existing Hyper-V virtual switch settings as follows:

The SR-IOV setting (enabled or disabled) must be the same in the logical switch as it is in the standard virtual switch. In this example, I am not using SR-IOV.

Convert-VSwitch-LSwitch-VMM03

If you are using SR-IOV, then you need to make sure to enable it in VMM logical switch itself, and in at least one virtual network adapter port profile within the logical switch.

Check the bandwidth and reservation mode you are using (weight or absolute) including the minimum bandwidth percentage. In this example, I am using bandwidth reservation mode “Weight” and the minimum percentage is 30%.

Convert-VSwitch-LSwitch-VMM04

If you are using Hyper-V Converged Networking, then you need to document all the vNICs on the host. In this example, I am using converged network.

Convert-VSwitch-LSwitch-VMM05

You need to note the bandwidth percentage for each vNIC on the host.

Convert-VSwitch-LSwitch-VMM06

You need also to note the VLANs for each vNIC.

Convert-VSwitch-LSwitch-VMM07

The Teaming mode on the host must match the teaming setting in VMM logical switch Uplink Port Profile. In this example, I am using Switch Independent teaming mode and Dynamic load balancing on the host.

Convert-VSwitch-LSwitch-VMM09

Finally, the VMM logical switch must be configured for the correct Network Sites (host group in VMM) to match the correct logical network for the Hyper-V host that you are converting.

If the settings in VMM logical switch that you have don’t match all the settings as described above, then you want to update or create a new logical switch that does match. If not, then the button Convert to Logical Switch… won’t illuminate whatsoever!

Convert-VSwitch-LSwitch-VMM08

Convert Hyper-V Host to use VMM Logical Switch

In this example, I am using the following virtual ports for my VMM logical switch. The total bandwidth for all virtual ports are as follows:

  • DC Live Migration 01 = 15%
  • DC Live Migration 02 = 15 %
  • Host management = 5%
  • Host management DC = 5%
  • Hyper-V Backup Workload = 15%
  • Hyper-V Replica Workload = 15%
  • Medium bandwidth for VM traffic = 30%

The total weight bandwidth for the logical switch is 100% which match my Hyper-V host settings.

Convert-VSwitch-LSwitch-VMM10

The Uplink Port profile and the Network Site also match my host settings including all the VLANs.

Convert-VSwitch-LSwitch-VMM11

Once you update your Logical Switch in VMM to match your existing host, you need to refresh the host and wait for the job to complete in VMM.

Then go to the Virtual Switches properties for that host and click Convert to Logical Switch…

Convert-VSwitch-LSwitch-VMM12

Click and confirm Convert to Logical Switch… and wait for the magic to happens in the background. Please note that the conversion will NOT interrupt network traffic.

Convert-VSwitch-LSwitch-VMM14

You can also view the job in the VMM 2016 Jobs view to check if the conversion is completed successfully.

If any operation in the conversion fails, no settings will be changed, and the switch will NOT be converted.

Convert-VSwitch-LSwitch-VMM15

Finally, open the Virtual Switches properties for the targeted host and confirm the changes!

Convert-VSwitch-LSwitch-VMM13

Hope that helps.

Happy Switching!
-Ch@rbel

About Charbel Nemnom 313 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