Today I was thinking about the WindowsLinux subsystem to research new things, but when I started WSL, the following prompt appeared:
WSL startup error
由于未安装所需的特性,无法启动操作。
Error code: Wsl/Service/CreateInstance/CreateVm/HCS_E_SERVICE_NOT_AVAILABLE
Troubleshooting
So I analyzed the reason, and finally found that the virtual machine platform function in the Windows function did not know when it was cancelled.
processing method
- Open Programs and Features
Press Win the key, enterappwiz.cpl
Enter
or use the combination key Win + R start the running windowappwiz.cpl
Enter
- After entering the program and function interface, click
启用或关闭Windows功能
- Check
虚拟机平台
the box, wait for the function to be installed and restart the computer according to the prompts.
- After restarting, we can search
bash
orwsl
shortcut commands to enter the subsystem to operate
Use the command to enable or disable the virtual machine platform
We can enable the virtual machine platform feature in Windows with the following command:
- Open PowerShell or Command Prompt (admin privileges).
- Enable command:
dism.exe /Online /Enable-Feature /FeatureName:VirtualMachinePlatform /All
- close command
dism.exe /Online /Disable-Feature /FeatureName:VirtualMachinePlatform /All
- Remember to restart your computer after waiting for the command to complete.