I think that should be “data-root”: “d:\\docker”
Thanks. This migrated the existing MobyLinuxVM to new drive/location!
One has to remember to change the path at two more locations for everything to work smoothly:
- in Hyper-V manager --> Hyper-V Settings… path for virutal hard disks and virtual machines.
- in docker context menu --> settings --> Advanced as well,
before restarting otherwise it creates one again in C: drive.
With these, docker errored out once, restarted machine and now everything is working well out of D: drive. Existing images, migrated in the first step (suggested by matthuisman) are accessible too!
I have the same issue. did you solve it.
I can’t find where is this GUI
Please note the important difference between Windows and Linux, when you switch to Windows Containers, you can set the the config (Settings → Docker Engine) to use a different drive
{
"registry-mirrors": [],
"insecure-registries": [],
"debug": false,
"experimental": false,
"data-root": "E:\\windowscontainers"
}
When you switch to Linux Containers a different config is used
{
"registry-mirrors": [],
"insecure-registries": [],
"debug": false,
"experimental": false,
"features": {
"buildkit": true
},
"builder": {
"gc": {
"enabled": true,
"defaultKeepStorage": "20GB"
}
}
}
You cannot set something like “data-root”: “E:\windowscontainers” because that location does not exist inside the virtual disk. When using Linux Containers, you have to move the underlying Hyper-V Virtual Machine disk
Hi, I found this directory with a ext4.vhdx file :
C:\Users[YOUR USERNAME]\AppData\Local\Docker\wsl\data
There is no Hyper-V directory under C:\Users\Public\Documents!