New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker hangs on Disk Image Location change to empty folder on external volume #6803
Comments
I found the similar issue here https://github.com/docker/for-mac/issues/6797, but there wasn't Diagnostics ID, so I'm afraid it would be closed. Don't want to unfocus this issue due a formal errors of templating by another author. |
I have the same problem. After reinstall version 4.16.0 (95345) and change disk image localtion works fine. Then update to latest version 4.18.0 (104112) |
So, to overcome this bug I need to downgrade first my 4.18 (104112) - > 4.16 and then upgrade again 4.16 - > 4.18? Right? |
Yes, by doing that, I successfully changed the disk image localtion to my external hard drive. |
Same problem on latest version (4.19). Hangs indefinitely on changing the docker image directory. |
After uninstall 4.19 and install 4.16.0, it can changes disk image location. |
Same issue. |
Any progress on this? same issue on Windows 10 Pro.
|
Same here +1. Thanks for the workaround with the downgraded versions, that worked for me. As a reference, check the Docker release notes to find where to download an older version: https://docs.docker.com/desktop/release-notes/#4163 |
Same here on 4.20.0 (109717) at macOS Ventura, downgrading to 4.16.2 also worked |
Another workaround that worked for me without downgrading and using a symlink to the external volume: |
Still hangs on 4.21.1 (114176), but workaround with symlink works, but needs to point from data folder in first location to another folder in second location. https://www.howtogeek.com/devops/how-to-store-docker-images-and-containers-on-an-external-drive/ |
I did find a sort of halfway house to sorting this as I was experiencing the same issue, wanting to move my Docker.raw to an external SSD. This is on OSX Ventura. Just bear in mind with this approach you will lose all data in the Docker.raw as it will initialise a new one. Here what I did:-
Just bear in mind this is just moving Docker.raw and not any of the log files etc. I've not bothered moving the rest although I'm guessing symlinking the directory itself further up the path would likely work, but I only really care about moving the main docker disk image file. Why didn't I copy the Docker.raw to the SSD to retain my existing docker images/volumes etc.? Well you could and maybe that would work, but it appears as though the file has a "virtual allocation" of what you set it to (128GB in my case) and doing a copy of that will copy the entire 128GB file so you'll immediately waste a load of space that's not actually been written to. So for me 30GB used out of 128GB would have wasted near 100GB of space on the SSD. I'm sure there's maybe a way of copying while keeping the virtual allocation intact through I can't vouch for the stability of this hack (e.g., not checked/ran into what happens if the disk isn't attached and docker is running or it started up), but appears to be working. I guess you'd probably risk maybe Docker.raw file corruption which it can't recover from and you have to re-initialise a fresh Docker.raw. I hope this helps someone. |
I met the same question. I tried some ways but it failed. Then when I changed my "virtual disk limit" and "Disk image location", and clicked the"Apply & restart" button both, it worked. I hope this can help. My docker desktop version is 24.0.2 |
I'm encountering this issue on v4.21.1 (114176) |
Me too |
same issue with v4.19.0. It costs 60GB, too much to sustain in 256GB system disk. It would be nice to get solved soon. Hopefully 4.21.2? |
Same issue for me with 4.22.0 (117440) on Ventura 13.5 (22G74) using the "Virtualization Framework" option (if that matters). It also seems to take it sometimes without hanging but then a restart of the Docker Desktop app causes it to revert back to the original location and never use the new one. Update
|
Anyone got a solution to this yet? (On mac docker desktop). I have about 15gigs of space left on my main drive and a nvme high speed ext hard drive (Takes about 15 seconds to move 30gigs of ram onto it, its fast) to move it to, but it shits the bed everytime I try. |
Uninstal your current docker installation then install v4.16.xx instead , then move your docker image to external ssd trough setting. Verify docker installation by running some docker sample, and if it success then you can update docker desktop to latest version. This way works on my mac m1 air with 512 GB external NVME SSD |
I couldn't change Disk image location even if I installed v4.16.2 Mac with Apple chip.
|
Confirming the same issue on the following system:
The "Disk Image Location" setting doesn't work. The new location folder is always empty. Also if I change the "Virtual Disk Limit" for example, I see that the size of the default folder ( Almost zero documentation, big tech company and such a result... Cannot believe. |
Downgrading to 4.16.2 did not work for me. Docker still locks up after applying the disk image location change. I'm at a loss. Will I have to buy a new computer just to use Docker? I'm out of disk space. What alternatives are there? Edit: after restarting docker 3x, magically it's working. Edit 2: It seems like Docker (maybe MacOS Monterey in general) has issues with ExFAT filesystems, switching to APFS resolved issues such as incorrect |
Almost zero documentation, big tech company and such a result... Cannot believe. |
|
Related #6797 |
Has this EVER worked? I've bug reported this years ago. It was just ignored then, and seems to be now as well. Also, if you symlink to the volume instead, it kind of works, but if you try to update/change size to the image, the image goes corrupt and docker dies really really hard, like having to manually dig through and remove config files because "reset to defaults" crashes docker hard... |
I think it might not work because of macOS security limitations... I saw that Google Drive also doesn't allow changing the location setting for file streaming because of the "file provider" (https://support.google.com/drive/answer/12178485) and the Google Drive for macOS doesn't allow change the location in settings (it becomes gray). |
Moving to my preferred location and then adjusting it in |
As you did |
Yes this finally worked on the latest version 4.25.1 |
issue still present on version 4.25.1 "fix" that worked for me: |
Interesting because I did the same thing but docker would just create an empty folder called DockerDesktop and that's it, I had to override settings.json to a location in the external ssd and only then it created Docker.raw (It was writing at full write speed on ssd for a couple of minutes also) |
What i tried and make it work,
hint: The |
I have encountered a similar problem with version 4.25.2 on MacOS ventura. In my case after changing the location and clicking Apply & restart, it did not hang. It looked like everything worked but when I do a build it is still using the old location. I tried exiting Docker Desktop and then restarting and found it reverted back to the original location. So it seems that the setting is not actually saved. I tried setting data-root in the ~/.docker/daemon.json and when I started the Docker Desktop it created a number of files & folders but the Engine startup hung and after several attempts at restarting and rebooting I still could not get the Engine to start successfully. I removed the data-root from the json file and the Engine started correctly. At this point I will try using a symlink instead. |
Update: I now have it working without having to use a symlink. Below is what I did, but not sure if the first two are really needed:
Because the external drive is not an SSD and is several years old the slowness is to be expected. Now that I know it does work, I have ordered a new SSD drive with a faster transfer rate. I am running running MacOS ventura and the latest version of Docker Desktop. |
I received my new SSD drive and have simplified the steps that work to move the Disk image location to an external USB drive. To reiterate, I am running MacOS Ventura and Docker Desktop 4.25.2.
It may take a while for the Docker Engine to start. The larger the image, the longer it takes. This is also true with the speed of your drive and the transfer rate. With USB 3 SSD and a transfer rate of 1000mb it took 3-4 minutes for a 100GB image. Feature Request: |
thank you so much this is the only thing that worked for me. I did a lot of the recommendations here and nothing worked but this. I even uninstalled / reinstalled ect.... Just to let everyone know i had to go to the original location & delete the Docker.raw file because that was taking up space. Moving the location didn't move / delete the original file. |
@robert914 Thank you so much for solution! It worked for me. |
Similar problem in Docker Desktop version 4.28.0 (139021), on Mac OS Sonoma 14.3.1. In the GUI, Docker seems to accept the new disk image location. "Apply & restart" works without problems. But the file is not created at the new location, and after a restart of Docker Desktop, the "Disk Image Location" in the GUI is again at the old location. Finally, after a lot of hassle, this workaround solved my problem: #6803 (comment) It would be nice if this bug could be fixed by docker! |
I know it's been months since you posted this but you just saved me lots of time. It worked! Thanks! |
Expected behavior
After changing Settings -> Resources -> Advanced -> Disk Image location to external volume -> empty folder, Docker should successfully change it to new location and restart.
Actual behavior
After changing Settings -> Resources -> Advanced -> Disk Image location to an empty folder on external volume, Docker hangs forever on "Apply & restart", the circle of progress bar constantly spins. Docker service becomes inactive and hangs in restarting state.
If I try to do it for the same partition, where disk image originally was, it works as intended.
Information
I did a clean install of Docker Desktop from the official site. Waited for it to finish changing directory for more than 30 mins. The directory to where I move is clean of any files. A disk space available is more than 100Gb on both drives, where Docker is installed and the directory, where I move. The disk is free of errors and the both volumes for Docker and where I move is internal disk of MacBook, which never failed and allows blazing fast disk access.
I also tried:
Restart Docker or Quit and then start over with checking its not running in Activity Monitor
Reboot and apply the setting again many times
Checked the rights on the dir @ external drive, so I able to move files here, it's not write-protected
No antivirus, at Little Snitch firewall Docker has full access to any outbound/inbound connection
Fully reinstall with
uninstaller /Applications/Docker.app/Contents/MacOS/uninstall
and reboot for sure before installing againStop Docker service and then change the dir to another
Reduce disk limit and swap to the minimum values available, 8Gb for disk limit and 0Gb for swap respectively.
Output of
/Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: