Reputation: 3461
I am new in using docker and I am trying to implement SWARM according to this tutorial - https://docs.docker.com/get-started/part4/#create-a-cluster
The tutorial starts with -
Launch Hyper-V Manager
Click Virtual Switch Manager in the right-hand menu
Click Create Virtual Switch of type External
I am using Windows 10 PRO and I cannot use Hyper-V Manager and Docker terminal at the same time. Because if I activate Hyper-V and then start docker terminal, my PC shows an error and shut down automatically.
So, I tried to create a virtual machine without Hyper-V by following code
$ docker-machine create -d hyperv --hyperv-virtual-switch "myswitch" myvm1
and as expected I got this error -
Wrapper Docker Machine process exiting due to closed plugin server (connection is shut down)
Error with pre-create check: "read tcp 127.0.0.1:50588->127.0.0.1:50587: wsarecv: `An existing connection was forcibly closed by the remote host."`
So, is there any alternative solution how can I proceed or to use Hyper-V Manager in Windows 10 without such problem.
Thanks a lot for your time :)
Upvotes: 0
Views: 629
Reputation: 146630
Virtualbox and Hyperv don't work together. Since you are using docker quickstart terminal
you should be using VirtualBox for the VM
$ docker-machine create -d virtualbox swarmanager1
$ docker-machine create -d virtualbox nodes1
$ docker-machine create -d virtualbox nodes2
Once done you switch to manager node
$ eval $(docker-machine env swarmanager1)
$ docker swarm init --advertise-addr eth0
This will give you a token command and you need to execute them for each node
$ eval $(docker-machine env nodes1)
$ docker <swarm command from manager>
Upvotes: 2