Migrate from Boot2Docker to Machine

Estimated reading time: 1 minute

If you were using Boot2Docker previously, you have a pre-existing Docker boot2docker-vm VM on your local system. To allow Docker Machine to manage this older VM, you must migrate it.

  1. Open a terminal or the Docker CLI on your system.

  2. Type the following command.

    $ docker-machine create -d virtualbox --virtualbox-import-boot2docker-vm boot2docker-vm docker-vm
  3. Use the docker-machine command to interact with the migrated VM.

Subcommand comparison

The docker-machine subcommands are slightly different than the boot2docker subcommands. The table below lists the equivalent docker-machine subcommand and what it does:

boot2dockerdocker-machinedocker-machine description
initcreateCreates a new docker host.
upstartStarts a stopped machine.
sshsshRuns a command or interactive ssh session on the machine.
save-Not applicable.
downstopStops a running machine.
poweroffstopStops a running machine.
resetrestartRestarts a running machine.
configinspectPrints machine configuration details.
statuslsLists all machines and their status.
infoinspectDisplays a machine’s details.
ipipDisplays the machine’s IP address.
shellinitenvDisplays shell commands needed to configure your shell to interact with a machine
deletermRemoves a machine.
download-Not applicable.
upgradeupgradeUpgrades a machine’s Docker client to the latest stable release.
machine, commands, boot2docker, migrate, docker