WSL: Insufficient system resources exist to complete the requested service.
Please fill out the below information:
- Your Windows build number: (Type
verat a Windows Command Prompt)
Microsoft Windows [Version 10.0.19041.264]
- What you’re doing and what’s happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
Trying to execute kali linux in WSL2 results into an error
- What’s wrong / what should be happening instead:
The error is Insufficient system resources exist to complete the requested service. however the instance should run correctly. Rebooting solves the issue
Restarting the HV Host Service seems to work too.
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 54
- Comments: 146 (28 by maintainers)
Thank you @avinash311. With those logs we confirmed our theory.
So the issue is that the underlying hypervisor platform needs to allocate a few contiguous pages when starting a VM. This usually isn’t a problem, but the number of pages grows depending on the number of CPU’s allocated to the VM (which is why this error is more likely on modern AMD CPU’s, given how many cores they have).
So to sum up, even though it appears that the host has enough available memory to start WSL2, the underlying VM fails to use this memory because of physical memory fragmentation.
While we are working on a long-term issue, you can reduce the number of CPU’s allocated to WSL2 in
.wslconfig:I have the same issue and the temporary work-around in [comment #5231 resolved it:
notepad $env:USERPROFILE\.wslconfig(ornotepad %USERPROFILE%\.wslconfigin CMD)You can also try
2or1for the value ofprocessorsas well, if4doesn’t work.System specs:
Then 16 threads and 32Gb of RAM. This issue #5240 was very similar. Try creating a
.wslconfigfile and reduce the numbers of processors and RAM used for the WSL2 VM.Ryzen 9 5900HS, 16GB RAM Windows 10 Pro
Solved by adding
.wslconfigfile in the User directory (C:\Users\username)In explorer, type in address bar:
\\wsl$then enter. It will show linux path. Then you can click the linux symbol in navigation pane to list the linux path.I am using Insider 19624.1000. In previous build, there isn’t any error like that. But in the build I am using right now, it will show Insufficient system resources exist to complete the requested service when you click the linux symbol in navigation pane without accessing
\\wsl$first.I haven’t had this error since I removed the Quick Access entry (granted, it’s only been 3 days), however, I did see a different error yesterday (which was also fixed by logging out and in):
It’s weird that pretty much everyone who is facing this issue has a Ryzen CPU.
Edit: the original issue happened again.
Thanks for your patience, we’re still investigating how to better support CPUs with many cores.
Just had the same issue on a Ryzen 4800h with 16G of RAM running a Windows 10 Pro v2004 build 19041.388. I am using Ubuntu mostly for git/gcloud/kubectl tools. Not using Docker or any webserver for local dev.
Adding the
.wslconfigfile in my home dirC:\Users\<username>\.wslconfigfixed it for me (no OS restart needed) with the following content:The issue just started to appear today, worked perfectly until today for me. I was seeing this error when trying to lunch
Ubuntu(version 20.04.1 LTS is installed) via the Start menu.Happened to me as well Running
taskkill /f /im wslservice.exetaskkill /f /im explorer.exe(as administrator) Fixed it for meSame problem here:
After trying a lot of things the solution was:
Tested and worked again. Thank you!
Faced with this for the first time. It happens after Win10 was updated (currently 22H2, 19045.4046). As it was mentioned above, logging out and then back in solve the issue. Didn’t try anything else
I’m unsure as to what went wrong but the very concise fix in https://github.com/microsoft/WSL/issues/5231#issuecomment-1275227167 worked for me.
This morning I suddenly hit this problem and couldn’t start my WSL2 shell.
Shut down my PC, rebooted, not fixed, and Docker Desktop (in WSL2 mode) also didn’t start (I had it killed before rebooting so I’m not sure about the previous state).
I turned off Fast Startup, shut down the system, booted again and the problem disappeared (Docker/WSL2 working again)
Ryzen 5 2600, RAM 16GB
If people didn’t spam this thread with useless messages you could see the message saying it’s related to high core count: https://github.com/microsoft/WSL/issues/5231#issuecomment-693104998
Windows 10 2004 Ryzen 2600, 16GB RAM
The issue seems to occur when less than 50% of the RAM is available.
Had a similar error and also a Ryzen cpu!😉 for me the following config worked: created a .wslconfig file in my home directory with the following:
I think specifying the memory is sufficient. Hope this helps anybody.
I wonder if it has anything to do with the fact that I added
\\wsl$\Debianto my Quick Access menu. When I open the File Explorer shortly after logging in, the Debian entry doesn’t initially show up in the Quick Access menu (only after a while).@rescenic mentioned that they can reproduce this issue when they try to access the VM’s folder directly, without entering
\\wsl$first. Maybe this happens when the system tries to load the folder in the Quick Access menu too?I’ve deleted the entry from the menu now and I’ll let you know how it goes!
Experienced this when trying to launch WSL after playing a RAM intensive game on a R7 5800X + 16GB RAM. Restarting HV Host Serivce didn’t do anything immediately, but after a few minutes it launched successfully. RAM usage was around 50%
Same Issue Specs:
This is my whole
.wslconfig:After adding the last line, I stopped getting the message, but instead I just get a blinking cursor on a new line and
Ctrl+Cdoesn’t do anything…I also tried (
processors=2), (processors=1andmemory=1MB) and (removingguiApplications=false)I lowered my memory down from 2GB by halving it until I reached
memory=1MBwhen it was again able to “run” again. I doubt that my computer memory is so fragmented. 32 GB of memory, 17.1 GB available should be well enough to start WSL with at least 2 GB. I would say it is bug with WSL if it simply refuses to allocate memory for VM or issue with MS virtualization layer. CPU: AMD Ryzen 7 PRO 4750UThe WSL accepted to run it, but of course WSL is unable to start with only 1 MB of memory.
WSL OOM-killer kept killing pacman in Arch, ended up it crashing it while upgrading of glibc… Now have to scrap whole WSL image and recreate from scratch…
Removing from Quick Access instantly solved the problem for me.
I was having the same problem(Ryzen 5 3550H and 8GB memory with Windows 10 21H2). Removing the WSL shortcut from the Files app(not the inbox File Explorer - I didn’t have the shortcut enabled there) solved the problem.
Seems like WSL works fine with shortcuts enabled in file explorers in Windows 11, but bugs out for Windows 10, at least that’s true in my experience.
Same issue here, Ryzen 7 1700 and 8GB, however, after some reboots it finally worked.
Disabling my McAfee fixed this problem for me.
I’m currently on hiking vacation. Will test it on Wednesday soonest.
@petrroll : We have a theory on what could cause this issue: this could be due to memory fragmentation.
To validate that, can you please do the following:
"C:\Program Files\DTrace\dtrace.exe" -s HvDeposit.dJust had the same issue on my laptop Ryzen 5 2500U 8GB RAM
Managed to fix it by plugging in the charger and restarting my laptop.
SystemBasicInformation
That’s in which class? Would probably be better if you provided us with the exact code you want us to run the query the specific information.
Ryzen 5 3500U + 8 GB RAM (2GB for integraded GPU)
It worked after limiting the processors value to 1, any higher and it doesn’t work
.wslconfig:
Ryzen 5 2500U + 8 GB RAM (1.1 GB reserved for integrated GPU)
Creating .wslconfig file, and assigning only one processor worked for me. When i set “processors” value to any number larger than 1, error continues to occur. “memory” value do not have any impact on this, so I removed it.
.wslconfig:
Could somebody please take a trace: https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-detailed-logs
Same on: Ryzen 5 3500U with Vega 8 Graphics 8GB RAM Microsoft Windows 10 [Build 19041.329]
Exit code: 4294967295 Trying to run WSL 2 Ubuntu from Microsoft Store. The above snippet does not change anything for me.
Do you all have Fast Startup enabled? Try turning it off, reboot Windows and see if the issue still happens.