Open Robula opened 1 year ago
It is quite interesting that the local temp file is not C:\Users\Robula\AppData\Local\Temp\wslcompact\Ubuntu.vhdx
It seems that your temp folder is not under your user folder tree. wslcompact uses the TEMP
variable. Can you check it by typing this in powershell:
ls env:T*
In normal conditions it should return something like:
Name Value
---- -----
TMP C:\Users\Username\AppData\Local\Temp
TEMP C:\Users\Username\AppData\Local\Temp
I don't know what could be happening in your system, a virus, a software changing the temp folder, or an unknown problem with your Windows 11. The command above could bring some light on this issue.
I have been having the same problem (when trying to compact my docker-desktop-data data image). I have successfully compacted this image before, however, I now cannot get past the above messages. I have tried:
wsl --shutdown
prior to wslcompact
wslcompact
immediately after startup (wsl does not open at startup on my machine)TMP
and TEMP
locations to a different drive (external HDD)wslcompact
code to run line 100 (wsl --unregister wslcompact | Out-Null
) before line 99 (Move-Item...
)wsl --shutdown
and a 5 second sleep, after the unregister
command, before attempting Move-Item...
Every time I got the same pair of errors: Move-Item...
failed, causing line 101 $size2 = (Get-Item...
to fail.
Problem with the final copy commands:
Full output:
Here is my $PSVersionTable