win11 更新后导致 docker 启动报虚拟机错误解决办法

1. 确保勾选了 hyper-v 和 适用于 Linux 的 windows 子系统

在这里插入图片描述

2. 管理员运行 powershell, 挨个执行以下4个命令后,重启电脑

# 重新启用 WSL 和 VirtualMachine 功能:

DISM /online /enable-feature /featurename:VirtualMachinePlatform /norestart

DISM /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart

#重新启用 Hyper-V 功能:

dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

bcdedit /set hypervisorlaunchtype auto

3. 重启后,顺利打开 docker 。

注:原报错如下:

Previously there was no errors; Now - error dialog is shown when starting the Docker Desktop:

provisioning docker WSL distros: ensuring main distro is deployed: checking if main distro is up to date: checking main distro bootstrap version: getting main distro bootstrap version: exit code: 4294967295: running WSL command wsl.exe C:\WINDOWS\System32\wsl.exe -d docker-desktop -u root -e wsl-bootstrap version: WSL2 is not supported with your current machine configuration.
Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS.
Enable "Virtual Machine Platform" by running: wsl.exe --install --no-distribution
For information please visit https://aka.ms/enablevirtualization
Error code: Wsl/Service/CreateInstance/CreateVm/HCS/HCS_E_HYPERV_NOT_INSTALLED
: exit status 0xffffffff
checking if isocache exists: CreateFile \wsl$\docker-desktop-data\isocache: The network name cannot be found.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值