WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Error code: Wsl/Service/CreateInstance/CreateVm/HCS/0x80070142

Open Hyper-Dragon opened this issue 7 months ago • 5 comments

Windows Version

Microsoft Windows [Version 10.0.26100.4202]

WSL Version

2.5.7.0

Are you using WSL 1 or WSL 2?

  • [x] WSL 2
  • [ ] WSL 1

Kernel Version

n/a

Distro Version

n/a

Other Software

Trying to start wsl from the command line fails with the bug title. Docker Desktop also fails to start with the following message >>

_deploying WSL2 distributions
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: open \\wsl$\docker-desktop\etc\wsl_bootstrap_version: The specified network name is no longer available.
checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found._

Repro Steps

Update to Win 11 Pro to version 24H2 via Windows Update!

Expected Behavior

WSL (and by extension Docker to still work)

Actual Behavior

Both WSL and Docker (by dependency fail to start)

> wsl
The target device has insufficient resources to complete the operation.
Error code: Wsl/Service/CreateInstance/CreateVm/HCS/0x80070142

and

deploying WSL2 distributions
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: open \\wsl$\docker-desktop\etc\wsl_bootstrap_version: The specified network name is no longer available.
checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found.

Diagnostic Logs

No response

Hyper-Dragon avatar Jun 05 '25 16:06 Hyper-Dragon

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

github-actions[bot] avatar Jun 05 '25 16:06 github-actions[bot]

/emailed-logs

Hyper-Dragon avatar Jun 05 '25 16:06 Hyper-Dragon

Diagnostic information
Found '/emailed-logs', adding tag 'emailed-logs'

github-actions[bot] avatar Jun 05 '25 16:06 github-actions[bot]

WORKAROUND: Enable NUMA Spanning in Hyper-V Settings

Just a heads-up for anyone else running into this problem after updating to 24H2: enabling NUMA Spanning in the Hyper-V Manager settings fixed it for me.

Steps:

  1. Open Hyper-V Manager.
  2. Click Hyper-V Settings (on the host machine, not a VM).
  3. Under NUMA Spanning, check Enable NUMA Spanning.
  4. Apply the setting and reboot.

After doing this, WSL2 and Docker both started working again—no more 0x80070142 errors or "network name is no longer available" messages.

No idea why this works, but it does. Hopefully this helps someone avoid hours of head-scratching.

Hyper-Dragon avatar Jun 05 '25 17:06 Hyper-Dragon

@Hyper-Dragon : thanks for sharing this work around. I'm going to have a chat with the Hyper-V folks to see why this would impact things.

keith-horton avatar Jun 05 '25 22:06 keith-horton