Docker swarm does not connect to windows host

Hi @mumshadgmail,

Kindly help me to understand what I am doing wrong. To practice docker swarm I installed virtual box in my windows laptop. I create a ubuntu vm inside vbox. I initiated docker swarm init in the windows host. It gave me ip from docker desktop network config(192.168.65.4). When i used the token and tried to join using the above ip its showing connection timedout before the node joined. Unable to ping it. Only address I can access from ubuntu is 192.168.1.4(local ip of windows). Kindly lend me a hand to understand what am I making wrong.

In Virtual box, there are plenty of network modes. I have chosen bridge adapter. I have also disabled firewall on my windows laptop

Ensure for bridge mode you have selected the right host adapter. i.e. if your computer connects by Wi-Fi ensure the bridge adapter is the Wi-Fi network.

When changing network adapters you need to either restart networking on the VM or reboot the VM. With your windows machine being on 192.168.1.4 you should expect the VM to get an IP address in the 192.168.1.x range.

Yes I have selected bridge network adapter in the virtual box. I got the similar ip but ending with 192.168.1.4 in ubuntu. In windows i advertised 192.168.1.3:2377 Im able to ping this ip inside vm also connected with telnet. Also from windows i was able to ssh into the linux machine. Only issue is linux machine is not joining as worker into the host machine. What am I making wrong? Bit confused. Any help is appreciated much. Error clearly says connection is refused. To be on the safer side, I disabled firewall on windows laptop. Sadly it was not a green signal

Ensure the time is the same on the VM and the host.

Also you can try to set promiscuous mode is set to allow all in the network in VirtualBox.

@al1 I have checked the time it is same on both vm and windows host. I have seen that ip is pinging from vm and i can able to telnet into the host. But unable to connect with docker swarm

If you can telnet to port 2377 from the worker VM but can’t connect to the swarm then there must be something else preventing the connection.

Looks like it might not be supported:

Add a VM running Ubuntu as a worker node in Docker Swarm - Stack Overflow