Configuring Virtual Switches in Hyper-V 2019

In the last few articles, we talked about Hyper-V 2019, and walked you through the procedure of installation, initial configuration, and deployment of your first virtual machine. In case you have missed these articles, you can check them on the following links:

Part 1: Install Hyper-V 2019 Server Core
Part 2: Hyper-V 2019 Core Server – Initial Configuration
Part 3: Hyper-V 2019 Core Remote Management
Part 4: Create Your First Virtual Machine in Hyper-V 2019
Part 5: Export and Import Virtual Machine in Hyper-V 2019

In this article, we will explain to you how to configure virtual network cards on your virtual machines.  In the first place, we should define what kind of communication is required by virtual machines. Are we talking about communication between virtual machines, virtual machine and the host or virtual machine and the rest of the network? In order to understand it easier, we will create a scenario. Imagine that we have SQL Database that is running on Windows Server 2019 and we would need to make it available and accessible whenever clients from the local area network would like to reach it to write or read queries. In that case, we have to create a virtual network card that will allow the virtual machine to be in the same network as all other network hosts.

  1. Open Hyper-V Manager
  2. Select the virtual machine. In our case, it is Windows Server 2019. We don’t need to shut down the virtual machine.
  3. On the left side click on Virtual Switch Manager…Under Create virtual switch we can there are three available virtual switches including External, Internal and Private. So what is the difference between them? The External switch will provide communication between the virtual machine and the rest of the network. That is something that we would need to configure in our scenario. An internal network switch will provide communication between the virtual machine and the host (Hyper-V 2019 Server). If you would like to make communication only between two or more virtual machines, you will need to use a Private virtual switch.
  4. Select External virtual switch and then click on Create Virtual Switch
  5. Type the name for the virtual switch and if needed write the notes. In our case the name of an external virtual switch is LAN and Note is Communication between virtual machine and rest of the network.
  6. Under the External network, choose the physical network card that you would like to bind with the virtual network card. In our case, we will choose Intel (R) Wi-Fi 6 AX100 1600MHz network card. Please note this is a server for testing purposes.
  7. Click Apply
  8. On the next window under Pending changes may disrupt network connectivity, click OK to confirm creating an external card
  9. Wait until changes are applied.
  10. Confirm by clicking on OK
  11. In the next step, we will need to assign previously created external network switch to the virtual machine. Right click on the virtual machine and then Settings.
  12. On the left side of the window click Network Adapter
  13. Under the Virtual switch select the network card that is previously created. In our case it is LAN.
  14. Click Apply and then OK.
  15. Congratulations. You have successfully created and assigned virtual switch to your virtual machine.

If you are running DHCP (Dynamic Host Configuration Protocol) in your network, it will automatically assign an IP address to your virtual network adapter. If you don’t have DHCP and you are using static addressing in the network, please assign the appropriate static IP address that is accessible through the same network as other hosts.

ABOUT THE AUTHOR

Jasmin Kahriman


Jasmin is a tech-savvy Systems Engineer with over 15 years of experience in IT infrastructure, holding multiple IT certifications including CNIP, MTA, MCP, MCSA, MCT, Server+, and Network+.