简体   繁体   中英

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

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

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

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?

I had the same symptoms when running "docker-machine ls" and "docker-machine ssh myvm1" from command prompt without Administrator privileges.

Powershell under Administrator worked as expected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM