docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.86k stars 289 forks source link

Can't change disk image location #2063

Closed peik-cm closed 4 years ago

peik-cm commented 6 years ago

Expected behavior

Changing disk image location under settings => advanced actually changes image location.

Actual behavior

When Disk image location is changed, Docker restarts. On restart the folder is changed back to default path.

Information

I tried to first prune all containers and make the change, but the issue remains.

jasonbivins commented 6 years ago

@peik-cm

Were you trying to use your E: drive? It looks like it's not showing up as available for docker to use From the diagnostic: "SharedDrives":{"D":true,"C":true,"E":false},

peik-cm commented 6 years ago

D:

to 31. toukokuuta 2018 klo 2.19 Jason Bivins notifications@github.com kirjoitti:

@peik-cm https://github.com/peik-cm

Were you trying to use your E: drive? It looks like it's not showing up as available for docker to use

"SharedDrives":{"D":true,"C":true,"E":false},

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/docker/for-win/issues/2063#issuecomment-393284999, or mute the thread https://github.com/notifications/unsubscribe-auth/AiCJDQgbkR6c9olGlImhLutT2XxDndJ4ks5t3vC3gaJpZM4UNXIz .

morales2k commented 6 years ago

Same as peik-cm described... This is happening to me as well. I am trying to use the J:\

Client:
 Version:      18.03.1-ce
 API version:  1.37
 Go version:   go1.9.5
 Git commit:   9ee9f40
 Built:        Thu Apr 26 07:12:48 2018
 OS/Arch:      windows/amd64
 Experimental: false
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.03.1-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.5
  Git commit:   9ee9f40
  Built:        Thu Apr 26 07:22:38 2018
  OS/Arch:      linux/amd64
  Experimental: false

J:\ was compressed. I noted this caused errors, so I decompressed it. However, Docker settings will always reset to C: (on default path) no matter what I do.

I am attempting to share only the I: and J: drives and NOT the C: drive. It is un-checked in the settings GUI.

If there is a way to hard-code config using the config.json or daemon.json in the {home-user-folder}\.docker folder, then we could probably bypass using the gui to set these things for now!? Maybe?

Anyhow... I too uploaded diagnostic info: ID: 09FA589A-0233-480C-B19D-BFDE8A52362E/2018-07-01_15-01-20

I installed docker from the stable executable for windows a few days ago now... You could say I'm a proud, brand spanking new docker n00blet, already hitting a wall. Maybe I did something wrong when installing docker!?

UPDATE: I just did a reset on docker settings using the GUI's link that's labeled "Reset to factory defaults". After that, I was able to change the folder and persist the change.

I've yet to find out what exactly was my problem... but it is no longer reverting when I change the image location from the advanced settings.

MisoHub commented 6 years ago

I had same problem.. and I have changed the image directory.

First, set shared drive which include new image directory And then, Reset to factory defaults, with comments to @morales2k and try to change it If it didn't work, delete MobyLinuxVM.vhdx in directory which you want to save it (in destination) and try again.

I resolve this problem with that procedure. hope to help you.

OtaK commented 6 years ago

Also, through testing, I just found out that HyperV can only store images on NTFS. It was denying my ExFAT drives.

ilikecola commented 6 years ago

Also. Can NOT change image store location even from Hyper-V Manager.

Vantage-DS commented 5 years ago

Same issue.

Changing the location to D:, it resets to C:\ when Docker has restarted.

Changed in settings.json Changed in Hyper V Changed in Gui.

Nothing works. It just resets to C:

sodaDreamer commented 5 years ago

For anyone else still having problems with this, I managed to fix this by killing Docker then changing the default Virtual Hard Disk location in 'Hyper-V Settings' (as opposed to the settings for the individual VM). After restarting Docker it then created the .vhdx in the correct location.

docker-robott commented 5 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

jdelano0310 commented 5 years ago

I had this same issue, I just deleted the MobyLinuxVM.vhdx from the new location. I had copied the contents from the default location to the new location. Docker would fail stating the GUI id failed. So I simply deleted the file from the new location and switched it in settings, Docker recreated it in the new location just fine.

GF-Huang commented 5 years ago

Same problem. I changed to Docker Images, remove Dockers Images And VHD then apply, it create Dockers Images And VHD again.

Lastest version of docker.

image

ssy341 commented 5 years ago

Default location at C:\Users\Public\Documents\Hyper-V\Virtual hard disks, If you want to change the location to another, make sure the target folder is empty(just no MobyLinuxVM.vhdx file). When you apply configure, docker will move VHD to the new place. I also get the same problem, finally I figure out the target isn't empty cause this problem.

image

TBBle commented 5 years ago

I suspect this is a duplicate of #1589, which shows a process for moving that doesn't require changing system settings or resetting your Docker image.

Neutrino3316 commented 5 years ago

I trying everything above, no help. I discover the bug when using the Hyper-V Manager. I tried to migrate the disk image via Hyper-V Manager, then a useful error message pop out. It says, can't move to a folder that is using NTFS compression, which may look like this: NTFS compression Remeber, don't use NTFS compression.

KANGOD commented 5 years ago

Default location at C:\Users\Public\Documents\Hyper-V\Virtual hard disks, If you want to change the location to another, make sure the target folder is empty(just no MobyLinuxVM.vhdx file). When you apply configure, docker will move VHD to the new place. I also get the same problem, finally I figure out the target isn't empty cause this problem.

image

@ssy341 's method works. I manually copied the MobyLinuxVM.vhdx file before hitting the Apply button.

@Docker team, maybe better to add a warning dialog, instead of just fallback to original folder without hint.

docker-robott commented 4 years ago

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked