Hyper-V virtual switch creation woes

UPDATE: You may wish to leap straight to the comment below from Craig S., in which he recommends a workaround for this problem. Many subsequent commenters have tried his suggestion, with success. Thanks, Craig!

For my own part, I moved to using an internal switch configured for NAT and run a pfSense VM in that network, for DHCP. Without doubt, Craig’s solution is easier to implement!

If you found this post helpful, you might also be interested in John Savill’s book, Mastering Windows Server 2016 Hyper-V. In the interests of transparency: this is an affiliate link. See my affiliate disclosure page for an explanation.

High-end laptop hardware does not approach enterprise-grade server quality. That’s my takeaway.

I’ve been wrangling with Hyper-V on a very nice ultrabook that has 32GB of RAM and a Core i7 processor (quad-core). Highly portable and useful for running multiple VMs, which indeed was the idea.

This ultrabook is also now sporting the 2004 release of Windows 10. Security-obsessed folks like me have taken a keen interest in the application sandbox features.

Since sandboxing is all about virtualisation, it made sense, I reasoned, to use Hyper-V rather than any other virtualisation platform. It’s native to Windows and this way there should be fewer potential conflicts between hypervisors.

And it was all going well until I attempted to create an “external” (bridged) switch. The creation process failed with the following unhelpful Virtual Switch Manager errors:

  • “Adding ports to the switch ‘[switch name]‘ failed. The operation failed because the object was not found.”
  • “Failed while adding virtual Ethernet switch connections. Ethernet port ‘{[insert long GUID here]}’ bind failed: Cannot create a file when that file already exists. (0x800700B7).”

Worse than that, whatever process had partially completed could not easily be reversed – clicking ‘cancel’ did not back out any changes. Rather, it left my laptop with networking utterly ruined.

I confirmed this by repeated attempts to create a vSwitch, following resetting the network stack and removing/reinstalling Hyper-V. Same results every time. If you find yourself in this mess, utter the incantation “netcfg -d” at an elevated command prompt and reboot. (You may also need to remove and re-add WAN miniport devices as described here, since this process can break existing L2TP VPN connections.)

Is there a way to fix this problem? I believe not, at present. It’s almost certainly connected to the attempted use of a WiFi adapter which Hyper-V can’t always support. My adapter is an Intel Wi-Fi 6 AX200, FWIW. No matter how expensive the laptop, you can’t assume that the hardware will provide across-the-board support for virtualisation. For that, you really need a decent-quality server-grade NIC.

All is not lost. Although it’s not possible to bridge the Wi-Fi adapter, the default network (which offers NAT) works fine. And internal virtual networks (which aren’t hardware bound) are also unaffected. Granted, this means you can’t route externally into your VMs, but that’s not the end of the world, particularly if you’re au fait with port forwarding (read also the comments at that link).

(Yes, you could also use an external network interface for this, though that reduces your laptop’s portability of course. Quality matters for that too – YMMV.)

If you have cracked this problem or can provide any further thoughts or guidance, please do let me know in the comments!

This article’s featured photo by Siavash Ghanbari on Unsplash

63 Replies to “Hyper-V virtual switch creation woes”

  1. I have the exact same issue. Win10 2004, with an Intel Wireless-AC 9260. No luck.

    To clean it up you have to reboot, then delete the bridge it created under Network Connections (will not show up until after the reboot) — then the vEthernet NIC will appear which you can remove from Device Manager.

    1. It’s 2023 and I was having this issue too. I’m also using an Intel AX200 Wi-fi on Win 10.. the solution of disabling and re-enabling the wireless adaptor worked. So three years and still no fix from Microsoft. Almost the ultimate IT techs fix of ‘have you tried turning it of and on again’….

  2. Finally the issue started to show up online, I have been struggling with it since May and contacting MS was of no use. Actually, it started after 2004 update, before that everything was working flawlessly. It is not clear whether it is the update the has something broken or it is Intel that is expected to update their drivers somehow. Bridging wifi is still working with many older wifi devices on other machines on 2004. Anyway, to reinstate the connection after the failure of bridging the wifi, it is just enough (most of the time) to disable the wifi and re-enable it then the buggy bridge will show up so that you can delete it.

    1. Ah, that’s interesting. Many thanks for commenting, Aena – I’m sure your suggestion will help others! I’m just in the process of writing another blog post about a related problem…

  3. I have encountered the same issue on a desktop PC that contains an “Intel(R) Wi-Fi 6 AX200 160MHz” adapter, so seems to be the same hardware as your issue.

    I have found this article from Microsoft dated 9th September 2020: https://docs.microsoft.com/en-us/troubleshoot/windows-client/virtualization/cannot-create-hyper-v-virtual-switch

    This article describes the issue and confirms it was caused by a recent Windows Update. It states that it will be fixed in the next Windows Update, but provides an easy-fix option to patch it.

    I have run this “easy-fix” and found that it completely stripped my network keys, so I had to re-enter my network key… but when trying to create the virtual switch in Hyper-V again, the same issue persists.

    Part of me hopes that it’s a more general issue than the hardware not being supported by Hyper-V, although I couldn’t help but notice that the Enternet adapter works fine… it’s just the wireless adapter that fails with this error. Unfortunately, I don’t have direct physical access to be able to plug this PC into my network via Ethernet, so wireless is king.

    VirtualBox works fine with this adapter, but I found that I was experiencing some unexpected performance hit… plus I have need to learn Hyper-V from a professional aspect.

    Here’s hoping for a relatively quick fix coming out shortly!

    1. Thanks Mike. My final solution to the problem was to create an additional VM switch that manages NAT and to pair this with a pfSense VM to handle DHCP. That’s worthy of its own blog post.

      The bottom line is that low-level MAC spoofing and other shenanigans needed to run VMs are particularly challenging over WiFi. I suspect VirtualBox ‘fixed’ this by not digging as far down into the networking stack as Microsoft does with Hyper-V. But that could be complete nonsense.

      From what I’ve read on various forums and technical boards, the Hyper-V team are aware of the issue but it’s less of a priority than other feature requests. Large enterprise customers (from whence most Hyper-V-attributed income must be derived) are not running over WiFi. All enterprise NICs, none of which are WiFi, have first-class support. Harrumph.

    2. I had this same issue with the Intel Wifi 6 AX201 today. Here’s what I discovered.

      When I created the Hyper-V External switch for the first time, it failed to create with an error about not being able to find some component. And of course, I was no longer connected to any wireless network. I tried the usual things of course (MS diagnostic fixer, netcfg -d, etc), nothing worked. BUT, I did notice one thing. To get networking back, all I did was disable my wireless card and re-enable. But when I did that, the Network Bridge network device all of a sudden appeared in the network adapters list. Hmm, if only I could create a switch and tell it to “connect itself” to the bridge. But alas, that is not possible.

      Then it hit me what the problem might be. Something is not working correctly such that, when trying to create the switch and attach it to the Network Bridge, the bridge could not be found. BUT when I disable/enable the WiFi card, the bridge magically “shows up”.

      So, armed with this knowledge, I followed these steps:
      1. Open Network Sharing Center
      2. Click ‘Change Adapter Settings’ in the left-hand menu
      3. Create the new External Switch in Hyper-V Manager. Or, you can also use New-VMSwitch PowerShell cmdlet. Both methods work.
      4. While the “Applying” dialog is spinning away, or the PowerShell Progress “dialog”, switch over to the network adapters dialog you have open in Control Panel.
      5. Disable your WiFi adapter
      6. Reenable your Wifi adapter

      In a few moments, your new Hyper-V External Switch should be created.

      1. Thanks Craig , Your solution worked perfectly for me after many days of frustrations and going through tens of other sites. Your solution is simple and fixed the problem.

      2. Craig,

        You genius! I’ve been banging my head against the wall for days on this issue. This is the real fix. Worked immediately.

      3. First off, I wanted to come back here and say to everyone who has read my commend and found it helpful: You’re very welcome! I’m glad this has helped you all.

        Secondly, I came back here to report another issue I’ve come across working with networking in Hyper-V. Right now, it’s rather specific to using Linux VMs, specifically, Ubuntu 20.04. So I thought I’d post it here with my other comment so if anyone comes across this issue, hopefully I can help them even further.

        The issue: I’m setting up multiple VMs (5) on my laptop. I started with 2 for a 2-node kubernetes cluster. That worked just fine. But once I added the 3rd node a few weeks later, the network was just flaky. Everytime I made a network call on the 3rd VM, my SSH connections to the original 2 VMs dropped. Also, I lost all network connectivity from the 3rd VM to the outside world. I tried several times turning off, then back on the network adapter in Ubuntu inside the VM. Then I could re-establish SSH connections to the original 2 VMs. BUT, when I made a network call via the 3rd VM, once again, all networking ceased.

        The fix? Well, on a whim, I got frustrated and just decided to change the IP address of the 3rd VM. And it worked. What?? Well, whatever, it worked. Was this just a blip?? No. I then installed a 4th Ubuntu VM, and the same thing happened right after the VM install was finished. So immediately I changed the IP address of this VM (I’m using static IPs for everything, by the way), and networking was “fine”. I’m not sure if this is restricted to Linux VMs because I’m only using Linux Ubuntu VMs. But, if you come across this vexing problem–just try changing the IP address and keep what little hair you might have left!

        1. Craig, let me know how I can repay you, you deserve a reward.

          I had recently rebuilt my Dell XPS laptop and had an issue with my VS, I thought I was hosed and facing another rebuild. The steps in your original comment have saved me so much time which is a valuable commodity for anyone. When I first investigated late last year I couldn’t find a solution.

      4. I owe you a beer sir! You are a genius! This is the only thing that worked after several hours of dealing with this issue. Thanks a lot for this solution!!

      5. Thank you, These steps literally helped. I mean I Disabled my Wifi Adapter first, then tried to make the switch. Once it completed(and successfully!), I enable my Wifi and back online I was. Next to check to see if VM can use it. Thank you!

      6. Genius Craig! That’s seems to be the exact reason why it shows “object not found”. You have to make the bridge appear before the hypev configuration working done. Thanks a lot!

      7. Thank you so much. Your instruction was hard to find. After many days of searching I found this article and decided on a whim to look through the comments. Your solution working after days and days of trying.

      8. Oh my god, I cant believe this worked!
        I had looked hours at different solutions:
        Netcfg -d
        Registry edits
        reinstall all network adapters etc…
        This is actually genious!
        Thanks!

      9. Wow! What an utterly ludicrous solution! I have a vague interest in what’s happening under the hood, but after all the other solutions I’ve tried, including thinking that I’d completely messed up all the networking on my PC, I’m just really glad this worked for me.

        Thank you Craig!!!

      10. Thanks a lot for this Craig!! I was going bonkers as to what the hell should I be doing in order to mae it work until i found your solution!

      11. Craig…

        I installed windows 11 and this comment finished 3 days of freaking nervous =’D

        Thank you so much… you are the best, man!

      12. Great Job Bro,

        This simple trick made a lot of people life easy.

        tired & fed up through multiple workarounds, but this worked.

        Thanks.

      13. I ran into this issue after endpoint protection changes somehow broke the default vSwitch my VMs used on my work laptop.
        Your solution solved creating a new external virtual switch.

        I’d like to add that speed is of the essence when disabling and enabling the wifi adapter, took me two tries, but in the end it worked.
        Also AX201 adapter btw.

        Thanks for describing this fix/workaround.

  4. so during the process of adding the external switch with the intel wifi adapter right after hitting apply or OK, disable the network adapter on the host and re-enable right away. I was able to get it to bind successfully. It seems like a process flow check that fails because it cannot detect the Network Bridge before creating the External Virtual Switch. Disable/Enable the wifi adapter allows the creation and deletion of the Network Bridge as Aena mentioned above.

    Like everyone else, creation of virtual switch with other network adapters are fine.

  5. I struggled with this error for 3 days, but finally I found a solution. The solution was to uninstall VPN clients that were building their own virtual network adapters. With the list of network connections clean, adding a virtual wi-fi switch to Hyper-V went smoothly

  6. Thanks Craig, that worked a charm. I’ve been out of the virtualisation game for about a year and thought i’d fire up a quickfire vm to do some testing. After a bit of googling stumbled across this just before I was about to give up. 1 am and a happy camper! I thought all these sorts of bugs wouldve been long ironed out. Never had such pain with vmware in all my days! But then, was only ever using NICs. Lifesaver. Cheers, Kev

  7. Disable Large Send Offload Version 2 for both IPv4 and IPv6 on the Microsoft Network Adapter Multiplexor Driver in Device Manager.

  8. Craig S. I should buy you a beer! You’re a life saver. I’ve been banging my head over this issue for 3 hours now.

  9. This solution works perfectly. How come MS cannot solve this problem?

    1. Open Network Sharing Center
    2. Click ‘Change Adapter Settings’ in the left-hand menu
    3. Create the new External Switch in Hyper-V Manager. Or, you can also use New-VMSwitch PowerShell cmdlet. Both methods work.
    4. While the “Applying” dialog is spinning away, or the PowerShell Progress “dialog”, switch over to the network adapters dialog you have open in Control Panel.
    5. Disable your WiFi adapter
    6. Reenable your Wifi adapter

  10. Why doesn’t this work for me 🙁
    Seems to be working for everyone.

    I can’t create ANY type of Hyper-V switch, Internal / External / Private.
    Either from Hyper-V switch mgr or from powershell command.

    Keep getting same error:

    Failed while creating virtual Ethernet switch.
    Switch create failed, name = ‘xxxx’, (friendly name = ‘New Virtual Switch’ : Not found (0x80041002).

    Tried this disable/enable WiFi Adapter just after clicking create new switch in hyper-v virtual switch manager and in powershell. (and completely disabling it while create is running as that seems to have worked for one guy)

    Tried giving all apps full access to the registry key: HKLM\SOFTWARE\Microsoft\WcmSvc

    Tried removing Hyper-V & VM Platform etc from Windows Features rebooting and adding it back etc.

    Tried uninstalling the Hyper-V Extensible Virtual Switch in the WiFi Adaptor’s properties – I can neither uninstall it nor select/enable it with the tick mark (Could not uninstall Hyper-V Ext Vir Switch Feature. The Error is: 0x80071779)

    Am on Windows 10 Ver 21H1 (Build 19043.1081) on Thinkpad Yoga 260

    Downloaded and tried the Microsoft fix but that just seems to remove ALL network interfaces and no amount of detect hardware gets them back so reverted to the restore point it had created. Tried network reset which had the same issue and had to revert to system restore point.

    The problem started after I disabled Hyper-V a few times to use VirtualBox / VMWare for some android stuff.
    Removed them and their networking stuff when this problem started.

    I do have a lot of WAN miniports in device manager due to Sierra 4G WWAN Card.

    1. Two things I would suggest:

      1. Try a different user profile. I suspect this won’t resolve the issue for you, but I have personally encountered some strange behaviour in Win10, where some services refuse to work in my normal profile, but work find in another user profile.
      2. Try the equivalent PowerShell commands, to create the switch. Although you’ll still probably hit the error, at least this way you’ll see at what point exactly the error occurs, and you may discover some useful debugging information: Use PowerShell to Create Virtual Switches
  11. This worked form me too. it was so wired. Tried this workaround describer in this article several times, these steps really worked. Thank you so much! Where to send beer to?

  12. I hereby affirm I have passed the initiation test to become a member of the Craig appreciation society.

  13. Craig S. is the best, this even works with windows 11. Just try install external adapter and in the meantime the changes are aplying just disable wifi network adapter and enable it.

    Thanks.

  14. been pulling my hair out for DAYS. can’t believe this worked. absolute ******* king right here and his name is Craig

  15. *2 years later
    Microsoft still haven’t fixed the problem. Good to know they’re still the same cynical lazy cashgrab company like it’s been for the past decades.
    Thank you, Pomeroy & Craig!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.