Error Wsl/Service/CreateInstance/CreateVm/HCS_E_SERVICE_NOT_AVAILABLE Wsl/Service/CreateInstance/CreateVm/HCS_E_SERVICE_NOT_AVAILABLE

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.

insert image description here

processing method

  1. Open Programs and Features
    Press Win the key, enter appwiz.cplEnter
    insert image description here
    or use the combination key Win + R start the running window appwiz.cplEnter
    insert image description here
  2. After entering the program and function interface, click启用或关闭Windows功能
    insert image description here
  3. Check 虚拟机平台the box, wait for the function to be installed and restart the computer according to the prompts.
    insert image description here
  4. After restarting, we can search bashor wslshortcut commands to enter the subsystem to operate
    insert image description here

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:

  1. Open PowerShell or Command Prompt (admin privileges).
  2. Enable command:
	dism.exe /Online /Enable-Feature /FeatureName:VirtualMachinePlatform /All
  1. close command
	dism.exe /Online /Disable-Feature /FeatureName:VirtualMachinePlatform /All
  1. Remember to restart your computer after waiting for the command to complete.

Guess you like

Origin blog.csdn.net/no1xium/article/details/131285182