Closed leechor closed 4 months ago
I just experienced the same problem.
Me too. In my case E: drive point to a C: drive directory. It seems not to be a permission problem because DockerDesktopWSL and its subdirectory were created. To solve i set the C: drive directory, but i need to know why i can't use E: drive
It's nice to see Docker Desktop has native support now. However, not being able to move it to another disk defeats the purpose for me completely! And with the workaround not working I can basically no longer use DD on my machine as I don't have enough disk space on my system drive ...
It's nice to see Docker Desktop has native support now. However, not being able to move it to another disk defeats the purpose for me completely! And with the workaround not working I can basically no longer use DD on my machine as I don't have enough disk space on my system drive ...
@black-snow if you have a new installation try this:
D:\my_custom\path\
%APPDATA%\Docker
(typically, C:\Users\settings.json
with your favorite editor.customWslDistroDir
or create a new one if that doesn't exist."customWslDistroDir": "D:\\my_custom\\path",
wsl.exe --unregister docker-desktop
wsl.exe --shutdown
(note that this will also stop any other WSL distribution you might have)
8.. Start Docker Desktop again@MentalFS @black-snow @m-zanetti would you please be able to provide more details (and ideally a diagnostics ID) of the error you get when trying to move your WSL distributions via the UI? It'd be great if you could try that out from 4.31.1.
I was about to get working on this bug, only to realize that a fix to support moving WSL2 distributions to other drives had been merged a while back; but, given your comments, there are probally still issues.
For example, I did move my distros from my default location on C:\
to a D:\
drive with no issues from the UI of 4.31.1.
Any help to reproduce your problems so they can be properly addressed will help.
Docker Desktop version: 4.31.1
[2024-06-17T19:23:07.702752500Z][com.docker.backend.exe.app] stopping wsl2
[2024-06-17T19:23:08.762055100Z][com.docker.backend.exe.app] moving WSL data from "" to "W:\\Docker\\Data\\DockerDesktopWSL"
[2024-06-17T19:23:08.762055100Z][com.docker.backend.exe.app] no data distro to move at "C:\\Users\\xxx\\AppData\\Local\\Docker\\wsl\\data\\ext4.vhdx"
[2024-06-17T19:23:08.762055100Z][com.docker.backend.exe.ipc] 7b64cae1-wsl-settings -> \\.\pipe\dockerBackendApiServer BackendAPI
[2024-06-17T19:23:08.762055100Z][com.docker.backend.exe.ipc] (21725ec7) 7b64cae1-wsl-settings C->S BackendAPI POST /notify/messagebox/display: {"buttons":[{"label":"Close","url":""}],"description":"An error occurred while migrating the Docker Desktop WSL data disk to its new location:\n\nmoving disk file: rename \u003cHOME\u003e\\AppData\\Local\\Docker\\wsl\\disk\\docker_data.vhdx W:\\Docker\\Data\\DockerDesktopWSL\\disk\\docker_data.vhdx: The system cannot move the file to a different disk drive.\n\nDisk image location will be reverted to its original setting.","kind":"error","optoutID":"","title":"Error migrating WSL disk"}
[2024-06-17T19:23:08.762558400Z][com.docker.backend.exe.ipc] (21725ec7) d72349ea-BackendAPI S<-C 7b64cae1-wsl-settings POST /notify/messagebox/display
[2024-06-17T19:23:08.762558400Z][com.docker.backend.exe.ipc] (21725ec7) d72349ea-BackendAPI S<-C 7b64cae1-wsl-settings bind: {"buttons":[{"label":"Close","url":""}],"description":"An error occurred while migrating the Docker Desktop WSL data disk to its new location:\n\nmoving disk file: rename \u003cHOME\u003e\\AppData\\Local\\Docker\\wsl\\disk\\docker_data.vhdx W:\\Docker\\Data\\DockerDesktopWSL\\disk\\docker_data.vhdx: The system cannot move the file to a different disk drive.\n\nDisk image location will be reverted to its original setting.","kind":"error","optoutID":"","title":"Error migrating WSL disk"}
[2024-06-17T19:23:08.986957800Z][com.docker.backend.exe.ipc] 09c7176b-PauseHDL /pause/events <-- 2024-06-17T21:23:08.986957800+02:00 (64163502) ipc connecting:
[2024-06-17T19:23:08.986957800Z][com.docker.backend.exe.procd] received state {IsPaused:false PauseText:Docker Desktop is running PauseError: DockerAPI:running Docker:stopped Idle:running State:stopped Mode:linux SessionID:a7365da2-2224-46f7-895a-ad4c377f2c59}
[2024-06-17T19:23:11.288675200Z][com.docker.backend.exe.segment] flushing 3 messages
It created 35 GB of stuff in ther target dir, though.
/mnt/d/docker$ tree -afh
[ 512] .
├── [ 512] ./data
│ ├── [ 512] ./data/DockerDesktopWSL
│ │ └── [ 512] ./data/DockerDesktopWSL/DockerDesktopWSL
│ │ └── [ 512] ./data/DockerDesktopWSL/DockerDesktopWSL/disk
│ └── [ 23G] ./data/ext4.vhdx
└── [ 12G] ./docker-desktop-data.tar
5 directories, 2 files
This is what it dumped. DID: 12A70E18-D373-471A-AE18-86FEAB88283D/20240617222052
Thanks folks for confiming and providing some more detail.
I've confimed that while moving the docker-data-distribution
through the UI across drives is currently supported, moving the data disk isn't yet. We'll work on a fix, and thanks for your patience.
Same problem. Docker version: 4.31.1
It's nice to see Docker Desktop has native support now. However, not being able to move it to another disk defeats the purpose for me completely! And with the workaround not working I can basically no longer use DD on my machine as I don't have enough disk space on my system drive ...
@black-snow if you have a new installation try this:
- Create the directory where to move disk images for example
D:\my_custom\path\
- Quit DockerDestkop
- Go to
%APPDATA%\Docker
(typically, C:\Users\AppData\Roaming\Docker) and open settings.json
with your favorite editor.- Find an entry called
customWslDistroDir
or create a new one if that doesn't exist.- Enter the path that you have created at point 1, note the double slashes ():
"customWslDistroDir": "D:\\my_custom\\path",
- Remove the docker-desktop distribution (note well: docker-desktop, and not docker-desktop-data) with. At the next startup, it will be recreated at the new path you've specified in the settings.json at the previous step:
wsl.exe --unregister docker-desktop
- Shut down wsl with
wsl.exe --shutdown
(note that this will also stop any other WSL distribution you might have) 8.. Start Docker Desktop again
Thanks a lot! The only post that solved my problem of more than 10 websites. So detailed and useful.
It's nice to see Docker Desktop has native support now. However, not being able to move it to another disk defeats the purpose for me completely! And with the workaround not working I can basically no longer use DD on my machine as I don't have enough disk space on my system drive ...
@black-snow if you have a new installation try this:
- Create the directory where to move disk images for example
D:\my_custom\path\
- Quit DockerDestkop
- Go to
%APPDATA%\Docker
(typically, C:\Users\AppData\Roaming\Docker) and open settings.json
with your favorite editor.- Find an entry called
customWslDistroDir
or create a new one if that doesn't exist.- Enter the path that you have created at point 1, note the double slashes ():
"customWslDistroDir": "D:\\my_custom\\path",
- Remove the docker-desktop distribution (note well: docker-desktop, and not docker-desktop-data) with. At the next startup, it will be recreated at the new path you've specified in the settings.json at the previous step:
wsl.exe --unregister docker-desktop
- Shut down wsl with
wsl.exe --shutdown
(note that this will also stop any other WSL distribution you might have) 8.. Start Docker Desktop again
Thanks a lot! The only post that exactly solved my problem. Same problem. Docker version: 4.31.1
I also was able to fix it manually - someone from the docker desktop team though it's a smart idea to have an extra directory within the code.. :-) Exporting the VHXD from 4.29 and the reimporting it to 4.31.1 (original path only, didn't work for me, when reimporting to any other path) worked for me.
btw.. anyone knows whoe how to start wsl 2 with networking bridge mode - is that possible or only supported with wsl 1?
btw.. anyone knows whoe how to start wsl 2 with networking bridge mode - is that possible or only supported with wsl 1?
FOA: wsl --update
Then find or create the '.wslconfig' file in your %USERPROFILE%
[wsl2] networkingMode=bridged vmSwitch=WSL_external ... <- your actual vmSwitch must be here.
is this the "nice" msg from MS that it's time to upgrade to windows 11?
that it's time to upgrade to windows 11?
As mush as I know win11 is much worse. but wsl still the same.
A fix has been issued for this in the latest Docker Desktop 4.32.0, see https://docs.docker.com/desktop/release-notes/
If the issue persists, don't hesitate to reach out!
Docker version 4.34.2
Cannot change the data location disk.
Docker Desktop - Settings not applied An error occurred while applying the "Disk image location" setting. The previous value has been restored.
failed to move WSL disk: moving disk file: rename C:\Users\Master\AppData\Local\Docker\wsl\disk\docker_data.vhdx D:\docker_storage\DockerDesktopWSL\disk\docker_data.vhdx: The process cannot access the file because it is being used by another process.
Diagnostics ID:
BCFA9071-6E10-4653-8ABC-9EA2CD6F7A30/20240921165450
Edition Windows 10 Pro Version 22H2 Installed on 6/29/2024 OS build 19045.4894 Experience Windows Feature Experience Pack 1000.19060.1000.0
This issue is supposed to have been fixed, yet, it is still present. Any suggestions as to how to solve this problem? What another process could be using the file? I tried to shutdown everything that could do it, but still no luck. And really would like to move the Docker stuff from the system disk. It's already 40 GB and I only have a couple of images in it.
log: [2023-04-12T06:31:37.910746600Z][com.docker.backend.exe][I] moving WSL data disk from "" to "F:\docker_image\DockerDesktopWSL" [2023-04-12T06:31:37.911796400Z][com.docker.backend.exe][W] failed to rename, use copy: rename\AppData\Local\Docker\wsl\data\ext4.vhdx F:\docker_image\DockerDesktopWSL\ext4.vhdx: The system cannot move the file to a different disk drive.
ID: 7C66B47D-65C9-48CF-BE6C-D939969BF436/20230412063341