I am using docker toolbox on Windows 7 to run docker. (docker version 1.9.1)
As it turns out, the docker machine creates its VM at C:\\Users\\username\\.docker\\mach
I could not get the MACHINE_STORAGE_PATH environment variable method working. It kept complaining about missing certificates when first initialising the machine. Still on Windows 7 so have to use docker-toolbox.
I got around the issue by:
Simply use the VirtualBox graphic interface to relocate the file disk.vmdk:
C:\Users\{myUsername}\.docker\machine\machines\default\disk.vmdk into another folder, say F:\docker-image\.VirtualBox, select default VM and open Settings.Storage, select current disk.vmdk and release it (or delete it).Choose Virtual Hard Disk File... and search for copied file in F:\docker-image\File, select Virtual Media Manager... and release or remove old disk.vmdk4., it's done!Install Docker Toolkit and VM must be installed with Admin Privileges after the installation of docker toolkit (*because Docker Toolkit also installs VM but it's of lower version and creates a problem with other iso files, u can uncheck also, in that case, *). Now we have to change the location of disk.vmdk and update the new location in VM.
VirtualBox.exe(Not the installer) is present and right-click on it (you can find from the shortcut created on your Desktop)run this program as administratorKitematic, If it fails (it will probably) then select option provided related to VM (only 2 options are there)default (right-click -> close --> power off)disk.vmdk file (for me it's present at C:\Users\Dell\.docker\machine\machines\default\disk.vmdk) to a place where you want to store your images that you download (basically disk.vmdk is what will grow in size when you are using docker)default image and goto settingsdisk.vmdk attachment by right-clicking --> remove (that was the older path binded disk.vmdk)file --> virtual media manager and remove disk.vmdk from here also (Now VM don't know if such a disk.vmdk thing exsists)default image --> storage --> add hard disk (this option is just above that iso image)disk.vmdk that you have pasted somewheredocker run hello-world
I have written a very descriptive answer starting from installation because I did face some issues and so wanted to make it highly straight forward for the others.
You can delete your disk.vmdk disk (older one) from your C drive if you want to
Put these two commands when running docker quick start terminal.
I suppose that your new location is "D:\docker" and your new machine name is "docker1"
export MACHINE_STORAGE_PATH=D:\\docker
docker-machine create --driver=virtualbox docker1
This should create a new machine with specified name in your new location.
You can move .docker directory to another drive and create a junction point to it.
Please note that regular shortcut will not work.
For example:
Move .docker directory from C:\Users\username to D:\
and run:
C:\Users\username>mklink /j .docker D:\.docker
Junction created for .docker <<===>> D:\.docker
These answers are out of date, as of the latest release. The location is configurable in the Settings user interface.
https://github.com/docker/for-win/issues/333