Giter VIP home page Giter VIP logo

Comments (7)

okibcn avatar okibcn commented on July 25, 2024 1

@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.

okibcn avatar okibcn commented on July 25, 2024 1

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.

okibcn avatar okibcn commented on July 25, 2024

@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.

jerodway avatar jerodway commented on July 25, 2024

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.

okibcn avatar okibcn commented on July 25, 2024

@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.

Aldo-f avatar Aldo-f commented on July 25, 2024

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.

okibcn avatar okibcn commented on July 25, 2024

Release 8.5 fixes the issue.

Thanks for helping with it.

from wslcompact.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.