If you receive a prompt with the message Error applying Virtual Switch Properties changes when you try to re-create a Hyper-V virtual switch (vSwitch) for the same physical network adapter on your Windows 11 or Windows 10 computer, then this post is intended to help you. In this post, we will identify the potential cause, as well as provide the most suitable solutions to fix the error.
When this problem occurs, you’ll receive a similar error message as below:
Virtual Switch Manager
Error applying Virtual Switch Properties changes
Failed while adding virtual Ethernet switch connections.
Failed to connect Ethernet switch port(switch name=’ <deviceid>”,port name=”< port id>”,adapter GUID='{GUID id}’): The system cannot find the file specified.(0x80070002).
This error occurs when you try to re-create the vSwitch for the same physical network adapter after you delete a vSwitch on a Windows computer that has been upgraded. The error indicates that the vSwitch still exists, even though it’s no longer listed in the Hyper-V Virtual Switch Manager.
What is a Virtual Switch in Hyper-V?
Hyper-V Virtual Switch is available in Hyper-V Manager when you install the Hyper-V server role on a compatible computer. The vSwitch is a software-based layer-2 Ethernet network switch with programmatically managed and extensible capabilities to connect VMs to both virtual networks and the physical network.
What are the types of Virtual Switches available in Hyper-V?
There are three types of virtual switches, viz External, Internal, and Private that may be created in the Virtual Switch Manager.
Error applying Virtual Switch Properties changes in Hyper-V
If you’re faced with this issue, you can try our recommended solutions below in no particular order and see if that helps to fix the Error 0x80070002 applying Virtual Switch Properties changes in Hyper-V on your Windows 11 or Windows 10 computer.
- Run Microsoft Easy Fix
- Create an External Switch using PowerShell
- Reset the Network Connection
- Update the Network Adapter Driver
- Uninstall and reinstall the Network Adapter
- Enable Internet Connection Sharing
- Reinstall Hyper-V role
Let’s take a look at the description of the process involved concerning each of the listed solutions.
Fix 0x80070002 Hyper-V Error
1] Run Microsoft Easy Fix
Microsoft is aware of this issue and has released an Easy Fix to automatically resolve the Error applying Virtual Switch Properties changes in Hyper-V issue on your Windows 11/10 PC.
Before you download and run the Easy Fix, keep in mind that you will lose network connectivity and you must restart your computer manually after the wizard finishes. Also, you will have to connect manually to all known Wi-Fi networks and you must re-create the vSwitch by using the Hyper-V Virtual Switch Manager after your computer restarts.
2] Create an External Switch using PowerShell
This issue is known to occur when using the GUI to create an external switch. In this case, you can try creating the external switch using PowerShell and see if the error reappears.
To create an external switch using PowerShell on your Windows device, do the following:
- Press Windows key + X to open Power User Menu.
- Tap A on the keyboard to launch PowerShell in admin/elevated mode.
- In the PowerShell console, type in or copy and paste the command below and hit Enter – where the <NameOfTheSwitch> placeholder is the name of the switch to be created and the display name in Hyper-V Manager. The <NameOfNetworkAdapter> is the name of the network adapter that is to be associated with the switch.
New-VMSwitch -name <NameOfTheSwitch> -NetAdapterName <NameOfNetworkAdapter> -AllowManagementOS $true
- Exit PowerShell when the cmdlet runs.
- While the Applying dialog box is being displayed, disable and reenable the WiFi adapter in Network Connections in Control Panel.
You can now check if the external switch is listed in the Virtual Switch Manager in Hyper-V.
3] Reset the Network Connection
This solution requires you to reset network connections by using netcfg – a GUI and command-line utility PC users can use to manage network configurations. You can download the utility and use that if you prefer – for the purposes of this post, we will run the command in PowerShell.
To reset the network connection using the netcfg command on your Windows PC, do the following:
The command will remove all your existing connections, so we recommend you create a system restore point before executing this command.
- Open PowerShell in admin mode.
- In the PowerShell console, type in the command below and hit Enter to restart all network adapters and remove MUX objects.
netcfg -d
- Exit PowerShell when the command executes.
Now, open Virtual Switch Manager in Hyper-V Manager and try to create an external switch and see if the error reoccurs. If so, try the next solution.
4] Update the Network Adapter Driver
This solution requires you to update the network adapter driver and see if the error in hand is resolved or not. If the latter is the case, proceed with the next solution.
5] Uninstall and reinstall the Network Adapter
This solution requires you to uninstall the network adapter from Device Manager on your Windows 11/10 PC and then try to create an external switch again. This will refresh your adapter by installing the default drivers, of which resetting the network adapter will achieve the same result.
To uninstall the network adapter, do the following:
- Open Device Manager.
- In Device Manager, scroll down through the list of installed devices and expand the Network adapters section.
- Right-click network adapter you want to uninstall.
- Select Uninstall device.
- Select Delete the driver software for this device.
- Click Uninstall.
- Restart PC when the uninstall completes.
6] Enable Internet Connection Sharing
This solution requires you to enable Internet Connection Sharing (ICS) on your Windows 11/10 computer by following the instructions in this post; An error occurred while Internet Connection Sharing was being enabled.
If after this task, the error is still not fixed, you can try the next solution.
7] Reinstall Hyper-V role
This solution requires you to reinstall Hyper-V on your Windows 11/10 PC – your VMs will be kept in Hyper-V Manager during the reinstall procedure. After you must have successfully created a VM in Hyper-V, restart your computer.
NOTE: Error 0x80070002 can also be seen when using Windows Update, Windows Upgrade, Windows Features, Installer, Microsoft Store, Windows Backup, Outlook, Sandbox, System Restore, Microsoft Account, Printer, etc.
How do I reset my Hyper-V switch?
To reset the Hyper-V switch, you need to use the netcfg command. On the other hand, you can also use the netcfg -d command to manage the network configuration. From here, it is also possible to reset or modify the Hyper-V switch. Whether you use Windows 11 or Windows 10, the process is the same.
I hope this helps!
Related post: Hyper-V encountered error while loading virtual machine configuration.