Hyper-V: add a virtual card to the host


In this tutorial, I will explain how to add a virtual adapter to the Hyper-V host that will be connected to the virtual switch.

This is equivalent to adding the same type of network adapter when configuring an external virtual switch with the Allow operating system option to share this network adapter checked.

For example, this solution enables a Hyper-V cluster to create a network card for Live Migration.

Add a physical card to the host

Open a PowerShell prompt and enter the following command

Add-VMNetworkAdapter -ManagementOS -SwitchName <Virtual-Switch> -Name "Name-Network-Adapter"


Add-VMNetworkAdapter -ManagementOS -SwitchName NicTeam1_VM -Name "LM"

The virtual network adapter 1 has been added to the host.
NIC added

Configure a VLAN

In setting up a Hyper-V cluster, network cards dedicated to Live Migration are often isolated in VLANs.

Here’s how to “tag” the card in a VLAN.

Open a PowerShell prompt and enter the following command

Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName <NIC-NAME> -Access -VlanId <ID>

Example :

Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "LM" -Access -VlanId 100

To verify that the order has been taken into account enter the following command which will display the information of the card.

Get-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName <NIC-NAME>

Example :


I also use this configuration on my work computers which has only one physical network card and allows me to have multiple virtual cards on different VLANs.

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!

Related Posts

How to install and configure Windows server routing
In this tutorial, I will explain how to set up routing with Windows Server. I regularly use this role in the different labs that I put in place under Hyper-V. I isolate the test platform with a private switch and I use a virtual machine with two netw

IPAM: Installing and Configuring IP Address Management on Windows
IP Address Manager (IPAM) is a feature built into Windows Server that allows you to set up an administrator tool and analyze DHCP scopes and have an IP address base within a computer network. In a server environment where multiple Windows DHCP server

Hyper-V: Virtual Switch with Port Aggregate – Switch Embedded Teaming (SET)
Introduction In this tutorial, we're going to have how to create a Switch Embedded Teaming virtual switch. Since Windows 2016, it is possible to directly create a virtual switch with a network card teaming. On Windows Server 2012 and Windows Server 2

Leave a Comment