Search code examples
windowsdockerhyper-vdocker-machine

Docker stuck on "Waiting for SSH to be available..."


I'm using a docker with Windows and Hyper-v to create containers. I've added a docker machine vmachine to my docker configuration. First time the machine is created, it gets an IP (although I cannot manage nginx to access it - ERR_CONNECTION_REFUSED) and finishes the bootup.

When I turn off the machine and then try to boot it, i get stuck in this message

Waiting for SSH to be available...

And it doesn't evolve from there. The machine is booted, however, I get an IPv6 when I input the command docker-machine ip vmachine like - fe80::215:5dff:fe21:10b insted of a IPv4

What am I doing wrong?


Solution

  • Problem here is by default docker uses DockerNAT network switch. You should create a new external network switch instead. This issue is covered here and here. You can create an external network switch using the below command

    docker-machine create -d hyperv --hyperv-virtual-switch external-switch tempbox1
    

    or you can create one through the UI

    external network switch

    Be sure to reboot the device after creating the external switch.