win10家庭版如何在已安装VMware的情况下安装docker desktop
背景
笔记本是win10家庭版操作系统,已经安装了VMware虚拟机,此时如果安装docker desktop,会出现不兼容的情况,我这边是启动docker desktop后页面一直是空白stop的状态。网上一顿搜,发现是VMware采用的虚拟化技术(Hypervisor)和docker的虚拟化技术(Hyper-V)不兼容,有冲突。具体解决步骤如下。
安装Hyper-V
win10家庭版是没有Hyper-V的,因此在“启用或关闭Windows功能”中是找不到Hyper-V的,要自己手动安装。
创建一个txt,复制粘贴以下内容,然后保存后将格式改成cmd结尾。然后以超管身份运行这个脚本即可。
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL
安装后可以在“启用或关闭Windows功能”中勾选上Hyper-V以及适用于Linux的Windows子系统和虚拟机平台。
最后,重启电脑才能生效。
启用hypervisorlaunchtype
bcdedit /set hypervisorlaunchtype auto
更新wsl
wsl --update
服务中启用Docker Desktop Service
这样基本就可以正常使用docker desktop了,但是VMware会不可用。有文章说需要升级VMware版本到15.5以上才能兼容,具体还没尝试。
https://blog.csdn.net/cplvfx/article/details/138033592
https://blog.csdn.net/weixin_41870042/article/details/140712373