DEV Community

Move docker-desktop-data distro out of System Drive

Kim CH on June 03, 2020

By default, Docker Desktop for Window will create 2 distros below docker-desktop docker-desktop-data If we access the path %LOCALAPPDATA%/Docke...
Collapse
 
brianhvb profile image
Brian Houle • Edited

This seemed to move %LOCALAPPDATA%\Docker\wsl\data\ext4.vhdx, but left %LOCALAPPDATA%\Docker\wsl\distro\ext4.vhdx in place, which is currently in use by Docker Desktop.

Is there a way to export/move this to a different drive as well?

Collapse
 
cesarchamal profile image
Cesar Chavez

You can do the same thing but change for docker-desktop

wsl -l -v
wsl --shutdown docker-desktop
wsl --export docker-desktop E:\docker-desktop\docker-desktop.tar
wsl --unregister docker-desktop
wsl --import docker-desktop E:\docker-desktop\distro E:\docker-desktop\docker-desktop.tar --version 2

Collapse
 
jotcomponents profile image
Jotcomponents

Thanks very much for the procedure. It is working on Win11 WSL2. But before 'Step3: Start Docker' it was necessary to restart Win (as it is also recommended in 'Resource#2 Moving Docker wsl files').
Remark: Resource#1 link is no more valid.

Collapse
 
alexvovk profile image
Alex

Very helpful! Thank you!

Collapse
 
khashashin profile image
Yusuf Khasbulatov • Edited

After I moved the docker-desktop-data (ext4.vhdx) All my folders under /mnt folder was empty.

Collapse
 
bernardbr profile image
Bernardo Esbérard

Thanks man! You've helped me a lot... :D

Collapse
 
lorenzo_sandini profile image
Lorenzo Sandini

I am joining the choir singing your praise ! Thanks a bunch :)

Collapse
 
mustafakurkcu profile image
Mustafa Kürkcü

Thank you

Collapse
 
arvindd profile image
Arvind Devarajan

Hey, thank you for this! Good hint :-)

Collapse
 
sd2020bs profile image
sd2020bs

thank you, man!

Collapse
 
willemodendaal profile image
Willem Odendaal

My C drive thanks you!

Collapse
 
jeyaramj profile image
Jeyaram Jeyarajah

Thanks a lot. This helped me a lot. I was so close to partitioning my pc to use more space in C :D and found this page..

Collapse
 
minhlong profile image
Timmy

Thank you so much, it helped me so much.

Collapse
 
azadnezamdoust profile image
Azad

Thank you Kim.

Collapse
 
ray_8157 profile image
BAOBAO SNOW

Thank you! I hope to resolve my issue smoothly.

Collapse
 
maxoyed profile image
maxoyed

Thanks a lot, that saved my C drive!