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

禁掉 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)

  • 3
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值