Comments (7)
@Aldo-f , we can continue the conversation here from the duplicated issue #8. It seems you have the same problem @jerodway had. I ask you to do the same test. We need to know what is going on.
@jerodway, maybe you could help with the solution you found in your system.
Thanks.
from wslcompact.
Thanks!
Finally We know what is going on. With this info I am sure I will be able to solve the issue of size detection.
from wslcompact.
@jerodway, do you have any special user configuration within your Ubuntu? the Estimated size is provided by wsl, so it might be a configuration colliding with it. Do you have other distros installed and running at the same time? It shouldn't be a issue, but I need more data to know what is going on in your system.
Please try these two commands from PowerShell:
wsl --system -d Ubuntu -e df /mnt/wslg/distro
wsl -d Ubuntu -e df /
And this one from within a WSL shell session inside Ubuntu:
\df /
They should return the same text, but for some reason, in your case, it is behaving differently. It would be nice if you copy-n-paste the output of these three tests into a reply here.
from wslcompact.
Well, initially I could not get the first command to work at all. After a bit of playing around with it, I sorted out that problem and then wslcompact seemed to just start working. Sorry for bothering you
from wslcompact.
@Aldo-f , these are the lines compatible with your distro's name. Do you have any special user configuration within your Ubuntu? the Estimated size is provided by wsl, so it might be a configuration colliding with it. Do you have other distros installed and running at the same time? It shouldn't be a issue, but I need more data to know what is going on in your system.
Please try these two commands from PowerShell:
wsl --system -d Ubuntu-18.04 -e df /mnt/wslg/distro
wsl -d Ubuntu-18.04 -e df /
And this one from within a WSL shell session inside Ubuntu-18.04:
\df /
They should return the same text, but for some reason, in your case, it is behaving differently. It would be nice if you copy-n-paste the output of these three tests into a reply here. Please.
from wslcompact.
Not aware of any special configuration.
Installed Lando with Hyperspace (so that installs docker, lando, ...)
Seems GUI support is disabled on host, don't know if that's a requirement.
I could however use wslcompact
to reduce my ext4.vhdx from 15GB to 13GB. (many thanks ;) )
(had to use $env:TEMP="D:\tmp"
'cause I'm out of space on C: )
> wslcompact
WslCompact v8.0 2023.02.13
(C) 2023 Oscar Lopez
wslcompact -h for help. For more information visit: https://github.com/okibcn/wslcompact
Distro's name: Ubuntu-18.04
Image file: C:\Users\aldo\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx
Current size: 13479 MB
InvalidOperation: C:\Users\aldo\scoop\apps\wslcompact\current\wslcompact.ps1:79
Line |
79 | … $estimated = ((wsl --system -d "$wsl_distro" -e df /mnt/w …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot index into a null array.
Estimated size: 0 +/- 0 MB
The estimated process time using an SSD is about 0 minutes.
> wsl --system -d Ubuntu-18.04 -e df /mnt/wslg/distro
GUI application support is disabled via C:\Users\aldo\.wslconfig or /etc/wsl.conf.
Error code: Wsl/Service/CreateInstance/WSL_E_GUI_APPLICATIONS_DISABLED
> wsl -d Ubuntu-18.04 -e df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc 1055762868 13180200 988879196 2% /
Inside WSL
> \df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdc 1055762868 13180200 988879196 2% /
Details of my .wslconfig (GUI disabled)
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
memory=3GB
# Sets the VM to use two virtual processors
# processors=2
# Specify a custom Linux kernel to use with your installed distros. The default kernel used can be found at https://github.com/microsoft/WSL2-Linux-Kernel
# kernel=C:\\temp\\myCustomKernel
# Sets additional kernel parameters, in this case enabling older Linux base images such as Centos 6
# kernelCommandLine = vsyscall=emulate
# Sets amount of swap storage space to 8GB, default is 25% of available RAM
swap=8GB
# Sets swapfile path location, default is %USERPROFILE%\AppData\Local\Temp\swap.vhdx
# swapfile=C:\\temp\\wsl-swap.vhdx
# Disable page reporting so WSL retains all allocated memory claimed from Windows and releases none back when free
# pageReporting=false
# Turn off default connection to bind WSL 2 localhost to Windows localhost
localhostforwarding=true
# Disables nested virtualization
nestedVirtualization=false
# Turns on output console showing contents of dmesg when opening a WSL 2 distro for debugging
debugConsole=false
# Disable use of GUI?
guiApplications=false # <------ this line
from wslcompact.
Release 8.5 fixes the issue.
Thanks for helping with it.
from wslcompact.
Related Issues (20)
- " A parameter cannot be found that matches parameter name 'DestinationPath'." when following install instructions HOT 2
- Needs 0MB of free space HOT 3
- wslcompact doesn't release space, despite available space HOT 1
- Compact failed HOT 2
- File being used by another process error
- installation broken: "Internet Explorer engine is not available" HOT 1
- Cannot create a file when that file already exists HOT 1
- Applet not found after installing it successfuly HOT 1
- Weird error message about free space HOT 4
- WSL distro corrupted HOT 3
- Please stop the infringement
- Failed to attach disk 'C:\Users\bijay\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The APPX file can not be accessed because it is not encrypted as expected. Error code: Wsl/Service/CreateInstance/MountVhd/0x80070199
- Memory usage 8GB+
- wsl corrupted after compacted HOT 6
- CreateProcessEntryCommon:577: execvpe / failed 13
- How to clear the swap.vhdx at first?
- Estimated size larger than current size
- Failed to compact WSL Ubuntu for errors
- Have 194GB available, yet I need to change TEMP to drive with at least 0 MB free space HOT 3
- Custom VHDX Location?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wslcompact.