okibcn / wslcompact

Compacts the size of the ever-growing WSL vhdx images.
https://github.com/okibcn/wslcompact
GNU General Public License v3.0
800 stars 19 forks source link

Failed to compact WSL Ubuntu for errors #34

Open martinoturrina opened 9 months ago

martinoturrina commented 9 months ago

Running the -c command on a basic Ubuntu image gives the following error:

U:\>wslcompact -c Ubuntu
 WslCompact v8.7 2023.03.01
 (C) 2023 Oscar Lopez
 wslcompact -h for help. For more information visit: https://github.com/okibcn/wslcompact

 Distro's name:  Ubuntu
 Image file:     C:\Users\QXZ1YFT\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx
 Current size:   169137 MB
<3>WSL (25) ERROR: CreateProcessParseCommon:708: Failed to translate U:\
 Estimated size: 3791 +/- 92 MB
 The estimated process time using an SSD is about 1 minutes.
 NOTE: You can safely cancel at any time by pressing Ctrl-C
 Import in progress, this may take a few minutes.
The operation completed successfully.
 WARNING: wslcompact found errors in the current image. It could be a storage problem,
          a corrupted ext4 filesystem, or any other issue. Image not processed.

And then many errors about not bein able to remove files. Result is an additional WSL called wslcompact and no shrinkage of the original.

Any idea?