Problem doing example docker-machine create

I’m trying to learn docker and just tried to follow the example at https://docs.docker.com/machine/get-started/ and having trouble getting the example to work.

I tried it a couple of times and commands hang for a long time. Seems like it trying to connect to something.
$ docker-machine create --driver virtualbox newone
Creating VirtualBox VM…
Creating SSH key…
Starting VirtualBox VM…
Starting VM…
Error creating machine: Too many retries. Last error: Maximum number of retries (60) exceeded
You will want to check the provider to make sure the machine and associated resources were properly removed

I can’t remove any machines the docker-machine rm dev etc hangs indefinitely.

$ docker-machine ls
error getting URL for host newone: exit status 255
error getting URL for host dev: exit status 255
NAME ACTIVE DRIVER STATE URL SWARM
dev virtualbox Timeout
newone virtualbox Timeout

Here are the version of the SW I have installed:
docker@docker:~$ docker -v
Docker version 1.8.1, build d12ea79
docker@docker:~$ docker-machine -v
docker-machine version 0.4.0 (9d0dc7a)
docker@docker:~$ vboxmanage -v
5.0.10r104061

Hello,

What happens when you run your docker-machine commands in debug mode?

docker-machine --debug create --driver virtualbox newone
docker-machine --debug rm newone
docker-machine --debug ls

Is there any additional information in the debug output that might be helpful?

Additionally, one thing that might also help is opening the VirtualBox GUI directly, and looking at the list of VMs there. If there is one listed, what happens if you start it manually? Does the VM give any sort of error message? sometimes if you have hardware virtualization disabled in your bios, you could run in to trouble similar to yours. You’d see an error message in the VM while booting directly.

Cheers

Jeff,
Well I noticed looking that new version of docker and docker-machine where available to updated them to start. Nothing jumps out at me. Please take a look and see if something jumps out at you.

docker@docker:~$ docker -v
Docker version 1.9.1, build a34a1d5
docker@docker:~$ docker-machine -v
docker-machine version 0.5.0 (04cfa58)
docker@docker:~$ docker-machine --debug create --driver virtualbox newone2
Docker Machine Version: 0.5.0 (04cfa58)
Found binary path at /usr/local/bin/docker-machine-driver-virtualbox
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:36397
() Calling RpcServerDriver.GetVersion
Using API Version 1
() Calling RpcServerDriver.SetConfigRaw
() Calling RpcServerDriver.GetMachineName
(flag-lookup) Calling RpcServerDriver.GetCreateFlags
Making call to close connection to plugin binary
Making call to close driver server
(flag-lookup) Calling RpcServerDriver.Close
Successfully made call to close driver server
Found binary path at /usr/local/bin/docker-machine-driver-virtualbox
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:58172
() Calling RpcServerDriver.GetVersion
Using API Version 1
() Calling RpcServerDriver.SetConfigRaw
() Calling RpcServerDriver.GetMachineName
(newone2) Calling RpcServerDriver.GetMachineName
(newone2) Calling RpcServerDriver.DriverName
(newone2) Calling RpcServerDriver.GetCreateFlags
(newone2) Calling RpcServerDriver.SetConfigFromFlags
Running pre-create checks…
(newone2) Calling RpcServerDriver.PreCreateCheck
(newone2) DBG | COMMAND: /usr/bin/VBoxManage
(newone2) Calling RpcServerDriver.GetConfigRaw
(newone2) Calling RpcServerDriver.GetConfigRaw
Creating machine…
(newone2) Calling RpcServerDriver.Create
(newone2) OUT | Creating VirtualBox VM…
(newone2) OUT | Creating SSH key…
(newone2) DBG | Creating disk image…
(newone2) DBG | Creating 20000 MB hard disk image…
Error creating machine: Error in driver during machine creation: read tcp 127.0.0.1:50000->127.0.0.1:58172: read: connection reset by peer
docker@docker:~$

The output of docker-machine --debug rm newone and docker-machine --debug ls huge. Just pasting the start of it.

docker@docker:~$ docker-machine -debug ls
Docker Machine Version: 0.5.0 (04cfa58)
Found binary path at /usr/local/bin/docker-machine-driver-virtualbox
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:45521
() Calling RpcServerDriver.GetVersion
Using API Version 1
() Calling RpcServerDriver.SetConfigRaw
() Calling RpcServerDriver.GetMachineName
Found binary path at /usr/local/bin/docker-machine-driver-virtualbox
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:40179
() Calling RpcServerDriver.GetVersion
Using API Version 1
() Calling RpcServerDriver.SetConfigRaw
() Calling RpcServerDriver.GetMachineName
Found binary path at /usr/local/bin/docker-machine-driver-virtualbox
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:50979
() Calling RpcServerDriver.GetVersion
Using API Version 1
() Calling RpcServerDriver.SetConfigRaw
() Calling RpcServerDriver.GetMachineName
(newone2) Calling RpcServerDriver.GetURL
.
.
.
(newone) DBG | GuestAdditionsRunLevel=0
(newone) DBG | }
(newone) DBG | STDERR:
(newone) DBG | {
(newone) DBG | }
(newone) DBG | SSH cmd err, output: exit status 255:
error getting URL for host newone: Something went wrong running an SSH command!
command : ip addr show dev eth1
err : exit status 255
output :

(newone) Calling RpcServerDriver.DriverName
(dev) DBG | SSH cmd err, output: exit status 255:
error getting URL for host dev: Something went wrong running an SSH command!
command : ip addr show dev eth1
err : exit status 255
output :

(dev) Calling RpcServerDriver.DriverName

This one keeps repeating I think like it states 60 times.
docker@docker:~$ docker-machine --debug rm newone
Docker Machine Version: 0.5.0 (04cfa58)
Found binary path at /usr/local/bin/docker-machine-driver-virtualbox
Launching plugin server for driver virtualbox
Plugin server listening at address 127.0.0.1:38941
() Calling RpcServerDriver.GetVersion
Using API Version 1
() Calling RpcServerDriver.SetConfigRaw
() Calling RpcServerDriver.GetMachineName
(newone) Calling RpcServerDriver.Remove
(newone) DBG | COMMAND: /usr/bin/VBoxManage showvminfo newone --machinereadable
(newone) DBG | STDOUT:
(newone) DBG | {
(newone) DBG | name=“newone”
(newone) DBG | groups="/"
(newone) DBG | ostype=“Linux 2.6 / 3.x / 4.x (64-bit)”
(newone) DBG | UUID=“382a9a81-b6de-4549-8462-db882e2dbced”
(newone) DBG | CfgFile="/home/docker/.docker/machine/machines/newone/newone/newone.vbox"
(newone) DBG | SnapFldr="/home/docker/.docker/machine/machines/newone/newone/Snapshots"
(newone) DBG | LogFldr="/home/docker/.docker/machine/machines/newone/newone/Logs"
(newone) DBG | hardwareuuid=“382a9a81-b6de-4549-8462-db882e2dbced”
(newone) DBG | memory=1024
(newone) DBG | pagefusion=“off”
(newone) DBG | vram=8
(newone) DBG | cpuexecutioncap=100
(newone) DBG | hpet=“on”
(newone) DBG | chipset=“piix3”
(newone) DBG | firmware=“BIOS”
(newone) DBG | cpus=1
(newone) DBG | pae=“on”
(newone) DBG | longmode=“on”
(newone) DBG | cpuid-portability-level=0
(newone) DBG | bootmenu=“disabled”
(newone) DBG | boot1=“dvd”
(newone) DBG | boot2=“dvd”
(newone) DBG | boot3=“disk”
(newone) DBG | boot4=“none”
(newone) DBG | acpi=“on”
(newone) DBG | ioapic=“on”
(newone) DBG | biossystemtimeoffset=0
(newone) DBG | rtcuseutc=“on”
(newone) DBG | hwvirtex=“on”
(newone) DBG | nestedpaging=“on”
(newone) DBG | largepages=“on”
(newone) DBG | vtxvpid=“on”
(newone) DBG | vtxux=“on”
(newone) DBG | paravirtprovider=“default”
(newone) DBG | VMState=“running”
(newone) DBG | VMStateChangeTime=“2015-12-14T15:03:35.193000000”
(newone) DBG | monitorcount=1
(newone) DBG | accelerate3d=“off”
(newone) DBG | accelerate2dvideo=“off”
(newone) DBG | teleporterenabled=“off”
(newone) DBG | teleporterport=0
(newone) DBG | teleporteraddress=""
(newone) DBG | teleporterpassword=""
(newone) DBG | tracing-enabled=“off”
(newone) DBG | tracing-allow-vm-access=“off”
(newone) DBG | tracing-config=""
(newone) DBG | autostart-enabled=“off”
(newone) DBG | autostart-delay=0
(newone) DBG | defaultfrontend=""
(newone) DBG | storagecontrollername0=“SATA”
(newone) DBG | storagecontrollertype0=“IntelAhci”
(newone) DBG | storagecontrollerinstance0=“0”
(newone) DBG | storagecontrollermaxportcount0=“30”
(newone) DBG | storagecontrollerportcount0=“30”
(newone) DBG | storagecontrollerbootable0=“on”
(newone) DBG | “SATA-0-0”="/home/docker/.docker/machine/machines/newone/boot2docker.iso"
(newone) DBG | “SATA-ImageUUID-0-0”=“0db7da1c-b4ca-4dfb-b729-ad7668c54d9b”
(newone) DBG | “SATA-tempeject”=“off”
(newone) DBG | “SATA-IsEjected”=“off”
(newone) DBG | “SATA-1-0”="/home/docker/.docker/machine/machines/newone/disk.vmdk"
(newone) DBG | “SATA-ImageUUID-1-0”=“7f7f8e11-225c-476b-92af-4f6f2cb55bf2”

Jeff,
Well you had me thinking WRT virtualbox. So here is the deal. I’m running docker not on the host OS but on a VM. Thus I would be starting a VM inside of a VM in this case. I did not think that would be an issue but tried what you said (I do have BIOS set for HW acceleration as I have all my base OS configured that way.) but when I ran the virtualbox gui inside the vm got the error you cited. (VT-x/AMD-V hardware acceleration is not avaiable…) and looking on the net this seems ot be a known issue with virtualbox be it an old one.

https://www.virtualbox.org/ticket/4032
"Changed 6 months ago by JohnStarich

+1 I am in agreement with jonseymour that this is becoming a much more demanded feature in the world of cloud computing and boot2docker is also gaining ground. I use virtualization tools like Virtual Box regularly, including spinning up virtual cloud hosts. My example use-case is deploying docker-machines with a virtual box driver to create container VM hosts in its own private cloud. This is especially useful in development and system administration of virtual private clouds.
"

I have heard reports of people running virtualbox inside vmware successfully, assuming their hardware has support for passthrough virtualization. Personally, I’ve never gotten a virtualbox-in-virtualbox to run.

Usually, I’ll just run docker-machine with another backend driver instead of the virtualbox driver if I need to use docker from inside a VM. This doesn’t work in every situation of course, but if you have a way to spin up other VMs over an api (aws, digitalocean, rackspace, vsphere, openstack, etc), then that might be a viable alternative.

Jeff, thanks for the information. I work in an applied research department and I was investigating containers/Docker mainly as a possible means to improve security of existing application and also how one might design systems going forward with containers in mind. I guess the whole micro services approach. So I’m just trying to understand and learn Docker for right now and understand issues such as these so that if we move forward with Docker we have a better understanding of what we are getting into. So I was just running through the examples on-line here so I’ll try to switch the example to another driver.

My problem:

Could not get the storage format of the medium ‘/root/.docker/machine/machines/dev/boot2docker.iso’ (VERR_NOT_SUPPORTED)