如何 禁掉 Hyper-V && 如何解決禁不掉 Hyper-V 的問題
阿新 • • 發佈:2019-01-07
禁掉 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:, 右下角:
好吧,直接看解決方案吧
管理員模式開啟 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
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.Go to Control Panel > Uninstall a Program > Turn Windows features on or off to turn off Hyper-V.
Select Do not restart.- 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.