Installed docker for windows on windows 10 pro. Trying to create a docker machine using the command “docker-machine create --driver hyperv dev”
docker-machine.exe version 0.8.0-rc2, build 4ca1b85
Expected behavior
docker machine is created successfully
Actual behavior
since last 30 minutes the process is stuck at “Waiting for ssh to be available…” message.
Running pre-create checks…
Creating machine…
(devhost) Copying C:\Users\Vishal\.docker\machine\cache\boot2docker.iso to C:\Users\Vishal\.docker\machine\machines\devhost\boot2docker.iso…
(devhost) Creating SSH key…
(devhost) Creating VM…
(devhost) Using switch “DockerNAT”
(devhost) Creating VHD
(devhost) Starting VM…
(devhost) Waiting for host to start…
Waiting for machine to be running, this may take a few minutes…
Detecting operating system of created instance…
Waiting for SSH to be available…
Are you doing this in an Administrator powershell prompt? That’s required for the hyper-v driver to work. I’ve successfully created hyper-v boot2docker machines alongside Docker for Windows.
@friism yes i was running as an administrator. While going through the other questions on the forum i came across your reply Using Docker for Window’s docker-machine create. I created an external switch and it did create the machine successfully. Not sure why doesn’t it work with “DockerNAT” switch.
I’ve not found root cause why I cannot connect to my VM via ssh but I’ve found work around. After reading many different posts I’ve started assume that cause can be installed virtualbox. Uninstallation nothing changed, so I decided to recover my windows to the point before Virtualbox has been installed - and it helps. Now everything works great.
Then, edit virtual network adapter, change it from NAT.
Recreate vm with this command, specify also virtual network adapter to avoid wrong links. https://docs.docker.com/machine/drivers/hyper-v/
I used the same from Docker: DockerNAT, but change the option "Connection Type"in hyper-v: “External”, take the network adapter your physical computer shows. Perhaps the virtual card provided is missconfigured or your personal antivirus/firewall client avoids properly being connected.
fyi, without digging further into root cause, for me switching ssh implementation worked: changed from openssh to implementation that comes with git. OS: Win 10. docker-machine: 0.10.0. Git 2.12.2.
putty
Unable to use key file “C:\Users\jicky.docker\machine\machines\myvm2\id_rsa” (OpenSSH SSH-2 private key (old PEM format))
ssh -i C:\Users\jicky.docker\machine\machines\myvm1\id_rsa docker@192.168.1.145
key_load_public: invalid format
Unable to negotiate with 192.168.1.145 port 22: no matching host key type found. Their offer: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256
Problem: “Waiting for ssh to be available …” message
A connection between IntelliJ and Boot2Docker is not possible.
In the Windows world, however, there are some peculiarities to consider, which I have not found explicitly described.
Here is my solution:
Install Boot2Docker for Windows -> this is an easy step.
Then install / create a VM (based on boot2docker.iso) with docker-machine create --driver hyperv vm-docker-machine-01
Of course, HyperV must be activated.
The installation / process will hang with a “Waiting for ssh to be available …” message.
Uninstall OpenSSH for Windows Beta, otherwise abort the creation of the virtual machine with o.g. Error.
Settings -> Apps -> optional features
Then the command docker-machine create --driver hyperv vm-docker-machine-01 runs smoothly
and a connection between IntelliJ and Boot2Docker can be established.
It worked for me as well:
User HyperV
Ran Git-Bash as Administrator
used command docker-machine create -d hyperv --hyperv-virtual-switch “DockerNAT” node1 (in HyperV Manager I set DockerNAT as external network)
Previously I was receiving with PowerShell Waiting for host to start... and on some HyperV configurations was stuck on Waiting for SSH to be available...
Note: Sometimes on Git-Bash it does not create node and stucks, then I reswitch between private and external networks and it unstucks (figures)
figure it out. some wifi device seems not so compatible with docker-machine.i change external switch to even iphone enthernet provider and everything works fine.
I had this issue as well. On Windows 10, I was attempting to create a new Docker machine using the hyperv driver and an external switch. Upon create, the sequence would repeatedly get stuck on “Waiting for ssh to be available…”, on both Powershell and cmd. Took the advice in this thread and ran the exact same commands in Git Bash and everything went though fine!
My question is WHY did Git Bash work while Powershell and cmd both got hung up?
Seconded. Running Powershell as admin, disabling firewalls, turning off my VPN, all failed. I was following Docker’s “get started” tutorial, part 3. I created one vm with all off those off using git bash (as Admin), then created another with them all turned back on, just to eliminate that variable.
The relevant variable was the shell: Git bash > Powershell.
For anyone stuck on “waiting for ssh to be available,” this is likely the answer
I REALLY want to try out this fix but I just can’t get exactly what he is doing. Which IP address is in that ssh command he is putting on his VM? What is he doing after that on his windows machine with id_rsa permissions? What buttons is he changing? can anyone out there put this together for someone who doesn’t know a lot about it but needs his docker-machine working?