Fix: Error Occurred Trying to Retrieve a List of Virtual Switches
Having properly configured network switches is mandatory to allow communication between virtual machines and the rest of the network. The procedure is straightforward; all you need is to open Virtual Switch Manager in Hyper-V Manager and create one of the available virtual switches, private, internal, or external. Sometimes due to the issues on the host, it is not possible to access network switches or install them. One of the errors that users end up facing is the issue with the listing of virtual switches in Hyper-V. The issue’s full message is: An error occurred while trying to retrieve a list of virtual switches in Hyper-V.
This issue can occur on Windows Server or Windows client machines where Hyper-V is installed. We will show you how to solve the problem on Windows 10 1909 that is hosting Hyper-V client.
Solution 1: Enable Protocol in Hyper-V Extensible Virtual Switch
In the first solution, we will enable the Protocol in Hyper-V Extensible Virtual Switch. The Hyper-V Extensible Virtual Switch can be accessed on your physical network card. Please choose the card that will be used as an external switch. The external switch provides communication between the virtual machine(s) and the rest of the network.
- Hold the Windows logo and press R, type inetcpl.cpl and press Enter.
- Right-click on the network card used for creating external switch and then click Properties.
- Select Hyper-V Extensible Virtual Switch and then click Install.
- Select Protocol and then click Add
- Under Select Network Protocol select Reliable Multicast Protocol and then click OK
- Click Close and reboot your Windows
- Open Virtual Switch Manager in Hyper-V and try to create external network switch
Solution 2: Create a Virtual Switch by using PowerShell
As this issue occurs when using GUI, some end users had successfully created an external switch by using the PowerShell.
- Click on Start Menu and type PowerShell. Right-click on PowerShell and then click Run as administrator
- Click Yes to confirm and type the following command to create a new external virtual switch where
New-VMSwitch -name ExternalSwitch -NetAdapterName Ethernet -AllowManagementOS $true
-name is how the network adapter appears in Hyper-V Manager
-NetAdapterName is the name of the command
-AllowManagementOS is $true for the host and VM to both have Internet
- Open Virtual Switch Manager in Hyper-V Manager and check if an external switch is visible in the list. In our case it is.
Solution 3: Re-install Hyper-V role
In this solution, we will disable and then enable Hyper-V again in Windows 10. Do not worry, during the disable/enable procedure, your virtual machines will be kept in Hyper-V Manager. We already talked about the way how you can enable the Hyper-V role in Windows 10. You can read more and follow the instructions in this Hyper-V Role article.