I installed "Podman Desktop" (on windows 10), now i need to move the folder in which podman save containers to another disk because it reached 50GB (!), i notice that the default is in "C:\Users\my_user\.local\share\containers...", i want to move it to "D:\podman" (for.ex)
I searched a lot but didn't find any option to do this in Podman desktop settings(neither in configuration files)
I really wonder if this seemingly simple and common operation isn't handled in some Podman Desktop UI option (or configuration file)
Thank you
podman on Windows normally uses WSL backend, the VM is stored as a single vhdx file, so the following should work to move it:
1- stop your podman VM:
podman machine stop
. check withwsl -l -v
and see "Stopped" state.2- the VM should be in a folder
podman-machine-default
under%USERPROFILE%\.local\share\containers\podman\machine\wsl\wsldist\
.movecopy this folder (not just vhdx) to your other drive such asd:\DevTools\podman-dist\
(no move, just copy)3- make sure you have backups, then apply
wsl --unregister podman-machine-default
4- import from the vhdx you have just copied to other drive:
wsl --import-in-place podman-machine-default d:\DevTools\podman-dist\podman-machine-default\ext4.vhdx
5- restart it
podman machine start
WARNING: The procedure is only moving the vhdx and can cause data loss if there are customizations I am not aware, so make sure you have enough disk space and maybe another backup of vhdx. Also check carefully if there are other things coupled before this.
in case you can reload all your containers from scratch, then before doing the above steps, you can remove the default machine with
podman machine rm
and create it fresh withpodman machine init
. this way you will have only 700MB to deal with. the init still uses default location.