boot2docker hangs, then crashes

I installed Boot2Docker on Windows 7, then double-clicked on “Boot2Docker Start” on the desktop.
It gave me this message:

Waiting for VM and Docker daemon to start…
…ooooooo

It remains on this screen for a very long time (slowly adding additional “o” characters), so I left for a few hours.
When I came back the “Boot2Docker Start” window is gone.
I’m assuming this is not expected behavior.

If a logfile exists somewhere for Boot2Docker I’d sure appreciate it if someone could point me to where it is!

UPDATE:
I opened VirtualBox, killed the VM, then I deleted the folder: C:\Users\username\VirtualBox VMs\boot2docker-vm
When I re-launched “Boot2Docker Start” it worked.
I have no idea what the root cause of the problem was, but that appears to be a workaround.

@sven is this the kind of thing you can detect automatically and repair automatically ?

mmm, firstly, no, it should not be auto-closing the dialog, so thats a bit worrying.

and we’re not logging the output :confused:

@sam - we could, but its surprisingly rare (compared to the number of users that don’t have a problem) so its not high on the priority list - especially as VirtualBox seems to have a very large number of surprising corner cases that all look about the same :confused:

good to see its resolved tho :wink:

I was struggling with same symptoms, also Win7. The delete VM workaround did the trick for me too. Thanks Joel.

I’m having the same issue with my Mac, but deleting the VMs didn’t seem to solve the problem. What’s weird is I see the instance in the “Running” state in VirtualBox, but my console just shows this:

$ boot2docker up
Waiting for VM and Docker daemon to start…
…o

And keeps adding "o"s.

The first thing you can do to debug this, is to use the virtualbox GUI to start the vm - that way you can see the output from the boot process.

and you can also use the GUI to delete the vm.

The problem actually went away after uninstalling and reinstalling.

I have a similar issue. Just downloaded docker for Mac OS X on my macbook pro (OS X 10.8.5). The VM starts (as can be seen in Virtual Box GUI but triggers a FATAL could not read from media error. I’ve tried remoiving this, rerunning the package installer but to no avail. Any suggestions?

Hmm, After some playing around with reinstalls it works as long as I run it as sudo from the command line. It won’t run from the Apps folder.

I’m having the exact same problem on Windows 10 insider preview.

I get the same problem with Windows Insider preview, but the log suggests there is no bootable OS for the VM:

00:00:02.578566 Changing the VM state from ‘CREATING’ to ‘CREATED’.
00:00:02.578843 SharedFolders host service: adding host mapping
00:00:02.578853 Host path ‘C:\Users’, map name ‘c/Users’, writable, automount=true, create_symlinks=true, missing=false
00:00:02.579117 Changing the VM state from ‘CREATED’ to ‘POWERING_ON’.
00:00:02.579256 NAT: set redirect TCP host 127.0.0.1:2022 => guest 10.0.2.15:22
00:00:02.602226 Changing the VM state from ‘POWERING_ON’ to ‘RUNNING’.
00:00:02.605184 Guest Log: BIOS: VirtualBox 4.3.28
00:00:02.605284 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:02.645188 PIT: mode=2 count=0x48d3 (18643) - 64.00 Hz (ch=0)
00:00:02.650430 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:02.650651 Guest Log: BIOS: Boot : bseqnr=1, bootseq=0233
00:00:02.650847 Guest Log: BIOS: CDROM boot failure code : 0002
00:00:02.651005 Guest Log: BIOS: Boot from CD-ROM failed
00:00:02.651204 Guest Log: BIOS: Boot : bseqnr=2, bootseq=0023
00:00:02.651403 Guest Log: BIOS: CDROM boot failure code : 0002
00:00:02.651558 Guest Log: BIOS: Boot from CD-ROM failed
00:00:02.651753 Guest Log: BIOS: Boot : bseqnr=3, bootseq=0002
00:00:02.652055 Guest Log: int13_harddisk: function 02, unmapped device for ELDL=80
00:00:02.652239 Guest Log: BIOS: Boot from Hard Disk 0 failed
00:00:02.653612 Guest Log: Could not read from the boot medium! System halted.
00:00:02.653859 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0, flags=0x1
00:00:02.979072 NAT: old socket rcv size: 64KB
00:00:02.979095 NAT: old socket snd size: 64KB

Looking at the settings for the boot2docker-vm there were no controllers in storage which seemed a bit odd, so I removed this vm, created a new one with the same name and chose a 64-bit linux platform. I then booted the machine and when it asked for a CD with an OS I pointed it at the boot2docker.iso. This appeared to build the vm.

I then powered it down and doubleclicked the boot2docker icon which brought me up a shell window that now reported the following:

initializing…
Virtual machine boot2docker-vm already exists

starting…
Waiting for VM and Docker daemon to start…
…oooooo
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Started.
Trying to get Docker socket one more time
Error requesting socket: exit status 255
Auto detection of the VM’s Docker socket failed.
Please run boot2docker -v up to diagnose.

IP address of docker VM:

Failed to get VM Host only IP address.
Was the VM initialized using boot2docker?

setting environment variables …
error in run: Error requesting socket: exit status 255

You can now use docker directly, or boot2docker ssh to log into the VM.
Welcome to Git (version 1.9.5-preview20150319)

Run ‘git help git’ to display the help index.
Run 'git help ’ to display help for specific commands.

nickw@WIN-A8648PMEFF2 ~
$

Running boot2docker -v up as advised showed messages like:

Waiting for VM and Docker daemon to start…
.Connecting to tcp://localhost:0 (attempt #0).Connecting to tcp://localhost:0 (a
ttempt #0).Connecting to tcp://localhost:0 (attempt #0).Connecting to tcp://loca
lhost:0 (attempt #0).Connecting to tcp://localhost:0 (attempt #0).Connecting to
tcp://localhost:0 (attempt #0).Connecting to tcp://localhost:0 (attempt #0).Conn
ecting to tcp://localhost:0 (attempt #0).Connecting to tcp://localhost:0 (attemp
t #0).Connecting to tcp://localhost:0 (attempt #0).Connecting to tcp://localhost
:0 (attempt #0).Connecting to tcp://localhost:0 (attempt #0).Connecting to tcp:/
/localhost:0 (attempt #0).Connecting to tcp://localhost:0 (attempt #0).Connectin
g to tcp://localhost:0 (attempt #0).Connecting to tcp://localhost:0 (attempt #0)
.Connecting to tcp://localhost:0 (attempt #0).Connecting to tcp://localhost:0 (a
ttempt #0).Connecting to tcp://localhost:0 (attempt #0).Connecting to tcp://loca
lhost:0 (attempt #0).Connecting to tcp://localhost:0 (attempt #0).Connecting to
tcp://localhost:0 (attempt #0)

and

Waiting for Docker daemon to start…
o2015/07/14 01:06:11 executing: C:\Program Files (x86)\Git\bin\ssh.exe ssh -o Id
entitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o
LogLevel=quiet -p 0 -i C:\Users\nickw.ssh\id_boot2docker docker@localhost grep
tcp:// /proc/$(cat /var/run/docker.pid)/cmdline
Bad port '0’
Error requesting socket: exit status 255
o2015/07/14 01:06:11 executing: C:\Program Files (x86)\Git\bin\ssh.exe ssh -o Id
entitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o
LogLevel=quiet -p 0 -i C:\Users\nickw.ssh\id_boot2docker docker@localhost grep
tcp:// /proc/$(cat /var/run/docker.pid)/cmdline
Bad port '0’
Error requesting socket: exit status 255
o2015/07/14 01:06:12 executing: C:\Program Files (x86)\Git\bin\ssh.exe ssh -o Id
entitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o
LogLevel=quiet -p 0 -i C:\Users\nickw.ssh\id_boot2docker docker@localhost grep
tcp:// /proc/$(cat /var/run/docker.pid)/cmdline
Bad port '0’
Error requesting socket: exit status 255

Looking at Settings->Network it is set to NAT, so should it be set to Bridged to get assigned an IP address?

If I try to do this the drop down for Bridged Adapter, the drop down selector below doesn’t have a choice other than “Not selected” which isn’t a valid name so the settings can’t be changed to Bridged.

It’s late and I’m giving up for tonight.

@nickweavers what version of vbox are you using?

@svendowideit I am using the version the boot2docker installed which the Help->About VirtualBox tells me is 4.3.28 r 100309. The Help->Check for Updates tells me there is a newer version 4.3.30 available. Would you recommend I update to this?

It appears there are known issues with network adapters when running VirtualBox 4.x in Windows 10 Preview. VirtualBox 5 is now out of Beta so I tried that. Boot2Docker didn’t build a good boot2docker-vm (no storage controllers again) but creating a new vm, mounting the boot2docker.iso and booting from it seemed to get me further.

I think the path probably needs to be tested out officially by the Docker team to get it working smoothly. Would be great to see a fresh boot2docker package with VB 5 released in time for Windows 10 on 29th July :+1:

Thanks

from what I understand, the next release of docker-machine has been tested with vbox 5 (though I don’t know about windows 10, I haven’t tried it yet).

At the same time, we’re deprecating the boot2docker cli tool in favour of docker-machine.