Skip to content
This repository was archived by the owner on Sep 26, 2021. It is now read-only.
This repository was archived by the owner on Sep 26, 2021. It is now read-only.

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

Open
@adamdivak

Description

@adamdivak

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.

  • Download and install Docker Toolbox
  • Copy the VM to a different drive if you are running out of disk space.
    • Stop the machine in VBox
    • Remove the disk under File -> Virtual media manager
    • Remove the machine but do not delete the files
    • Copy the whole [userdir].docker\machines directory to the new drive
    • Add the machine using Machine -> Add (not File -> Import appliance)
    • Add/correct the disk path under Settings -> Storage
    • Update the docker startes script: edit C:\Program Files\Docker Toolbox\start.sh and add this in the beginning (e.g. at line 7):
      • export MACHINE_STORAGE_PATH="F:\VirtualBox VMs\docker-machine"
      • Make sure that there is no trailing \ at the end of the path
    • Update the Cert paths for the command
      • I tried setting these in start.sh, but they didn’t work:
        • export MACHINE_TLS_CA_CERT="F:\VirtualBox VMs\docker-machine\machines\default\ca.pem"
        • export MACHINE_TLS_CA_KEY="F:\VirtualBox VMs\docker-machine\machines\default\cert.pem"
        • export MACHINE_TLS_CLIENT_CERT="F:\VirtualBox VMs\docker-machine\machines\default\server.pem"
        • export MACHINE_TLS_CLIENT_KEY="F:\VirtualBox VMs\docker-machine\machines\default\server-key.pem"
      • I ended up copying back the certs to the original location..

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions