docker / machine

Machine management for a container-centric world
https://docs.docker.com/machine/
Apache License 2.0
6.63k stars 1.97k forks source link

virtualbox: Hangs on Waiting for VM to start #986

Closed dave-tucker closed 9 years ago

dave-tucker commented 9 years ago

Tried starting a VM via docker-machine start and it hung on:

INFO[0000] Waiting for VM to start...

Check the VirtualBox GUI and the VM state was aborted. The underlying cause here was that my VM image was corrupted, but as a user I'd expect machine to be aware of this and provide an appropriate error message.

ehazlett commented 9 years ago

@pugnascotia thx!

rafabene commented 9 years ago

When this fix will be released ?

marioidival commented 9 years ago

When this fix will be released ?

paulm-jones commented 9 years ago

@ehazlett your build works for me too

ehazlett commented 9 years ago

@paulm-jones thanks for the feedback!

mrjcleaver commented 9 years ago

@ehazlett - sorry, (and until the release comes out,) how do I install your build?

I'm on OS X.

ehazlett commented 9 years ago

@mrjcleaver you can grab the latest master build from https://docker-machine-builds.evanhazlett.com/latest/ and place somewhere on your PATH. You will also need to make it executable (chmod +x). Thanks!

marioidival commented 9 years ago

@ehazlett Working to me :+1: Thanks!

marioidival commented 9 years ago

captura de tela 2015-05-27 as 15 10 17

ianlintner-wf commented 8 years ago

I have been having to use the --native-ssh flag with everything, but it works. (Debug is just there for testing) e.g. docker-machine -D --native-ssh create --driver=virtualbox default docker-machine -D --native-ssh=true ssh default docker-machine -D --native-ssh=true env default eval "$(docker-machine --native-ssh=true env default)"

Mac OSX 10.11 El Capitan docker-machine version 0.4.1 (e2c88d6)

I have had nothing but problems after upgrading from boot2docker I also have vmware running as well as I am comparing performance for dev.

I created a simple shell wrapper script for my needs in a path.

!/bin/bash

eval docker-machine --native-ssh=true "$@"

slank commented 8 years ago

+1 @ianlintner-wf

@ehazlett's build doesn't fix the problem for me, but --native-ssh=true does.

nathanleclaire commented 8 years ago

@ianlintner-wf FYI, setting the MACHINE_NATIVE_SSH environment variable will allow you to avoid having to type --native-ssh every time as well.

@slank @ianlintner-wf What's your ~/.ssh/config file like?

slank commented 8 years ago

After some testing, it seems to be related to my having ControlMaster auto as a default in my SSH config. If I disable it, everything works. Oddly, SSH still uses a master if I explicitly set ControlMaster no in a Host localhost block so I can't really work around the problem without substantial sacrifice.

Looking at the debug output from create with ControlMaster enabled, I see that the final SSH attempt may connect successfully but hangs indefinitely. I don't know how exec.Cmd handles forks, nor whether ControlMaster triggers one, but it looks suspiciously like SSH process isn't exiting the way it's expected to.

wkonkel commented 8 years ago

I just ran into the "Starting VM" hanging issue and it wasn't the ~/.ssh/config ControlMaster problem a lot of people seem to be having.

I eventually discovered that I had accidentally commented out 127.0.0.1 localhost from my /etc/hosts and it was defaulting to the IPv6 ::1 localhost. Adding 127.0.0.1 back fixed the "Starting VM" problem instantly.

abbinv commented 8 years ago

For me it was because visualization was not enabled in my bios. Enabled it and issue was resolved.

I could see “this kernel requires an x86-64 CPU, but only detects an i686 CPU, unable to boot” error in virtual box screen

default-writer commented 3 years ago

I have been having to use the --native-ssh flag with everything, but it works. (Debug is just there for testing) e.g. docker-machine -D --native-ssh create --driver=virtualbox default docker-machine -D --native-ssh=true ssh default docker-machine -D --native-ssh=true env default eval "$(docker-machine --native-ssh=true env default)"

Mac OSX 10.11 El Capitan docker-machine version 0.4.1 (e2c88d6)

I have had nothing but problems after upgrading from boot2docker I also have vmware running as well as I am comparing performance for dev.

I created a simple shell wrapper script for my needs in a path.

!/bin/bash

eval docker-machine --native-ssh=true "$@"

The trampoline works!

docker-machine --native-ssh create --driver hyperv --hyperv-virtual-switch docker-machine-switch default