如何 禁掉 Hyper-V && 如何解决禁不掉 Hyper-V 的问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011033906/article/details/80503423

禁掉 Hyper-V

管理员模式运行 CMD:

//To disable:
bcdedit /set hypervisorlaunchtype off

//To enable:
bcdedit /set hypervisorlaunchtype auto 

问题症状

讲道理用上面的方法是可以禁掉 Hyper-V 的,但我尝试了无数次都不可以。包括在 Android Studio 中启动模拟器时提示让我 disable Hyper-V 的方法。

但每次重启之后还是启动不了 Android Studio 中的 x86 模拟器。

问题原因

这是微软 Group Ploicy 的原因

Windows 搜索框中输入 System information:, 右下角:

这里写图片描述

再看下这个链接: https://kb.vmware.com/s/article/2146361

好吧,直接看解决方案吧

管理员模式打开 CMD, 运行下面的命令:

mountvol X: /s
copy %WINDIR%\System32\SecConfig.efi X:\EFI\Microsoft\Boot\SecConfig.efi /Y
bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d "DebugTool" /application osloader
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path "\EFI\Microsoft\Boot\SecConfig.efi"
bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215}
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO,DISABLE-VBS
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} device partition=X:
mountvol X: /d

之后再管理员模式运行 CMD:

//To disable:
bcdedit /set hypervisorlaunchtype off

解释性的: Resolution

  1. Disable the group policy setting that was used to enable Credential Guard.

    a. On the host operating system, click Start > Run, type gpedit.msc, and click Ok. The Local group Policy Editor opens.
    b. Go to Local Computer Policy > Computer Configuration > Administrative Templates > System > Device Guard > Turn on Virtualization Based Security.
    Select Disabled.
    c.Select Disabled.

  2. Go to Control Panel > Uninstall a Program > Turn Windows features on or off to turn off Hyper-V.
    Select Do not restart.

  3. Delete the related EFI variables by launching a command prompt on the host machine using an Administrator account and run these commands:
mountvol X: /s
copy %WINDIR%\System32\SecConfig.efi X:\EFI\Microsoft\Boot\SecConfig.efi /Y
bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d "DebugTool" /application osloader
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path "\EFI\Microsoft\Boot\SecConfig.efi"
bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215}
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO,DISABLE-VBS
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} device partition=X:
mountvol X: /d
**Note**: Ensure X is an unused drive, else change to another drive.

上面的 Resolution 居然还有中文的。。。

在启用了 Credential Guard 或 Device Guard 的 Windows 10 主机上运行 Workstation 失败 (2148465)

猜你喜欢

转载自blog.csdn.net/u011033906/article/details/80503423