-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: 0x8007000e Not enough memory resources are available to complete this operation. #5240
Comments
With 32Gb RAM the problem is probably a too small virtual memory page file. |
@onomatopellan That's already checked. The page size is 4.8GB |
Do those errors appear instantly of after a while? Take a look at C:\pagefile.sys to see if it grows during the conversion. |
Yes they are instant. Should I try manually increasing the pagefile to something larger than 4.8 GB? |
Yes, and also last option is to disable pagefile in every drive. |
@onomatopellan I tried increasing the pagefile to 16GB, rebooted, same error |
Manual import is also not working
|
Ok, then set it to "Automatically manage" again. I 'm seeing in your Windows Error Reporting logs you had plenty of errors in last 3 days. (PerfWatson, devenv.exe, Chrome) First one was on 5/18. Just to make sure RAM is ok run the Windows Memory Diagnostic. |
I found a solution. I manually created a file called .wslconfig in %userprofile% with this content:
and now it's working 🎉 |
@onomatopellan thank you a ton for helping :) Do you know how to increase the memory and proc count of my distro after I already created it?
but the VM still comes up with just 4GB and 4CPUs |
you need to |
I had the same problem! In fact, Docker crashes hard with the same error message if I use Linux containers (which is the default). I do have "Automatically manage paging file size for all drives". Right now I only have a 10G page file, and a 27G Hiberfil I have 64GB of RAM and 41GB of RAM available. I DO have a NUMA setup - dual Xeon processors. I'm currently running Windows Workstation. I thought maybe that was the problem as clearly I have plenty of RAM, with both processors. I am running Hyper-v but leave most of the VM's shut down. The docker people weren't any help at all, despite me uploading several logs. Interestingly, my laptop, which as 48G, ran Docker fine. Single physical CPU. Also has Hyper-V, VM's shut down. So I tried the wslconfig and that fixed both WSL2 as well as Docker with Linux containers. It's still a bug, IMHO - needs to be fixed, but at least this is a workaround. Thank you!
P.S. For those that claim we need 2x physical as a swap file - that's long obsolete. I do NOT need 128G of swap. I'd rather have little to no swap, and let processes run out of RAM. Having absurdly large amounts of swap makes a system less stable (I ran an Oracle Consulting company and installed thousands of Linux/Unix hosts. We always had the same problem with Oracle's scripts; often we'd just set the settings up high, then the client sysadmin would restore them :) |
Maybe the setup program is using an int, and blows up if you have more than 4Gig? o.O It's weird it works fine on a 48G system, and not at all on a 64G system. Does that give us a clue?
|
also having the same issue, host has 16GB, tried everything I found, and nothing helped... still "0x8007000e Not enough memory resources are available to complete this operation". It seems to me related to recent windows updates, since it used to work flawlessly (at least WSL 1 for me) about a month ago, and now it's all broken. Docker also does not work, as it requires Hyper-V... UPDATE. Just figured my issue out -- service "Hyper-V Host Compute Service" was in disabled state, it seems to be the reason for "Hyper-V Virtual Machine Management" to fail with such a misleading error! |
Did you try the .wsl config? That absolutely fixed my problem. I also updated the Docker folks. They just pass on the error message without explaining WHERE it came from. |
@jgwinner, i've updated my comment -- my issue had a completely different reason, but i was confused by totally irrelevant error message. |
I have the same error with this setup:
I just upgraded to 20H2 and installed WSL: Run in PowerShell as Administrator:
Downloaded and installed "WSL2 Linux kernel update package for x64 machines". Installed Ubuntu 20.04 from Microsoft Store. Now when I start Ubuntu from Start Menu or run in shell window the error is this:
I have tried setting up
Event Viewer does not show any errors for Hyper-V when starting Ubuntu install. It does show that it successfully starts up things and then deletes immediately as the install fails. I have rebooted. Page file is managed by Windows. I am using Docker on this Windows and it's working just fine so I think virtualization must be OK. What memory resource does the install process need to have? How can I allocate more for it? |
You're showing ~$ cat ... dumb question, but are you doing this in the Windows shell? That looks like GitHub desktop. I'd try plain DOS, maybe it's CR\LF sensitive. |
Actually I did it in Git for Windows Bash shell - I want to replace my MINGW "linux" with WSL2 :) The |
This did not help: "Settings > Apps and Features > Ubuntu 20.04 LTS > Advanced options > Reset" (clutching on any straws here... inspired by https://stackoverflow.com/q/60377834/339052) |
Same error with Alpine WSL from Microsoft Store:
|
WSL1 works: I uninstalled WSL rebooted etc and did only:
PS C:\Users\xxx> wsl --set-default-version 1
PS C:\Users\xxx> wsl
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
PS C:\Users\xxx> Alpine.exe
Temporary directory: C:\Users\xxx\AppData\Local\Temp\wsl_Alpine_setup
Downloading : http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/x86_64/alpine-minirootfs-3.12.1-x86_64.tar.gz
To local file : install.tar.gz
The current working directory is: C:\Users\xxx\AppData\Local\Temp\wsl_Alpine_setup
File successfully deleted
Mime type available
Begin download
Cache filename available
100% [====================]
End download
Downloaded OK
Hash of file install.tar.gz is: 5c81856823d1ee629af5245d4023a31f0144696c00edc9091db43c404e1cd02b
Verifying Hash: OK
Installing, this may take a few minutes...
Executing bugfixing command: /bin/chmod 755 /
Executing bugfixing command: /sbin/apk --no-cache add shadow
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
(1/2) Installing linux-pam (1.3.1-r4)
(2/2) Installing shadow (4.8.1-r0)
Executing busybox-1.31.1-r19.trigger
OK: 8 MiB in 16 packages
Executing bugfixing command: /bin/sed -i 's/^export PATH/#export PATH/' /etc/profile
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: wsl
To (re-)set root password run `wsl.exe --user root --distribution Alpine passwd`
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
mycomputer:~$ pwd
/home/wsl |
... but trying to convert installed WSL1 Alpine to WSL2 fails:
|
I'm getting all the same issues as @apa64 - I'm on Windows 10 1909 with 32GB of RAM. The ~/.wslconfig file didn't help as that seems to have been added in a later build of windows. Are there any logs I can provide to help diagnose this issue? |
Without knowing how or what calls what when WSL is registering Ubuntu for WSL 2... Is it using WSL-DistroLauncher? I found these references to HRESULT WslApiLoader::WslRegisterDistribution()
{
HRESULT hr = _registerDistribution(_distributionName.c_str(), L"install.tar.gz");
if (FAILED(hr)) {
Helpers::PrintMessage(MSG_WSL_REGISTER_DISTRIBUTION_FAILED, hr);
}
return hr;
} HRESULT InstallDistribution(bool createUser)
{
// Register the distribution.
Helpers::PrintMessage(MSG_STATUS_INSTALLING);
HRESULT hr = g_wslApi.WslRegisterDistribution();
if (FAILED(hr)) {
return hr;
}
... |
Thank you guys, wanted to summarize that: %USERPROFILE%.wslconfig [wsl2] wsl.exe --shutdown fixed for me being low on memory in docker container. |
|
Do you get this error while converting to WSL2 ? This is different, it changes RAM allocation when you are allready on WSL2. Unfortunately it doesn't work for me either. It changed my RAM inside the WSL container from 3GB to 8GB, but any succcesive atempts did nothing, It is stuck on 8GB now, no matter what i set with memory=... |
No change with the newest Windows update:
I have no
|
These steps works for me 1.re-enable wsl subsystem module, reinstall ubuntu App 2.add %USERPROFILE%.wslconfig wsl.exe --shutdown 3.and also: #2576 (comment) Find out the name of the problematic distribution by using
wslconfig /list |
@apa64 Did you get it fixed? What worked? I have tried everything in this thread (among others) with no luck. |
No, I never found a solution. Eventually I got a new laptop and then everything just worked, Win 10 + WSL 2 with normal install instructions. |
Running Win 10 with UEFI as Host and trying to Deploy Server 2016 Images; GPEdit.msc >Local Policy >Computer Configuration >Administrative Templates >System >Device Guard >Turn on Virtualization Based Security = Disabled Turning VM Security off in GPO fixed my issue. |
I am having the same issue as apa64. Unfortunately, none of the recommendation on this threat help :( |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Microsoft Windows [Version 10.0.19041.264]
Setting of an existing WSL 1 distro to WSL 2. E.g: Ubuntu 20.04 :
Or installing a new distro after setting the default version to 2 with
wsl --set-default-version 2
. E.g: Alpine WSL:Unable to use WSL 2 at all 😞. Error message:
Not enough memory resources are available to complete this operation
.The text was updated successfully, but these errors were encountered: