Docker Community Forums

Share and learn in the Docker community.

Second machine creation : Waiting for ssh to be available... win10+hyperv

docker

(Hugo6) #1

Hi all,
I’m currently doing this tutorial : https://docs.docker.com/get-started/part4/#set-up-your-swarm and having some trouble during the creation of the SECOND (the first works well) virtual machine : docker-machine create -d hyperv --hyperv-virtual-switch "myswitch" myvm2.
I created the virtual switch external with “allow management operating system to share this network adapter”.
I’m on Win10 with hyperV, PowerShell on administrator mode.
Thanks in advance!

Here is the debug trace for docker-machine create -d hyperv --hyperv-virtual-switch "myswitch" myvm2:
Waiting for SSH to be available…
Getting to WaitForSSH function…
(myvm2) Calling .GetSSHHostname
(myvm2) DBG | [executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Get-VM myvm2 ).state
(myvm2) DBG | [stdout =====>] : Running
(myvm2) DBG |
(myvm2) DBG | [stderr =====>] :
(myvm2) DBG | [executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Get-VM myvm2 ).networkadapters[0]).ipaddresses[0]
(myvm2) DBG | [stdout =====>] : fe80::215:5dff:fe84:ac2f
(myvm2) DBG |
(myvm2) Calling .GetSSHPort
(myvm2) DBG | [stderr =====>] :
(myvm2) Calling .GetSSHKeyPath
(myvm2) Calling .GetSSHKeyPath
(myvm2) Calling .GetSSHUsername
Using SSH client type: external
&{[-F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none docker@fe80::215:5dff:fe84:ac2f -o IdentitiesOnly=yes -i C:\Users\Vaillant.docker\machine\machines\myvm2\id_rsa -p 22] C:\Program Files\Git\usr\bin\ssh.exe }
About to run SSH command:
exit 0
SSH cmd err, output: exit status 255:
Error getting ssh command ‘exit 0’ : ssh command error:
command : exit 0
err : exit status 255
output :


(Greglnye) #2

Try using the docker-machine –native-ssh switch.

e.g. `docker-machine --native-ssh create -d hyperv --hyperv-virtual-switch “myswitch” myvm2