{"action":"created","issue":{"url":"https://api.github.com/repos/docker/machine/issues/1031","labels_url":"https://api.github.com/repos/docker/machine/issues/1031/labels{/name}","comments_url":"https://api.github.com/repos/docker/machine/issues/1031/comments","events_url":"https://api.github.com/repos/docker/machine/issues/1031/events","html_url":"https://github.com/docker/machine/issues/1031","id":69559571,"number":1031,"title":"Another reason docker-machine create is hanging","user":{"login":"far-blue","id":344317,"avatar_url":"https://avatars.githubusercontent.com/u/344317?v=3","gravatar_id":"","url":"https://api.github.com/users/far-blue","html_url":"https://github.com/far-blue","followers_url":"https://api.github.com/users/far-blue/followers","following_url":"https://api.github.com/users/far-blue/following{/other_user}","gists_url":"https://api.github.com/users/far-blue/gists{/gist_id}","starred_url":"https://api.github.com/users/far-blue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/far-blue/subscriptions","organizations_url":"https://api.github.com/users/far-blue/orgs","repos_url":"https://api.github.com/users/far-blue/repos","events_url":"https://api.github.com/users/far-blue/events{/privacy}","received_events_url":"https://api.github.com/users/far-blue/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/machine/labels/area/driver-virtualbox","name":"area/driver-virtualbox","color":"bfdadc"},{"url":"https://api.github.com/repos/docker/machine/labels/kind/bug","name":"kind/bug","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":55,"created_at":"2015-04-20T10:47:39Z","updated_at":"2015-09-29T14:41:50Z","closed_at":null,"body":"I'm also seeing `create` hang during the creation process with `Waiting for VM to start...`.\r\n\r\nFor 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.\r\n\r\nI 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`):\r\n```\r\nDEBU[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\r\n```\r\nwhich unsurprisingly errors with: `Bad port '0'`\r\n\r\nI 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”)`"},"comment":{"url":"https://api.github.com/repos/docker/machine/issues/comments/144081417","html_url":"https://github.com/docker/machine/issues/1031#issuecomment-144081417","issue_url":"https://api.github.com/repos/docker/machine/issues/1031","id":144081417,"user":{"login":"abacaj","id":7272343,"avatar_url":"https://avatars.githubusercontent.com/u/7272343?v=3","gravatar_id":"","url":"https://api.github.com/users/abacaj","html_url":"https://github.com/abacaj","followers_url":"https://api.github.com/users/abacaj/followers","following_url":"https://api.github.com/users/abacaj/following{/other_user}","gists_url":"https://api.github.com/users/abacaj/gists{/gist_id}","starred_url":"https://api.github.com/users/abacaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abacaj/subscriptions","organizations_url":"https://api.github.com/users/abacaj/orgs","repos_url":"https://api.github.com/users/abacaj/repos","events_url":"https://api.github.com/users/abacaj/events{/privacy}","received_events_url":"https://api.github.com/users/abacaj/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T14:41:50Z","updated_at":"2015-09-29T14:41:50Z","body":"same issue here\r\n"}}