move-wsl
move-wsl copied to clipboard
The process cannot access the file because it is being used by another process
Describe the bug
After this:
There was E:\wsl\ext4.vhdx
When I issued wsl
, a window flashed out and I could not get into ubuntu.
I issued wsl --list --verbose
and could find ubuntu, but its state was "stop".
Then I try wsl --unregister Ubuntu
Now wsl --list
shows nothing, but E:\wsl\ext4.vhdx is still there.
How can I use the E:\wsl\ext4.vhdx? I have important files in that ubuntu distro
In pwsh.exe:
PS C:\Users\MeMeMe> wsl --import Ubuntu E:\wsl E:\wsl\ext4.vhdx The process cannot access the file because it is being used by another process
Was there no output by the script?
Why did you run wsl --unregister Ubuntu
?
I don't think you can import ext4.vhdx
only *.tar
files
I would try to re-register the WSL distro via Registry.
I think I tried to fix something like this in #32
We don't know, as they didn't provide any logs or steps.
Was there no output by the script? Why did you run
wsl --unregister Ubuntu
? I don't think you can importext4.vhdx
only*.tar
filesI would try to re-register the WSL distro via Registry.
The output of move-wsl.ps1 is :
Done!
Then I thought everything was OK, and wanted to start using my ubuntu. I issued wsl, then a window flashed out and I could not get into ubuntu.
I searched with keywords "wsl state stop", and found an issue in wsl official repo, and a comment adviced using wsl --unregister Ubuntu
. Now I think that comment is misleading.
"re-register the WSL distro via Registry"
Today I read https://github.com/microsoft/WSL/issues/4591#issuecomment-541293155
and here is my HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss
:
Should I do this and press OK
now ?
Sorry, I am not on Windows anymore, so I cannot test. Either this or that: https://github.com/microsoft/WSL/issues/4591#issuecomment-653617982
@sisrfeng please dont change registry settings without you knowing what they do or you trust the source. I will get back to you once I figure out the root cause for this.
Hi, any update? Many thanks~
Hi, @SayakMukhopadhyay, any update? Many thanks