Is there a way to make WSL stop using a distro's filesystem file so that that distro can be exported? #10593
Unanswered
adamkpickering
asked this question in
Q&A
Replies: 1 comment
-
Instead of Kind regards |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I am a Rancher Desktop developer. Similar to Docker Desktop, Rancher Desktop uses WSL on Windows to run Linux containers.
In our next release, we plan to include a "snapshots" feature. This will allow a user to take a snapshot of the state of Rancher Desktop, and restore to that snapshot later. In order to do this, Rancher Desktop uses
wsl.exe --export
andwsl.exe --import
.Of course, before exporting the distro that Rancher Desktop uses behind the scenes, that distro must not be in use. We currently achieve this by using
wsl.exe --terminate
. Prior to snapshots, this approach worked well. With snapshots, our approach looks like this:wsl.exe --terminate
).wsl.exe --export
).But I am running into a problem. When I try to run
wsl.exe --export
immediately after shutting down the backend, I run into the following error:From this, I understand that something is still using the distro's filesystem file (
ext4.vhdx
). In testing, I need to wait 50s-1m for whatever is using this file to stop using it. It also seems that a failed run ofwsl.exe --export
resets this process - I have to wait another 1m in order for it to work.Is there any way of monitoring/expediting this process of giving up the file? I am finding that there is not a lot of documentation out there about this mechanism. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions