docker-archive / toolbox

The Docker Toolbox
https://docker.com/toolbox
3.22k stars 1.23k forks source link

Make it easier to create the VMs on a non-standard location #191

Open adamdivak opened 9 years ago

adamdivak commented 9 years ago

Hi,

Currently it is a non-trivial issue to create or move the created VM on a new location. This is important because by default Toolbox creates a VirtualBox VM under the current user's home dir, which is normally on drive C;. As many people have a smaller SSD and a larger secondary drive, it is likely that they want to move Docker to the secondary drive either during installation or sometimes later.

I faced the same issue and I had to take the following steps to move my VM. I may have overcomplicated some steps, but it took quite some time to figure everything out.

This doesn't even include the additional steps you need to do (e.g. change file sharing between the VM and the host, set up port forwarding, etc.). Having to do so much before you can start using your first container is a bit disengaging for new (and existing) users. I would recommend adding options for setting these things up during the first installation of Toolbox if at all possible.

Cheers, Adam

mchiang0610 commented 9 years ago

@yosuah Thanks for this.

buxel commented 9 years ago

Subscribing, iam in the same boat.

pyrotek commented 9 years ago

I couldn't agree more. My SSD drive is only 80gbs in size, 80% of which is filled by Windows and critical system tools. I really need docker to stay confined to my HDD, which is on my system for this purpose. Looks like I'm going to have to do it the long way to get my dev environment setup. :tired_face:

Thanks for sharing the info!

ghost commented 9 years ago

Thank you for your very thorough explanation. I second this request, SSDs are normally small and I'm sure lot of people are feeling the same pain.

tsmgodoi commented 9 years ago

One possible simpler workaround is to create a directory junction as follows: 1) Copy the folder USERDIR.docker to F:\Docker.docker 2) Delete the folder USERDIR.docker\machine 3) Create a junction with: mklink /j USERDIR.docker\machine F:\Docker.docker\machine

ghost commented 9 years ago

@tsmgodoi thanks for great workaround idea :+1:

juliangamble commented 9 years ago

Try this one: http://stackoverflow.com/a/33687993/15441

weeblr commented 8 years ago

Hi I have had good success selecting the storage path by changing the start.sh file as in this PR: #452 After that change, it only takes setting the MACHINE_STORAGE_PATH to the desired folder.

Cheers

ArunRajV commented 8 years ago

Thank you @tsmgodoi . for me Kitematic was not working after I set the MACHINE_STORAGE_PATH to some other folder. Your simple solution for creating a .docker directory junction did the trick for me. Only change is that I had to set the MACHINE_STORAGE_PATH=/.docker/machine.

Thanks a ton

putztzu commented 8 years ago

Agree with comments in this thread. An additional modification to the comment by weeblr,

I already had VBox and Github on Windows installed, I was wary that the Toolbox install might wipe out my various custom settings so excluded them during the install. But, apparently Toolbox fundamentally does not build on top of VBox configuration and instead implements its own which I believe is the fundamental install and running logic error. Toolbox should be designed as a shell on top of the components it orchestrates. In other words, VBox configurations should reside in VBox. Git configurations should reside in Git. And, so on. Then Toolbox can sit on top of everything with its own configuration.

An example is this MACHINE_STORAGE_PATH. This should not be specified. Instead, the install should simply create the Guest using whatever values are stored in VBox.

By disconnecting Toolbox from its underlying components, this would likely also address a number of other feature requests like supporting other virtualization than VBox,

weeblr commented 8 years ago

Hi

VBox configurations should reside in VBox.

An example is this MACHINE_STORAGE_PATH. This should not be specified. Instead, the install should simply create the Guest using whatever values are stored in VBox.

@putztzu : We are not talking about Vbox configuration here. VBox only has a config for the default location of VMs. We are indeed talking about a Toolbox configuration: where does Toolbox should store the VM it creates through VM. Rgds

micheljung commented 7 years ago

Sounds like a low hanging fruit to me. Would be very much appreciated!

GameKyuubi commented 7 years ago

Yeah this is a huge pain in the neck that wouldn't take much work to fix.