Adding a second (and third) management OS adapter to a Virtual Switch

I was working on a Hyper-V server the other day – and decided that I wanted to connect it to a set of virtual machines that I had been working with.  Unfortunately, I had configured the virtual machines with multiple network interfaces on multiple separate subnets – and my host only had one physical network adapter.

Fortunately – it is very easy to add extra virtual network adapters to the management operating system if you have Hyper-V with a virtual switch configured.  Quickly, I opened a PowerShell window and ran this command twice:

Add-VMNetworkAdapter –ManagementOS –SwitchName “Virtual Switch”

You see, normally when you create a virtual switch we automatically create one virtual network adapter for the management OS and connect it to the switch for you.  But there is nothing to stop you from adding extra virtual network adapters for different reasons.

After creating the two new adapters – and using the UI to configure them – I was able to ping the virtual machines on the different subnets with no problems:

image

You should be aware that if you do this – you cannot configure the switch through the UI and have to use PowerShell:

image

Cheers,
Ben

Comments

  • Anonymous
    February 09, 2015
    Good to learn about the option, but in this particular case is there a benefit of using multiple virtual network adapters each with a single IP address over using a single virtual network adapter with multiple IP addresses?

  • Anonymous
    February 09, 2015
    nc101 - True, but you can also do things like have different VLANs on the different interfaces with this approach.

    • Anonymous
      December 08, 2017
      Ben, can you explain how to add different VLANs to the additional NICs?