Skip to main content

Fix: Can’t create Hyper-V 2019 Virtual Switch (Error 0x80070002)

Every virtual machine that is hosted on Hyper-V 2019 probably requires a virtual network card in order to communicate with the rest of the network. In order to do so, we would need to create a virtual switch and assign it to the virtual machine. There are three different virtual switches on the Hyper-V including private, internal and external. The private network switch provides only communication between virtual machines that are hosted on a physical server. Next to that, the internal switch provides communication between virtual machines and Hyper-V host. The last, but not the least one is the external switch. An external switch is bound to the physical network card and provide communication with the entire network. After we create a virtual switch, the next step would be to assign a virtual switch to the virtual machine. Which switch will we assign? It depends on the virtual machine’s use case.
Some IT Admin is experiencing problems when creating virtual switches on the Hyper-V, regardless if they are trying to create it via GUI or Powershell. One of the error is known as “Error applying virtual switch properties changes. Failed while adding virtual ethernet switch connections.”  The details show the GUID of the adapter, with the final text, “The system cannot find the file specified. (0x80070002). The same issue occurs not only on Hyper-V 2019 but also on Hyper-V 2016 and Hyper-V 2012.

There are a few reasons why this problem occurs, but many of them are pointing to a problem with the network card. We will focus on two of them and walk you through solutions that have helped IT admins to solve a problem. It includes updating the network card, deleting NIC references and re-adding Hyper-V role. So, let’s start. If solution 1 doesn’t solve your problem, please try with solution 2.

Solution 1: Update network card drivers

In our case, we are using physical server HPE ProLiant ML350 Gen10 Server. In order to update the driver for the network card, we would need to access the manufacturer website and download an official driver for the network card. As this server uses Intel’s network card, we can also download it on Intel’s website.

Solution 2: Reinstall Hyper-V role and reset NIC references

  1. Log in or connect to Windows Server 2019 where you installed Hyper-V role
  2. Open Server Manager
  3. Click on Manage and then choose Remove Roles and Features
  4. Click on Next under Before you begin
  5. Select the destination server and click Next
  6. Deselect Hyper-V under Remove server roles and then click Remove Features
  7. Click Next
  8. Click Next under Remove features
  9. Select Restart the destination server automatically if required
  10. Click Yes to confirm and then click Windows will automatically restart.
  11. Log in or connect to Windows Server 2019 where you installed Hyper-V role
  12. Right click on Start Menu and click Windows Powershell (Admin)
  13. Type netcfg -d and press Enter. This will delete all the NIC references, so be sure that you physical access to the server or have a good iLO or other management connection.
  14. Restart Windows Server 2019
  15. Log in or connect to Windows Server 2019 where you installed Hyper-V role
  16. Open Server Manager and install Hyper-V by following the same procedure as we use for removing the role. You will only need to select Hyper-V role.
  17. Left click on Start Menu and search for Hyper-V Manager
  18. Open Hyper-V Manager
  19. Navigate and open Virtual Switch Manager on the right side of the Hyper-V Manager window
  20. Select External under What type of virtual switch do you want to create and then click Create Virtual Switch
  21. Type the name of the external switch
  22. Choose network card under External network
  23. Click Apply and then OK
  24. Navigate to the virtual machine where you would like to assign a new virtual switch
  25. Right click on the virtual machine and click Settings
  26. Click on Network Adapter
  27. Choose the External virtual switch under Virtual Switch
  28. Click Apply and then OK
  29. Add IP address (if you are not using DHCP)
  30. Enjoy working with Hyper-V and virtual machines

Comments

Popular posts from this blog

How to Fix the ‘Failed to Acquire the VirtualBox COM Object’ Error

Several users are reporting that they are unable to launch VirtualBox. The critical error message that comes up is  “Failed to acquire the VirtualBox COM object. The application will terminate”.  In some cases, the error is also accompanied by a second error message pointing towards the problem. The issue does not seem to be specific to a certain Windows version since it’s confirmed to occur on both Windows 8.1 and Windows 10. Failed to acquire the VirtualBox COM object. The application will now terminate. What is causing the ‘Failed to Acquire the VirtualBox COM Object’ error? We investigated this issue by looking at various user reports and the repair strategies that are commonly deployed successfully in this particular scenario. As it turns out, there are multiple culprits that might end up triggering this issue: VirtualBox is not installed with admin access  – Virtualbox is one of those software products that will require you to install them with a...

How to Format/Indent XML Files in Notepad++

Notepad++ is a free text and source code editor that is mostly used by programmers. It is an advanced alternate version of the default notepad which supports 50 programming, scripting and markup languages. It allows a user to edit codes within multiple tabs in a single window. However, it lacks the formatting for XML files or XML code. Users will find it difficult to edit or read the XML code without the correct format for code. How to Format/Indent XML Files on Notepad++ What is XML File? XML (stands for eXtensible Markup Language) which is a language designed to store and transport data. XML files are just plain text files that can’t do anything on their own. Custom tags are used in XML files to define objects and the data within each object. It defines a set of rules for encoding documents in such a format that both humans and machines could read. XML is similar to HTML but the difference is that HTML defines how data looks, while XML defines what data is. XML Code samp...

How to Fix ‘An Error Has Occurred in the Script On This Page’

Script errors are still a common occurrence among Internet surfers. And it’s not just restricted to web browsers as you might think. The  ‘An error has occurred in the script of this page’  is mostly reported with Internet Explorer, but there are a lot of programs that use IE scripts, so the issue is reported in conjunction with a lot of different application. As it turns out, the issue is not exclusive to a certain Windows version since it’s confirmed to occur on all the most recent versions including Windows 7, Windows 8.1 and Windows 10. An error has occurred in the script on this page. What is causing the  ‘An error has occurred in the script of this page’  issue? We investigated this particular issue by looking at various user reports and the repair strategies that are most commonly used to resolve this problem. Based on our investigations, there are several different culprits that might be responsible for this issue: Java is missing from the Wind...