因为要准备华为软挑,官方执行机的运行环境是ubuntu18.04,故有此文。
关于配置wsl虚拟机的参考教程:https://www.cnblogs.com/thebinarypoet/articles/17479197.html
前面一切正常,但打开ubuntu18.04尝试安装的时候发生了报错:
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.
For information please visit https://aka.ms/enablevirtualization
Press any key to continue...
这个问题通常是没开虚拟化导致的,但是我确实已经开了:
上网查询资料后发现是wsl2在安装时可能会出现bug,于是我切回了wsl1,成功安装:
wsl1就wsl1吧,也不是不能用;
笔记本配置完后我继续在台式机上进行配置,然而当再次尝试在wsl2下安装时,却奇妙的成功了:
台式机的系统盘是笔记本拷贝过来的,为什么会发生这种问题我也是一头雾水,最后也没有搞清楚原因。
PS:关于如何关闭虚拟机:
wsl.exe --shutdown