4

I get following error while creating any type(external, internal and private) of virtual switch on Hyper-V using Hyper-V manager.

Failed to create virtual ethernet switch.

The system cannot find the file specified. (0x80070002)

Here is a to screenshot of error:

enter image description here

OS: Windows 8.1 (x64) + Update 1

Getting the same error when trying to create from Powershell.

1
3
  1. Go to Settings -> Network & Internet

  2. Select Change adapter options

  3. Right click on NIC Adapter -> Properties

  4. Check if the Hyper-V Extensible Virtual Switch is installed in your NIC's Properties

  5. Reinstall the Hyper-V Extensible Virtual Switch

    5.1 Select Install

    5.2 Select Protocol

    5.3 Select Hyper-V Extensible Virtual Switch

  6. Create the virtual switch on Hyper-V using the Hyper-V manager

Source: https://www.tenforums.com/virtualization/10699-hyper-v-error-when-creating-virtual-switch.html#post306179

1
  • 2
    Did not work for me. Server 2019.
    – Tsukasa
    Nov 27 '18 at 6:36
0

All resolutions suggested failed!

This did work immediately and I have had no issues since. Here is how you do it:

Open the following registry key and give "All Applications" full control permissions

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WcmSvc

That was it, no more issues after that.

0

All I did was delete the NICs from device manager one at a time (was logged in remotely). After deleting, right click and click Scan for hardware changes.

Windows re-found the deleted NIC and installed it, then Hyper-V manager was able to create a V-Switch.

For the Intel NICs, I did need the latest driver from Lenovo's site. I did not have to uninstall and reinstall the Hyper-V role; maybe because I had already tried the remove role → reboot → netcfg -d (PowerShell) → reboot again. (I had to use LogMeIn scheduled restart as I was working remotely)

0

I had this issue for a while. I tried a lot of different "solutions" for me the only thing that actually worked is to run these two PowerShell commands.  First

Get-NetAdapter  

This will just list all the network adapters on your machine. We need the name column for the actual command we want to run.

New-VMSwitch -name ExternalSwitch  -NetAdapterName Ethernet -AllowManagementOS $true
  • -name is how the adapter appears in Hyper-V.
  • -NetAdapterName is the name from the previous command.
  • -AllowManagementOS is $true for the host and VM to both have internet.  This is a checkbox in the Hyper-V graphical interface.

I did try many things first to no avail. Resetting network settings, reimaging, netsh commands that I assumed were discontinued by now. Removing and re-adding the Windows features. I can't say this alone fixed my issue. However, the above is what seems to work for me. Trying the others all still result in the error message even now. https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/get-started/create-a-virtual-switch-for-hyper-v-virtual-machines This has a bit more info if anyone is interested.

2
  • Even with my edits, I find your answer technically confusing and unclear. Please clarify which words are literal and which are placeholders. … … … … … … … … … … … … … … … … Please do not respond in comments; edit your answer to make it clearer and more complete. Jan 23 '20 at 0:55
  • Instant fix on my 180 Eval Datacenter 2019. I added Hyper-V but couldn't select a network adapter. Did this, and it worked. If your NetAdapterName is "Ethernet 2" you can just add "quotes" around it in the given command. Thanks!
    – devnullius
    May 6 at 23:42
0

I was able to create the external virtual switch on my server.

The problem was the driver used by the previous WS2016 OS was kept during my migration to 2019. I went on the vendors drivers download page to get the latest available network driver for my server (be very carefull selecting the proper driver here). I then rebooted because I could and the problem was gone !

Hope this helps.

0

This is what make it work for me.

Run command prompt as Admin and run "netcfg -d"

c:\> netcfg -d

then reboot, and its working

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.