Hello, I need some help with relocation on docker-desktop-data in new version of Docker Desktop.
Originaly I had Docker Desktop disk location in %LOCALAPPDATA%\Docker\wsl\disk on logical Drive C:
I changed path to new location D: with commands: wsl --export docker-desktop-data D:\docker-desktop-data.tar wsl --unregister docker-desktop-data wsl --import docker-desktop-data D:\Docker\wsl\data D:\docker-desktop-data.tar --version 2
I had new location of docker-desktop-data with path D:\Docker\wsl\data\disk\docker_data.vhdx
Docker-desktop was located in %LOCALAPPDATA%\Docker\wsl\distro\ext4.vhdx, after some updates it was relocated to %LOCALAPPDATA%\Docker\wsl\main\ext4.vhdx.
After update on version 4.46 Docker Desktop was moved to Disk, where docker-desktop-data located: D:\Docker\wsl\data\disk\ext4.vhdx.
After this update in wsl distros docker-desktop-data was removed.
Question: How can I move docker-desktop-data to new location E: in this version of Docker Desktop because I don’t have this distro in wsl now?
I think you described the same, so I just repeat it in case of I misunderstand you. The docker-desktop-data distribution was removed long time ago, and as you pointed out, now there is still a data disk. It is mounted into the docker-desktopdistribution. You yhould be able to move that by using the GUI. Go to Settings » Resources » Advanced and look for “Disk image location”.
This is the official way, but there were reports about it not working occasionally. I hope it will work for you.
Yes, but I have docker_data.vhdx abot 70GB in another folder, that is mounted to docker-desktop for old docker users, that use docker befor removing docker-desktop-data. How can I move It with main ext4.vhdx about 120MB. Main ext4 I can move with “Disk image location” as you advise me.
I can’t confirm as I don’t have an old DD installation to test, but I have the feeling that the new and the old images don’t have the same folder structure, so I would try to
mount the disk somewhere into a WSL2 distribution (which you have already done if I understand you correctly),
create new volumes in a the Docker Desktop
Open a shell in a WSL2 distribution for which you enabled WSL2 intergation so the docker command is available in it
run a simple bash container that mounts the volume and also bind mounts the docker data root (or directly the volumes folder in it) and copy the volume contents only to the newly created volume.
I’m not sure if this will workeasily as I described, but this is the idea. I never had to do this, because use other platforms more frequently and I don’t store data usually in the default volumes folder under the Docker data root, unless it is just emporary. When using WSL2 integration, I can mount a folder from my own WSL2 distribution.
I hope you can use some of the ideas. Feel free to ask back if I was not clear, but I’m not sure how frequently I will visit the forum for answering questions until Sunday…