Temporarily Disable Hyper-V

win10的wsl2中可以装metasploit和hackrf,对我来说实在无法拒绝(windows是最好的linux发行版!),但是wsl2需要HyperV。
但是我用来玩游戏的安卓模拟器却无法和hyperv兼容,在无数次尝试之后(蓝叠那个beta版也不行),还是选择用代码临时关闭开启hypver-v,需要玩游戏的时候关闭hypver-v,需要用wsl的时候开启hypver-v(真麻烦。

开启

1
bcdedit /set hypervisorlaunchtype auto

关闭

1
bcdedit /set hypervisorlaunchtype off

The ability to install Metasploit and HackRF in WSL2 on Windows 10 is simply too good to pass up for me (Windows is the best Linux distro!). However, WSL2 requires Hyper-V.
But the Android emulator I use for gaming isn’t compatible with Hyper-V. After countless attempts (even Bluestacks’ beta version didn’t work), I’ve opted to use commands to temporarily turn Hyper-V on and off. I disable Hyper-V when I want to play games, and enable it when I need to use WSL (what a hassle).

Enable

bcdedit /set hypervisorlaunchtype auto

Disable

bcdedit /set hypervisorlaunchtype off

Temporarily Disable Hyper-V
https://tokisaki.top/blog/temporarily-closed-hyperv/
作者
Tokisaki Galaxy
发布于
2020年11月21日
许可协议