Ubuntu 22.04主机VirtualBox中Windows 10虚拟机安装WSL2报错0x80370102的求助
大家好,我遇到了一个WSL2安装的问题,想请教下各位:
我的环境是Ubuntu 22.04作为主机,用VirtualBox运行一个Windows 10虚拟机。因为实在不习惯Cmd和PowerShell,只想在Win10虚拟机里装个WSL2来用Bash终端。
按照WSL的安装步骤操作后,看起来好像安装成功了,但打开Windows Terminal里的Bash标签时,却弹出了这个错误:
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
Press any key to continue...
[process exited with code 1 (0x00000001)]
错误详情里明确提示:
Error: 0x80370102 The virtual machine could not be started because a required feature is not installed.
Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.
我查了相关排障内容,里面提到如果是在虚拟机里运行的话,需要手动启用嵌套虚拟化,步骤是用管理员身份打开PowerShell,运行这条命令:
Set-VMProcessor -VMName Windows10 -ExposeVirtualizationExtensions $true
但我在Win10虚拟机里的管理员PowerShell中运行这条命令时,却得到了报错:
Set-VMProcessor : The term 'Set-VMProcessor' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
- Set-VMProcessor -VMName Windows10 -ExposeVirtualizationExtensions $tr ...
- CategoryInfo : ObjectNotFound: (Set-VMProcessor:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
我在VirtualBox的GUI里看到这个虚拟机的名称确实是Windows10,难道名称不对吗?另外,我是不是应该在主机的Ubuntu系统里做些什么操作?还有,我已经进入BIOS确认过AMD-V虚拟化是开启状态的。
请问各位还有什么其他可以尝试的解决办法吗?
备注:内容来源于stack exchange,提问作者mLstudent33

