Schlagwort-Archive: VM

Hyper-V: External Switch with Wifi fails (with e.g. 0x800700B7)

Hyper-V

Hyper-V is nice if other solutions fail for you (like credential guard on Windows prevent VMWare from functioning). I personally like the integration with WSL and so on. It just works, most of the time.

Issues

Most annoying for me is the issue when creating an external switch which fails with a bunch of errors like „Cannot create a file when that file already exists. (0x800700B7).“ or „Adding ports to the switch … failed. The operation failed because the object was not found.“. Usually the recommendations are uninstalling other VPN clients or running „netcfg -d“. This never ever worked for me.

This especially happens, if you try to bind an external switch to WiFi interface.

Even the MS Fixit failed. It even messed up A LOT. I won’t use that one again.

Solution

After a lot of Googling I found a comment below a post which I thought is worth preserving. The folowing blog entry has a user comment. This solves the issue. The blog entry itself doesn’t… Check the comment:

(Source: https://pomeroy.me/2020/08/hyper-v-virtual-switch-creation-woes/#comment-411452)

Actually it’s quite easy. This is how is works:

  1. Open Network Sharing Center (just to be prepared! You need to be kind of quick)
  2. Click ‘Change Adapter Settings’ in the left-hand menu (leave window open for later)
  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. (now you need to be kind of quick)
  5. Disable your WiFi adapter
  6. Reenable your Wifi adapter
  7. Check in the network adapter settings if your external switch has been created

Thanks „Craig S.“ for this info! Saved me a lot of time! I hope this preserves this hint until it’s fixed by MS.