Home:ALL Converter>docker-machine on Linux subsystem for Windows can't connect to running host

docker-machine on Linux subsystem for Windows can't connect to running host

Ask Time:2017-09-12T19:39:02         Author:Wouter de Kort

Json Formatter

I'm running Docker for Windows 17.06.2-ce on Windows 10 1703 build 16278.1000.

I have created a cluster with two Hyper-V hosts similair to https://docs.docker.com/get-started/part4/#understanding-swarm-clusters.

When I run docker-machine ls from a Windows command prompt I get the following output:

docker-machine ls from command prompt

I can also use docker-machine ssh myvm1 to ssh into the host.

I've setup Ubuntu Linux Subsystem for Windows. I've added the PATH variables for Docker to .bashrc and added aliases for docker.exe and docker-machine.exe. However, when using docker from the Ubuntu bash, the regular docker commands work OK but docker-machine ls gives me the following:

docker-machine ls from command prompt

Running docker-machine ssh myvm1 from Ubuntu gives the following error:

Error: Cannot run SSH command: Host "myvm1" is not running

Is it possible to use docker-machine from the Linux subsystem to access Hyper-v hosts running on the local machine? What can I do to fix the error I get?

Author:Wouter de Kort,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/46175427/docker-machine-on-linux-subsystem-for-windows-cant-connect-to-running-host
yy