Docker Desktop卸载后Hyper-V服务驻留与第三方虚拟机产生冲突

------------------------------------2021.04.09↓------------------------

注:今天在腾讯电脑管家清除垃圾(其中有清除注册表残留项)后,问题重现。去电脑管家恢复清除的注册表项后,问题消失。

------------------------------------2021.03.22↓------------------------

本人系统是WIN10 HOME 1909,由于某个区块链节点软件需要,安装了Docker Desktop,但发现后续环境配置太复杂(还需要升级WSL2等等)就没有继续,于是将Docker Desktop和区块链节点软件卸载。卸载后,发现VMWARE以及雷电模拟器不能正常使用,经查是因为Docker Desktop是基于hypter-V虚拟环境运行的,Hyper-V是WIN 10自带的虚拟环境功能,可能会与一些第三方虚拟机产生冲突。安装Docker Desktop后会激活Hyper-V相关服务,然鹅Docker Desktop执行卸载后可能没有把额外安装的其他工具(如wsl,Windows Subsystem for Linux,适用于Linux的Windows子系统)、打开的服务和更改的设置还原到安装前的状态,从而导致了问题。

解决方法:

先按VMWARE给的方法:

https://kb.vmware.com/s/article/2146361,(为防止链接失效,链接页面已复制到文末附录)

进行设置(这里我没有动注册表,因为动注册表那步似乎不是必要步骤)。

设置好并重启后发现问题依旧,

考虑到上面给的步骤提到去“启用或关闭windows功能'里找到Hyper-V选项并去掉勾勾,,

然而在我电脑上找不到hyper-v选项:

于是我索性直接进服务里把所有关于hyper-v的服务关掉,重启电脑,问题解决。

 

附录:

"VMware Workstation and Device/Credential Guard are not compatible" error in VMware Workstation on Windows 10 host (2146361)

Last Updated: 2020/9/9Categories: TroubleshootingTotal Views: 4733379 3442Language:                 Chinese (Simplified)JapaneseEnglish                          subscribe
 
 Symptoms
  • Powering on the virtual machine in VMware Workstation 12.5 or later version on a Windows 10 1909 or earlier host fails to start in following situation:
    • Credential Guard/Device Guard is enabled.
    • Windows Sandbox is enabled
    • Virtual machine platform is enabled
    • WSL2 is enabled
    • Hyper-V is enabled
  • Error message in VMware Workstation Pro/Player similar to:

VMware Workstation and Device/Credential Guard are not compatible. VMware Workstation can be run after disabling Device/Credential Guard.

 

 Purpose
This article provides steps to disable Hyper-v for a Windows 10 Host.
 
 Cause

This issue occurs because Hyper-V is incompatible with Workstation Pro or Workstation Player.

 
 Impact / Risks
Hyper-v virtual machine cannot be started after this change.
 
 Resolution

Process to troubleshoot the error:

To troubleshoot the error follow the steps below:

  • If your Host has Windows 10 20H1 build 19041.264 or newer, upgrade/update to Workstation 15.5.6 or above.
  • If your Host has Windows 10 1909 or earlier, disable Hyper-V on the host to resolve this issue.

Steps to Disable Hyper-V:

Note:
It is recommended to take back up of your data and have system restore points as a safety measure. The following features would not work anymore once the Hyper-V is disabled
  • Credential Guard/Device Guard
  • Windows Sandbox
  • Virtual machine platform
  • WSL2
  • Hyper-V

Verify Virtualization-based Security (VBS) is Enabled/Not Enabled:

      1. Open msinfo32/system information on Windows 10
      2. Under System Summary on the Right-hand page, scroll down to Virtualization-based Security and
          ensure the Value is set to Not enabled.
      3. If the value is set to enabled follow the steps given below according to disable Hyper-V.

1. Turn Off Hyper-V

  1. Go to "Turn Windows features on or off"
  2. Make sure Hyper-v is not ticked.
  3. If it is Ticked, untick it and click "Ok".

2. Open command prompt window as an administrator   

  1. Run “bcdedit /enum {current}”
  2. Note down the hypervisorlaunchtype in case this needs to be reverted
  3. Run “bcdedit /set hypervisorlaunchtype off” to disable hypervisor Close the command prompt after   executing the commands and restart the system.

We should be able to power on the Virtual Machine in Workstation now.
 

Process to turn off virtualization-based Security:

Below steps can be followed to turn off virtualization-based Security for Windows 10 Home & Pro:

For Microsoft Windows 10 Pro & above:

  1. Edit group policy (gpedit)
  2. Go to Local Computer Policy > Computer Configuration > Administrative Templates > System
  3. Double Click on Device Guard on the right hand side to open.
  4. Double Click on "Turn On Virtualization Security" to open a new window
  5. It would be "Not Configured", Select "Disable" and click "Ok"
  6. Close the Group Policy Editor.
  7. Restart the system

For Microsoft Windows 10 Home:

Note: This procedure modifies the Windows registry. Before making any registry modifications, ensure that you have a current and valid backup of the registry and the virtual machine. For more information on backing up and restoring the registry, see the Microsoft Knowledge Base article 256986.

  1. Open Registry Editor
  2. Go to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > DeviceGuard
  3. On the right-hand side, write a new key

      a. Right Click > New > DWORD (32-bit) Value

      b. Name this Value "EnableVirtualizationBasedSecurity"

          By default, it should be 0, Double click, and confirm the value

      4. Go to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Lsa
      5. On the right-hand side, write a new key

       a. Right Click > New > DWORD (32-bit) Value

       b. Name this Value "LsaCfgFlags"

 By default, it should be 0, Double click, and confirm the value


For more information on Device Guard or Credential Guard, see the Microsoft article Manage Windows Defender Credential Guard.

Disclaimer: VMware is not responsible for the reliability of any data, opinions, advice, or statements made on third-party websites. Inclusion of such links does not imply that VMware endorses, recommends, or accepts any responsibility for the content of such sites.

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值