Another reason docker-machine create is hanging
I'm also seeing create hang during the creation process with Waiting for VM to start....
For me, the VM is being created fine but docker-machine never realises this and so will hang forever. In the process it also seems to take 100% cpu.
I believe the problem is rooted in the ssh port forwarding. I notice in the config.json for the machine that SSHPort is 0 and if I run docker-machine ip with debug I see this (notice the -p 0):
DEBU[0000] executing: ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectionAttempts=30 -o LogLevel=quiet -p 0 -i /Users/rgoldsmith/.docker/machine/machines/dev/id_rsa docker@localhost ip addr show dev eth1
which unsurprisingly errors with: Bad port '0'
I propose there is an issue in getAvailableTCPPort() that means it is returning 0 instead of an available port. Because 0 is being passed to VBoxManage it is then picking one itself. Querying VBoxManage I can see, in my case: Forwarding(0)="ssh,tcp,127.0.0.1,56069,,22”)
Ha, just wanted to report the same issue:
> ./docker-machine create --driver virtualbox dev
INFO[0000] Creating SSH key...
INFO[0000] Image cache does not exist, creating it at /Users/jelle/.docker/machine/cache...
INFO[0000] No default boot2docker iso found locally, downloading the latest release...
INFO[0003] Downloading latest boot2docker release to /Users/jelle/.docker/machine/cache/boot2docker.iso...
INFO[0038] Creating VirtualBox VM...
INFO[0076] Starting VirtualBox VM...
INFO[0087] Waiting for VM to start...
Spinning with 100% CPU, same problem with ./docker-machine ip.
DEBU[0000] STDERR:
DEBU[0000] executing: ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectionAttempts=30 -o LogLevel=quiet -p 0 -i /Users/jelle/.docker/machine/machines/dev/id_rsa docker@localhost ip addr show dev eth1
Bad port '0'
FATA[0000] exit status 255
The virtualbox driver has a bug that it checks for a free tcp port when the VM instance is created but there is no guarantee that the port will be there some days in the future. I submitted a PR (#1025) that addresses that. I've been digging a lot in the virtual box driver this past week but I haven't encountered. For a VM with this problem, can you verify the value of SSHPort in $HOME/.docker/machine/machines/{machine-name}/config.json?
I suspect this is a duplicate of #479
I don't think this is a duplicate of the original issue reported in #479 but I agree that some commenters have reported problems closer to the problem I've raised than to the original issue reported.
As I say in the original issue report, yes, the SSHPort value in the config.json file is set to 0 and this is why the docker-machine ip fails. I believe it is also why the docker-machine create fails in the first place (because internally it is calling basically the same code, polling for an available ssh connection on port 0). One notable difference is that I'm pretty sure in my logs the original VBoxManage command that sets up the ssh forwarding is passing 0 as the host port but I could be wrong in this and I don't have the logs to hand this evening at home.
Either way, I believe one of 2 things is happening:
- Once the port has been selected it is not being correctly written to the config.son file
- No port is being selected and it is defaulting to port 0
What I can't work out is why this might be happening. It seems more likely to me that getAvailableTCPPort() is failing to find a port but I guess there's always a chance some bug is overwriting the d.SSHPort value in the vm struct before it is being serialised to the config file.
It looks like the only return case from getAvailableTCPPort() with a nil error value is in a conditional guaranteeing that the port is non-zero. The only caller is the driver Create method which does an early return with the error. At least in the current code. Need to pin down the versions showing the problem. It is a given that all sorts of things will fail later on if SSHport is zero.
same problem, under 0.2.0-rc3 it works.
Ok, I've had a chance to confirm the debug output and the correct port info is generated for VirtualBox. So this means getAvailableTCPPort() is fine and the issue is elsewhere. One thing I have noticed is that all the failing creates have high port numbers - could it be something as stupid as an int overflow during json encoding? There certainly seems to be no issue with reading back a json file with the large int value but there doesn't seem to be anywhere in the code where the d.SSHPort value is changed after getAvailableTCPPort() sets it.
The port number being somehow too large would also explain why it will work for a while and then start failing - I generated a large number of machines last week debugging an issue with upgrades and it was only last thing friday that creates started failing. Since then (I haven't restarted my laptop) I've been unable to create new VMs.
thanks for confirming @far-blue -- my hunch was it was just a side effect and not getAvailableTCPPort() -- thanks.
Would you happen to have the VirtualBox logs (~/.docker/machine/machines/<name>/<name>/Logs/Vbox.log) for one of the fails? If it is too high of a port then it should throw an error in virtualbox i would hope. That would then leave it at port 0 causing the issue.
Added as a gist: https://gist.github.com/far-blue/f9be3350918b3d5163dc
Although I can see in VirtualBox that a port has been setup for the forwarding so I don't think that's the issue.
Correct -- it does indeed get a port: https://gist.github.com/far-blue/f9be3350918b3d5163dc#file-vbox-log-L931
I've had success today creating a vm where the port configured was 62016 so I guess this proves it's not an issue with large port numbers.
I've no success with current head. Complete day no chance to create a virtualbox machine.... Very Bad.
- 100% CPU load...
- setup is no finished.
- Manually ssh connection possible.
cd .docker/machine/machines/<box>/ ; ssh -i id_rsa [email protected]
@rossbachp are you using any VPN software? can you post the output of VBoxManage list hostonlyifs and netstat -nr?
No VPN Software installed...
$ VBoxManage list hostonlyifs
Name: vboxnet0
GUID: 786f6276-656e-4074-8000-0a0027000000
DHCP: Disabled
IPAddress: 192.168.59.3
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet0
Name: vboxnet1
GUID: 786f6276-656e-4174-8000-0a0027000001
DHCP: Disabled
IPAddress: 192.168.50.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:01
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet1
Name: vboxnet2
GUID: 786f6276-656e-4274-8000-0a0027000002
DHCP: Disabled
IPAddress: 192.168.99.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:02
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet2
Name: vboxnet3
GUID: 786f6276-656e-4374-8000-0a0027000003
DHCP: Disabled
IPAddress: 192.168.33.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:03
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet3
Name: vboxnet4
GUID: 786f6276-656e-4474-8000-0a0027000004
DHCP: Disabled
IPAddress: 10.2.0.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:04
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet4
Name: vboxnet5
GUID: 786f6276-656e-4574-8000-0a0027000005
DHCP: Disabled
IPAddress: 172.30.8.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:05
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet5
Name: vboxnet6
GUID: 786f6276-656e-4674-8000-0a0027000006
DHCP: Disabled
IPAddress: 10.245.1.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:06
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet6
Name: vboxnet7
GUID: 786f6276-656e-4774-8000-0a0027000007
DHCP: Disabled
IPAddress: 172.16.255.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:07
MediumType: Ethernet
Status: Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet7
$ netstat -nr
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 10.67.48.1 UGSc 59 1 en0
10.67.48/22 link#4 UCS 1 0 en0
10.67.48.1/32 link#4 UCS 1 0 en0
10.67.48.1 0:1f:9d:81:14:0 UHLWIir 63 106 en0 754
10.67.48.69/32 link#4 UCS 1 0 en0
10.67.51.255 ff:ff:ff:ff:ff:ff UHLWbI 0 51 en0
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 5 10937 lo0
169.254 link#4 UCS 0 0 en0
192.168.59 link#11 UC 3 0 vboxnet
192.168.59.3 a:0:27:0:0:0 UHLWIi 1 6 lo0
192.168.59.103 8:0:27:39:17:b6 UHLWI 0 130 vboxnet 769
192.168.59.255 ff:ff:ff:ff:ff:ff UHLWbI 0 12 vboxnet
192.168.99 link#13 UC 2 0 vboxnet
192.168.99.1 a:0:27:0:0:2 UHLWIi 1 18 lo0
192.168.99.255 ff:ff:ff:ff:ff:ff UHLWbI 0 12 vboxnet
Internet6:
Destination Gateway Flags Netif Expire
::1 ::1 UHL lo0
fdd0:e482:fa34:53a7::/64 fe80::c5e9:1a18:51ff:d0aa%utun0 Uc utun0
fdd0:e482:fa34:53a7:c5e9:1a18:51ff:d0aa link#10 UHL lo0
fe80::%lo0/64 fe80::1%lo0 UcI lo0
fe80::1%lo0 link#1 UHLI lo0
fe80::%en0/64 link#4 UCI en0
fe80::4ad7:5ff:fec2:e3c9%en0 48:d7:5:c2:e3:c9 UHLI lo0
fe80::%awdl0/64 link#8 UCI awdl0
fe80::8f2:37ff:fe15:c697%awdl0 a:f2:37:15:c6:97 UHLI lo0
fe80::%utun0/64 fe80::c5e9:1a18:51ff:d0aa%utun0 UcI utun0
fe80::c5e9:1a18:51ff:d0aa%utun0 link#10 UHLI lo0
ff01::%lo0/32 ::1 UmCI lo0
ff01::%en0/32 link#4 UmCI en0
ff01::%awdl0/32 link#8 UmCI awdl0
ff01::%utun0/32 fe80::c5e9:1a18:51ff:d0aa%utun0 UmCI utun0
ff02::%lo0/32 ::1 UmCI lo0
ff02::%en0/32 link#4 UmCI en0
ff02::%awdl0/32 link#8 UmCI awdl0
ff02::%utun0/32 fe80::c5e9:1a18:51ff:d0aa%utun0 UmCI utun0
I too am seeing this on one OS X 10.10.3 machine with docker-machine-0.2.0 (never had boot2docker installed thereupon; VirtualBox is the recommended 4.3.26). docker-machine works fine on another OS X 10.10.3 machine with both different network interfaces and network connectivity (and which also has the boot2docker CLI installed). If it helps, here is the output of the failing system:
$ docker-machine create -d virtualbox dev INFO[0000] Creating SSH key... INFO[0001] Creating VirtualBox VM... INFO[0012] Starting VirtualBox VM... INFO[0013] Waiting for VM to start... <<<hang for minutes while I can see in the VirtualBox GUI that docker is up inside the VM; am able to directly ssh in and verify that docker is up...>>>
$ VBoxManage list hostonlyifs Name: vboxnet0 GUID: 786f6276-656e-4074-8000-0a0027000000 DHCP: Disabled IPAddress: 192.168.99.1 NetworkMask: 255.255.255.0 IPV6Address: IPV6NetworkMaskPrefixLength: 0 HardwareAddress: 0a:00:27:00:00:00 MediumType: Ethernet Status: Up VBoxNetworkName: HostInterfaceNetworking-vboxnet0
$ netstat -nr Routing tables
Internet: Destination Gateway Flags Refs Use Netif Expire default 10.43.151.254 UGSc 17 2 en0 10.43.150/23 link#4 UCS 17 0 en0 10.43.150.88 18:a9:5:b5:10:43 UHLWI 0 0 en0 1137 10.43.150.92/32 link#4 UCS 1 0 en0 10.43.150.111 c8:2a:14:28:1a:c UHLWI 0 0 en0 10.43.150.120 3c:97:e:49:be:c6 UHLWI 0 0 en0 690 10.43.151.66 54:ee:75:13:98:67 UHLWI 0 0 en0 1169 10.43.151.84 3c:97:e:54:5c:63 UHLWI 0 0 en0 1116 10.43.151.88 54:ee:75:c:a3:16 UHLWI 0 0 en0 1194 10.43.151.106 0:21:5a:e7:bb:68 UHLWI 0 0 en0 1133 10.43.151.135 3c:97:e:4c:63:88 UHLWI 0 0 en0 1094 10.43.151.139 28:d2:44:6f:8f:ca UHLWI 0 0 en0 1177 10.43.151.156 f0:1f:af:26:1d:6c UHLWI 0 0 en0 1149 10.43.151.161 0:21:cc:63:0:74 UHLWI 0 0 en0 1140 10.43.151.168 0:21:cc:cb:5b:7f UHLWI 0 0 en0 1198 10.43.151.174 c4:2c:3:3c:8b:de UHLWI 0 0 en0 234 10.43.151.185 0:21:cc:bf:87:9c UHLWI 0 0 en0 1156 10.43.151.207 88:ae:1d:ae:ad:1b UHLWI 0 0 en0 1169 10.43.151.224 28:d2:44:39:e2:14 UHLWI 0 0 en0 1169 10.43.151.254/32 link#4 UCS 1 0 en0 10.43.151.254 7c:69:f6:f2:a2:3f UHLWIir 18 0 en0 925 10.43.151.255 ff:ff:ff:ff:ff:ff UHLWbI 0 47 en0 127 127.0.0.1 UCS 0 0 lo0 127.0.0.1 127.0.0.1 UH 506 19003 lo0 169.254 link#4 UCS 0 0 en0 192.168.99 link#7 UC 3 0 vboxnet 192.168.99.100 8:0:27:e8:fa:9d UHLWI 0 233 vboxnet 1044 192.168.99.255 ff:ff:ff:ff:ff:ff UHLWbI 0 25 vboxnet
Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UHL lo0 fe80::%lo0/64 fe80::1%lo0 UcI lo0 fe80::1%lo0 link#1 UHLI lo0 fe80::%en0/64 link#4 UCI en0 fe80::21f:5bff:fe3d:d5ac%en0 0:1f:5b:3d:d5:ac UHLI lo0 ff01::%lo0/32 ::1 UmCI lo0 ff01::%en0/32 link#4 UmCI en0 ff02::%lo0/32 ::1 UmCI lo0 ff02::%en0/32 link#4 UmCI en0
For those with a hang-on-create, do the last few lines of output from this show?
docker-machine --debug create --driver virtualbox fubar
The routing tables look fine. A quick way to verify the routing without relying on eyeball scanning of the table is:
route get <ip address>
How about firewall rules? I found them a bit tricky to inspect because there are two firewalls in Yosemite, pf and ipfw. The latter is deprecated and in Yosemite they actually took the ipfw binary away. You can grab the binary from a Mavericks to see what lurks there.
(Thanks for the hint about checking firewall rules; I didn't think I had any enabled on this machine. However, this machine has been incrementally upgraded since ~Leopard ...; pf appears to be the default/off with status: Disabled; "ipfw list" reports "65535 allow ip from any to any")
The last few lines don't reveal anything extra:
[...] GuestMemoryBalloon=0
DEBU[0025] STDERR: DEBU[0025] executing: /usr/bin/VBoxManage startvm fubar --type headless DEBU[0025] STDOUT: Waiting for VM "fubar" to power on... VM "fubar" has been successfully started.
DEBU[0025] STDERR: INFO[0025] Waiting for VM to start...
Description
I'm seeing this consistently on any vm creation in virtualbox past the first (or if there are pre-existing hostonlyifs).
Starting with no running vms and an empty list of hostonlyifs, the first vm will create correctly and work as expected. The next create for any other vm hangs at Waiting for VM to start....
I've been able to reproduce this every time I've tried so far (about 4-6 times). So if there's any other information you need or think would help, let me know and I can try to grab it.
Environment:
- OS X 10.9.5
- VirtualBox 4.3.10 r93012
- docker 1.6.0, build 4749651
- docker-machine 0.2.0 (HEAD) installed via homebrew
Pre-conditions:
$ VBoxManage list vms
$
$ VBoxManage list hostonlyifs
$
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
Create first vm (shortened to show just the vm creation output)
$ docker-machine --debug create -d virtualbox dev
...
INFO[0000] Creating VirtualBox VM...
DEBU[0000] Creating 20000 MB hard disk image...
Converting from raw image file="stdin" to file="/Users/agray/.docker/machine/machines/dev/disk.vmdk"...
Creating dynamic image with size 20971520000 bytes (20000MB)...
DEBU[0006] executing: /usr/bin/VBoxManage createvm --basefolder /Users/agray/.docker/machine/machines/dev --name dev --register
DEBU[0006] STDOUT: Virtual machine 'dev' is created and registered.
UUID: 94b1feaa-798a-4b7a-a9bc-67a07ac8ccac
Settings file: '/Users/agray/.docker/machine/machines/dev/dev/dev.vbox'
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage modifyvm dev --firmware bios --bioslogofadein off --bioslogofadeout off --natdnshostresolver1 on --bioslogodisplaytime 0 --biosbootmenu disabled --ostype Linux26_64 --cpus 8 --memory 1024 --acpi on --ioapic on --rtcuseutc on --cpuhotplug off --pae on --synthcpu off --hpet on --hwvirtex on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --boot1 dvd
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage modifyvm dev --nic1 nat --nictype1 virtio --cableconnected1 on
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage modifyvm dev --natpf1 ssh,tcp,127.0.0.1,50289,,22
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage list hostonlyifs
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage hostonlyif create
DEBU[0007] STDOUT: Interface 'vboxnet0' was successfully created
DEBU[0007] STDERR: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
DEBU[0007] executing: /usr/bin/VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.99.1 --netmask 255.255.255.0
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage list dhcpservers
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage dhcpserver add --netname HostInterfaceNetworking-vboxnet0 --ip 192.168.99.2 --netmask 255.255.255.0 --lowerip 192.168.99.100 --upperip 192.168.99.254 --enable
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage modifyvm dev --nic2 hostonly --nictype2 virtio --hostonlyadapter2 vboxnet0 --cableconnected2 on
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage storagectl dev --name SATA --add sata --hostiocache on
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage storageattach dev --storagectl SATA --port 0 --device 0 --type dvddrive --medium /Users/agray/.docker/machine/machines/dev/boot2docker.iso
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage storageattach dev --storagectl SATA --port 1 --device 0 --type hdd --medium /Users/agray/.docker/machine/machines/dev/disk.vmdk
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage guestproperty set dev /VirtualBox/GuestAdd/SharedFolders/MountPrefix /
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage guestproperty set dev /VirtualBox/GuestAdd/SharedFolders/MountDir /
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage sharedfolder add dev --name Users --hostpath /Users --automount
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage setextradata dev VBoxInternal2/SharedFoldersEnableSymlinksCreate/Users 1
DEBU[0007] STDOUT:
DEBU[0007] STDERR:
INFO[0007] Starting VirtualBox VM...
DEBU[0007] executing: /usr/bin/VBoxManage showvminfo dev --machinereadable
...
DEBU[0007] STDERR:
DEBU[0007] executing: /usr/bin/VBoxManage startvm dev --type headless
DEBU[0007] STDOUT: Waiting for VM "dev" to power on...
VM "dev" has been successfully started.
DEBU[0007] STDERR:
INFO[0007] Waiting for VM to start...
DEBU[0039] Getting to WaitForSSH function...
...
DEBU[0055] executing: ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectionAttempts=30 -o LogLevel=quiet -p 50289 -i /Users/agray/.docker/machine/machines/dev/id_rsa docker@localhost sudo /etc/init.d/docker start
INFO[0056] "dev" has been created and is now the active machine.
INFO[0056] To point your Docker client at it, run this in your shell: eval "$(docker-machine env dev)"
Post-conditions
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
dev * virtualbox Running tcp://192.168.99.100:2376
$ VBoxManage list vms
"dev" {94b1feaa-798a-4b7a-a9bc-67a07ac8ccac}
$ VBoxManage list hostonlyifs
Name: vboxnet0
GUID: 786f6276-656e-4074-8000-0a0027000000
DHCP: Disabled
IPAddress: 192.168.99.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet0
Create second vm (same shortened output)
$ docker-machine --debug create -d virtualbox dev2
...
INFO[0000] Creating VirtualBox VM...
DEBU[0000] Creating 20000 MB hard disk image...
Converting from raw image file="stdin" to file="/Users/agray/.docker/machine/machines/dev2/disk.vmdk"...
Creating dynamic image with size 20971520000 bytes (20000MB)...
DEBU[0006] executing: /usr/bin/VBoxManage createvm --basefolder /Users/agray/.docker/machine/machines/dev2 --name dev2 --register
DEBU[0006] STDOUT: Virtual machine 'dev2' is created and registered.
UUID: ee3124c8-0e7c-4ab1-8f9a-cfa16da8528a
Settings file: '/Users/agray/.docker/machine/machines/dev2/dev2/dev2.vbox'
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage modifyvm dev2 --firmware bios --bioslogofadein off --bioslogofadeout off --natdnshostresolver1 on --bioslogodisplaytime 0 --biosbootmenu disabled --ostype Linux26_64 --cpus 8 --memory 1024 --acpi on --ioapic on --rtcuseutc on --cpuhotplug off --pae on --synthcpu off --hpet on --hwvirtex on --nestedpaging on --largepages on --vtxvpid on --accelerate3d off --boot1 dvd
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage modifyvm dev2 --nic1 nat --nictype1 virtio --cableconnected1 on
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage modifyvm dev2 --natpf1 ssh,tcp,127.0.0.1,51613,,22
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage list hostonlyifs
DEBU[0006] STDOUT: Name: vboxnet0
GUID: 786f6276-656e-4074-8000-0a0027000000
DHCP: Disabled
IPAddress: 192.168.99.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet0
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage modifyvm dev2 --nic2 hostonly --nictype2 virtio --hostonlyadapter2 vboxnet0 --cableconnected2 on
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage storagectl dev2 --name SATA --add sata --hostiocache on
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage storageattach dev2 --storagectl SATA --port 0 --device 0 --type dvddrive --medium /Users/agray/.docker/machine/machines/dev2/boot2docker.iso
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage storageattach dev2 --storagectl SATA --port 1 --device 0 --type hdd --medium /Users/agray/.docker/machine/machines/dev2/disk.vmdk
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage guestproperty set dev2 /VirtualBox/GuestAdd/SharedFolders/MountPrefix /
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage guestproperty set dev2 /VirtualBox/GuestAdd/SharedFolders/MountDir /
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage sharedfolder add dev2 --name Users --hostpath /Users --automount
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage setextradata dev2 VBoxInternal2/SharedFoldersEnableSymlinksCreate/Users 1
DEBU[0006] STDOUT:
DEBU[0006] STDERR:
INFO[0006] Starting VirtualBox VM...
DEBU[0006] executing: /usr/bin/VBoxManage showvminfo dev2 --machinereadable
...
DEBU[0006] STDERR:
DEBU[0006] executing: /usr/bin/VBoxManage startvm dev2 --type headless
DEBU[0007] STDOUT: Waiting for VM "dev2" to power on...
VM "dev2" has been successfully started.
DEBU[0007] STDERR:
INFO[0007] Waiting for VM to start...
Post-conditions
The create call for dev2 hangs on Waiting for VM to start....
Meanwhile, in another tab:
$ VBoxManage list vms
"dev" {94b1feaa-798a-4b7a-a9bc-67a07ac8ccac}
"dev2" {ee3124c8-0e7c-4ab1-8f9a-cfa16da8528a}
$ VBoxManage list hostonlyifs
Name: vboxnet0
GUID: 786f6276-656e-4074-8000-0a0027000000
DHCP: Disabled
IPAddress: 192.168.99.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:00
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet0
$ docker-machine ls
Bad port '0'
ERRO[0000] error getting URL for host dev2: exit status 255
NAME ACTIVE DRIVER STATE URL SWARM
dev * virtualbox Running tcp://192.168.99.100:2376
dev2 virtualbox Running
I am also unable to create a new vbox machine.