Not able to add host using docker-machine -
i have docker-engine installed on linux vm on company data center. installed docker-machine on windows. want manage docker-engine through windows machine. want add host , executed following command:
docker-machine create -d generic --generic-ip-address 10.51.227.5 --generic-ssh-port 22 --generic-ssh-user root compute
but getting following error after waiting couple of minutes
running pre-create checks... creating machine... (compute) no ssh key specified. connecting machine , in future require ssh agent contain appropriate key. waiting machine running, may take few minutes... detecting operating system of created instance... waiting ssh available... error creating machine: error detecting os: many retries waiting ssh available. last error: maximum number of retries (60) exceeded
i don't know doing wrong.
try using native ssh
unfortunately, can happen multiple reasons, since you're running on windows, have guess. try using native ssh client - is, go library ships docker, rather ssh.exe
. so, pass --native-ssh
argument docker-machine
:
docker-machine --native-ssh create --driver generic --generic-ip-address example.com examplemachine
examining debug output
you can examine various debugging messages passing --debug
argument. when did that, , did not specify --native-ssh
argument, got lots of error messages:
> docker-machine create --driver generic --generic-ip-address example.com examplemachine <...snip...> waiting ssh available... getting waitforssh function... (apsylania) calling .getsshhostname (apsylania) calling .getsshport (apsylania) calling .getsshkeypath (apsylania) calling .getsshkeypath (apsylania) 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 root@example.com -o identitiesonly=yes -i c:\users\myaccount\.docker\machine\machines\examplemachine\id_rsa -p 22] c:\program files\openssh-win64\ssh.exe <nil>} 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 : getting waitforssh function... <...snip...>
my guess, after trying pass --generic-ssh-key
backslashes on windows , having produce error, docker (still) isn't quite polished on windows be, , wondered if there buggy way calls out external ssh client. since using native go ssh client worked me, think guess correct, @ least case.
Comments
Post a Comment