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