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.
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.
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:
Actually it’s quite easy. This is how is works:
- Open Network Sharing Center (just to be prepared! You need to be kind of quick)
- Click ‘Change Adapter Settings’ in the left-hand menu (leave window open for later)
- Create the new External Switch in Hyper-V Manager. Or, you can also use New-VMSwitch PowerShell cmdlet. Both methods work.
- 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)
- Disable your WiFi adapter
- Reenable your Wifi adapter
- 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.