Docker “waiting for an IP” when starting or creating new machine












2














Been struggling to get this resolved for several days now.



Trying to implement a WSL and VirtualBox setup on Windows 10 Pro. The reasons aren't relevant to the issue, but using Hyper-V isn't an option. Trying to implement per:



https://www.paraesthesia.com/archive/2018/09/20/docker-on-wsl-with-virtualbox-and-docker-machine/



Whether I use Docker Toolbox or just docker-machine, the results are invariably the same. "Running as Administrator" just creates the VMs under the admin account which I don't want either. Tried rm and recreating the VMs a few dozen times.



Basically whether creating a new machine, or trying to start one, I get this error:




(default) Waiting for an IP...



Error creating machine: Error in driver during machine creation: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded




It still creates the machine but state is timeout:



NAME      ACTIVE   DRIVER       STATE     URL   SWARM   DOCKER   ERRORS
default virtualbox Timeout


I do a docker-machine env default and get the following:



Error checking TLS connection: ssh command error:
command : ip addr show
err : exit status 255
output :


The VM does show up in VirtualBox and has the same network adapter as my other working VMs (in that they can connect to the internet) with the exception of "Adapter 2". That is not on my other VMs:



enter image description here



The Docker VM has the following in terminal:



enter image description hereenter image description here



In addition, I have gone through the following suggestions and nothing has resolved the issue. The solutions generally involve recreating the VM.



Also, my host is at 192.168.1.x on the network.



https://github.com/docker/toolbox/issues/457



https://stackoverflow.com/questions/35958619/docker-terminal-waiting-for-an-ip



https://github.com/docker/machine/issues/3268



https://github.com/docker/machine/issues/4053



UPDATES:



The VBoxManager.exe and the docker-machine.exe are in the same directory.



enter image description here



enter image description here



enter image description here



enter image description here



enter image description here



enter image description here



enter image description here



enter image description here



enter image description here










share|improve this question





























    2














    Been struggling to get this resolved for several days now.



    Trying to implement a WSL and VirtualBox setup on Windows 10 Pro. The reasons aren't relevant to the issue, but using Hyper-V isn't an option. Trying to implement per:



    https://www.paraesthesia.com/archive/2018/09/20/docker-on-wsl-with-virtualbox-and-docker-machine/



    Whether I use Docker Toolbox or just docker-machine, the results are invariably the same. "Running as Administrator" just creates the VMs under the admin account which I don't want either. Tried rm and recreating the VMs a few dozen times.



    Basically whether creating a new machine, or trying to start one, I get this error:




    (default) Waiting for an IP...



    Error creating machine: Error in driver during machine creation: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded




    It still creates the machine but state is timeout:



    NAME      ACTIVE   DRIVER       STATE     URL   SWARM   DOCKER   ERRORS
    default virtualbox Timeout


    I do a docker-machine env default and get the following:



    Error checking TLS connection: ssh command error:
    command : ip addr show
    err : exit status 255
    output :


    The VM does show up in VirtualBox and has the same network adapter as my other working VMs (in that they can connect to the internet) with the exception of "Adapter 2". That is not on my other VMs:



    enter image description here



    The Docker VM has the following in terminal:



    enter image description hereenter image description here



    In addition, I have gone through the following suggestions and nothing has resolved the issue. The solutions generally involve recreating the VM.



    Also, my host is at 192.168.1.x on the network.



    https://github.com/docker/toolbox/issues/457



    https://stackoverflow.com/questions/35958619/docker-terminal-waiting-for-an-ip



    https://github.com/docker/machine/issues/3268



    https://github.com/docker/machine/issues/4053



    UPDATES:



    The VBoxManager.exe and the docker-machine.exe are in the same directory.



    enter image description here



    enter image description here



    enter image description here



    enter image description here



    enter image description here



    enter image description here



    enter image description here



    enter image description here



    enter image description here










    share|improve this question



























      2












      2








      2


      0





      Been struggling to get this resolved for several days now.



      Trying to implement a WSL and VirtualBox setup on Windows 10 Pro. The reasons aren't relevant to the issue, but using Hyper-V isn't an option. Trying to implement per:



      https://www.paraesthesia.com/archive/2018/09/20/docker-on-wsl-with-virtualbox-and-docker-machine/



      Whether I use Docker Toolbox or just docker-machine, the results are invariably the same. "Running as Administrator" just creates the VMs under the admin account which I don't want either. Tried rm and recreating the VMs a few dozen times.



      Basically whether creating a new machine, or trying to start one, I get this error:




      (default) Waiting for an IP...



      Error creating machine: Error in driver during machine creation: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded




      It still creates the machine but state is timeout:



      NAME      ACTIVE   DRIVER       STATE     URL   SWARM   DOCKER   ERRORS
      default virtualbox Timeout


      I do a docker-machine env default and get the following:



      Error checking TLS connection: ssh command error:
      command : ip addr show
      err : exit status 255
      output :


      The VM does show up in VirtualBox and has the same network adapter as my other working VMs (in that they can connect to the internet) with the exception of "Adapter 2". That is not on my other VMs:



      enter image description here



      The Docker VM has the following in terminal:



      enter image description hereenter image description here



      In addition, I have gone through the following suggestions and nothing has resolved the issue. The solutions generally involve recreating the VM.



      Also, my host is at 192.168.1.x on the network.



      https://github.com/docker/toolbox/issues/457



      https://stackoverflow.com/questions/35958619/docker-terminal-waiting-for-an-ip



      https://github.com/docker/machine/issues/3268



      https://github.com/docker/machine/issues/4053



      UPDATES:



      The VBoxManager.exe and the docker-machine.exe are in the same directory.



      enter image description here



      enter image description here



      enter image description here



      enter image description here



      enter image description here



      enter image description here



      enter image description here



      enter image description here



      enter image description here










      share|improve this question















      Been struggling to get this resolved for several days now.



      Trying to implement a WSL and VirtualBox setup on Windows 10 Pro. The reasons aren't relevant to the issue, but using Hyper-V isn't an option. Trying to implement per:



      https://www.paraesthesia.com/archive/2018/09/20/docker-on-wsl-with-virtualbox-and-docker-machine/



      Whether I use Docker Toolbox or just docker-machine, the results are invariably the same. "Running as Administrator" just creates the VMs under the admin account which I don't want either. Tried rm and recreating the VMs a few dozen times.



      Basically whether creating a new machine, or trying to start one, I get this error:




      (default) Waiting for an IP...



      Error creating machine: Error in driver during machine creation: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded




      It still creates the machine but state is timeout:



      NAME      ACTIVE   DRIVER       STATE     URL   SWARM   DOCKER   ERRORS
      default virtualbox Timeout


      I do a docker-machine env default and get the following:



      Error checking TLS connection: ssh command error:
      command : ip addr show
      err : exit status 255
      output :


      The VM does show up in VirtualBox and has the same network adapter as my other working VMs (in that they can connect to the internet) with the exception of "Adapter 2". That is not on my other VMs:



      enter image description here



      The Docker VM has the following in terminal:



      enter image description hereenter image description here



      In addition, I have gone through the following suggestions and nothing has resolved the issue. The solutions generally involve recreating the VM.



      Also, my host is at 192.168.1.x on the network.



      https://github.com/docker/toolbox/issues/457



      https://stackoverflow.com/questions/35958619/docker-terminal-waiting-for-an-ip



      https://github.com/docker/machine/issues/3268



      https://github.com/docker/machine/issues/4053



      UPDATES:



      The VBoxManager.exe and the docker-machine.exe are in the same directory.



      enter image description here



      enter image description here



      enter image description here



      enter image description here



      enter image description here



      enter image description here



      enter image description here



      enter image description here



      enter image description here







      virtualbox docker windows-subsystem-for-linux






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 28 '18 at 16:30

























      asked Dec 21 '18 at 19:28









      sockpuppet

      1154




      1154






















          1 Answer
          1






          active

          oldest

          votes


















          2














          TL;DR "Waiting for an IP" is shown when docker-machine wants to connect the guest machine from host. Possible causes: host-only network is blocked in Firewall, DHCP disabled, wrong IPv4 configuration etc.





          • Requirements:




            • Intel VT-x enabled in BIOS

            • Windows 10 64 bit with latest Ubuntu (or other GNU/Linux distribution) installed in WSL


            • VirtualBox 64 bit installed and Hyper-V disabled


            • Docker Machine 64 bit for Windows (file name docker-machine-Windows-x86_64.exe)

            • Preliminary knowledge about networking and docker machine




          • Environments:




            • VirualBox Guest (also Docker host): boot2docker lightweight GNU/Linux image for Docker

            • VirtualBox Host: Windows 10 64 bit

            • Docker Client: docker-ce in Ubuntu WSL

            • Used IPv4 range in Host-Only interface: From 192.168.99.0 to 192.168.99.255 i.e. 192.168.99.0/24 with DHCP enabled. You may change this as you want but DHCP is important for Docker Machine




          I followed the article link provided in the question. Install docker-ce client in Ubuntu WSL with these following commands:



          sudo apt-get update
          sudo apt-get upgrade
          sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
          curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
          sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
          sudo apt-get install docker-ce
          docker run hello-world
          # you’ll get a message like this:
          # docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.




          Now come back to Windows 10 host machine. Follow these step respectively:




          • Download Docker Machine 64 bit for Windows. Copy docker-machine-Windows-x86_64.exe file in VirtualBox installation folder or add VBOX_INSTALL_PATH environment variable so that docker machine executable can find VBoxManage.exe.


          • Add Host-Only virtual interface from VirtualBox Manager window. Then set up all the required IPv4 configurations in that window or from network control panel ncpa.cpl. Any private IPv4 addresses can be used. Here are the screenshots:


          • In Network Control Panel:



          ipv4-network-control-panel




          • In VirtualBox Manager Window:


          host-only-network-configuration




          • Allow 192.168.99.0/24 IPv4 range for both inbound and outbound connections in Windows Firewall. Also allow VBoxHeadless.exe in Windows Firewall for NTP connection in guest OS. Then run this command to create docker-host virtual OS in VitualBox with this command: docker-machine.exe create docker-host, it will install and configure VM guest OS.


          • Run docker-machine.exe env docker-host command to show configured environments. Copy those environments in WSL world or copy in .bash_profile file as following (variables will change):



          # These are example. Don't copy and paste.
          export DOCKER_HOST=192.168.99.104:2376
          export DOCKER_TLS_VERIFY=1
          export DOCKER_CERT_PATH=/mnt/c/users/username/.docker/machine/machines/docker-host
          export DOCKER_MACHINE_NAME=docker-host
          export COMPOSE_CONVERT_WINDOWS_PATHS=true




          In WSL Ubuntu try docker run hello-world. Use docker-machine.exe stop docker-host to stop the boot2docker VM. If Windows Firewall is blocking network connections then allow VirtualBox.exe, VirtualBoxVM.exe and VBoxHeadless.exe in Windows Firewall outbound rules. Also allow the host-only network IPv4 addresses with these following commands:





          New-NetFirewallRule -DisplayName "Host_Only_Network" -Name "Host_Only_Network_In" -Direction Inbound -RemoteAddress 192.168.99.0/24 -Action Allow
          New-NetFirewallRule -DisplayName "Host_Only_Network" -Name "Host_Only_Network_Out" -Direction Outbound -RemoteAddress 192.168.99.0/24 -Action Allow









          share|improve this answer























          • Let us continue this discussion in chat.
            – Biswapriyo
            Dec 28 '18 at 17:47











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386752%2fdocker-waiting-for-an-ip-when-starting-or-creating-new-machine%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          TL;DR "Waiting for an IP" is shown when docker-machine wants to connect the guest machine from host. Possible causes: host-only network is blocked in Firewall, DHCP disabled, wrong IPv4 configuration etc.





          • Requirements:




            • Intel VT-x enabled in BIOS

            • Windows 10 64 bit with latest Ubuntu (or other GNU/Linux distribution) installed in WSL


            • VirtualBox 64 bit installed and Hyper-V disabled


            • Docker Machine 64 bit for Windows (file name docker-machine-Windows-x86_64.exe)

            • Preliminary knowledge about networking and docker machine




          • Environments:




            • VirualBox Guest (also Docker host): boot2docker lightweight GNU/Linux image for Docker

            • VirtualBox Host: Windows 10 64 bit

            • Docker Client: docker-ce in Ubuntu WSL

            • Used IPv4 range in Host-Only interface: From 192.168.99.0 to 192.168.99.255 i.e. 192.168.99.0/24 with DHCP enabled. You may change this as you want but DHCP is important for Docker Machine




          I followed the article link provided in the question. Install docker-ce client in Ubuntu WSL with these following commands:



          sudo apt-get update
          sudo apt-get upgrade
          sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
          curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
          sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
          sudo apt-get install docker-ce
          docker run hello-world
          # you’ll get a message like this:
          # docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.




          Now come back to Windows 10 host machine. Follow these step respectively:




          • Download Docker Machine 64 bit for Windows. Copy docker-machine-Windows-x86_64.exe file in VirtualBox installation folder or add VBOX_INSTALL_PATH environment variable so that docker machine executable can find VBoxManage.exe.


          • Add Host-Only virtual interface from VirtualBox Manager window. Then set up all the required IPv4 configurations in that window or from network control panel ncpa.cpl. Any private IPv4 addresses can be used. Here are the screenshots:


          • In Network Control Panel:



          ipv4-network-control-panel




          • In VirtualBox Manager Window:


          host-only-network-configuration




          • Allow 192.168.99.0/24 IPv4 range for both inbound and outbound connections in Windows Firewall. Also allow VBoxHeadless.exe in Windows Firewall for NTP connection in guest OS. Then run this command to create docker-host virtual OS in VitualBox with this command: docker-machine.exe create docker-host, it will install and configure VM guest OS.


          • Run docker-machine.exe env docker-host command to show configured environments. Copy those environments in WSL world or copy in .bash_profile file as following (variables will change):



          # These are example. Don't copy and paste.
          export DOCKER_HOST=192.168.99.104:2376
          export DOCKER_TLS_VERIFY=1
          export DOCKER_CERT_PATH=/mnt/c/users/username/.docker/machine/machines/docker-host
          export DOCKER_MACHINE_NAME=docker-host
          export COMPOSE_CONVERT_WINDOWS_PATHS=true




          In WSL Ubuntu try docker run hello-world. Use docker-machine.exe stop docker-host to stop the boot2docker VM. If Windows Firewall is blocking network connections then allow VirtualBox.exe, VirtualBoxVM.exe and VBoxHeadless.exe in Windows Firewall outbound rules. Also allow the host-only network IPv4 addresses with these following commands:





          New-NetFirewallRule -DisplayName "Host_Only_Network" -Name "Host_Only_Network_In" -Direction Inbound -RemoteAddress 192.168.99.0/24 -Action Allow
          New-NetFirewallRule -DisplayName "Host_Only_Network" -Name "Host_Only_Network_Out" -Direction Outbound -RemoteAddress 192.168.99.0/24 -Action Allow









          share|improve this answer























          • Let us continue this discussion in chat.
            – Biswapriyo
            Dec 28 '18 at 17:47
















          2














          TL;DR "Waiting for an IP" is shown when docker-machine wants to connect the guest machine from host. Possible causes: host-only network is blocked in Firewall, DHCP disabled, wrong IPv4 configuration etc.





          • Requirements:




            • Intel VT-x enabled in BIOS

            • Windows 10 64 bit with latest Ubuntu (or other GNU/Linux distribution) installed in WSL


            • VirtualBox 64 bit installed and Hyper-V disabled


            • Docker Machine 64 bit for Windows (file name docker-machine-Windows-x86_64.exe)

            • Preliminary knowledge about networking and docker machine




          • Environments:




            • VirualBox Guest (also Docker host): boot2docker lightweight GNU/Linux image for Docker

            • VirtualBox Host: Windows 10 64 bit

            • Docker Client: docker-ce in Ubuntu WSL

            • Used IPv4 range in Host-Only interface: From 192.168.99.0 to 192.168.99.255 i.e. 192.168.99.0/24 with DHCP enabled. You may change this as you want but DHCP is important for Docker Machine




          I followed the article link provided in the question. Install docker-ce client in Ubuntu WSL with these following commands:



          sudo apt-get update
          sudo apt-get upgrade
          sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
          curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
          sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
          sudo apt-get install docker-ce
          docker run hello-world
          # you’ll get a message like this:
          # docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.




          Now come back to Windows 10 host machine. Follow these step respectively:




          • Download Docker Machine 64 bit for Windows. Copy docker-machine-Windows-x86_64.exe file in VirtualBox installation folder or add VBOX_INSTALL_PATH environment variable so that docker machine executable can find VBoxManage.exe.


          • Add Host-Only virtual interface from VirtualBox Manager window. Then set up all the required IPv4 configurations in that window or from network control panel ncpa.cpl. Any private IPv4 addresses can be used. Here are the screenshots:


          • In Network Control Panel:



          ipv4-network-control-panel




          • In VirtualBox Manager Window:


          host-only-network-configuration




          • Allow 192.168.99.0/24 IPv4 range for both inbound and outbound connections in Windows Firewall. Also allow VBoxHeadless.exe in Windows Firewall for NTP connection in guest OS. Then run this command to create docker-host virtual OS in VitualBox with this command: docker-machine.exe create docker-host, it will install and configure VM guest OS.


          • Run docker-machine.exe env docker-host command to show configured environments. Copy those environments in WSL world or copy in .bash_profile file as following (variables will change):



          # These are example. Don't copy and paste.
          export DOCKER_HOST=192.168.99.104:2376
          export DOCKER_TLS_VERIFY=1
          export DOCKER_CERT_PATH=/mnt/c/users/username/.docker/machine/machines/docker-host
          export DOCKER_MACHINE_NAME=docker-host
          export COMPOSE_CONVERT_WINDOWS_PATHS=true




          In WSL Ubuntu try docker run hello-world. Use docker-machine.exe stop docker-host to stop the boot2docker VM. If Windows Firewall is blocking network connections then allow VirtualBox.exe, VirtualBoxVM.exe and VBoxHeadless.exe in Windows Firewall outbound rules. Also allow the host-only network IPv4 addresses with these following commands:





          New-NetFirewallRule -DisplayName "Host_Only_Network" -Name "Host_Only_Network_In" -Direction Inbound -RemoteAddress 192.168.99.0/24 -Action Allow
          New-NetFirewallRule -DisplayName "Host_Only_Network" -Name "Host_Only_Network_Out" -Direction Outbound -RemoteAddress 192.168.99.0/24 -Action Allow









          share|improve this answer























          • Let us continue this discussion in chat.
            – Biswapriyo
            Dec 28 '18 at 17:47














          2












          2








          2






          TL;DR "Waiting for an IP" is shown when docker-machine wants to connect the guest machine from host. Possible causes: host-only network is blocked in Firewall, DHCP disabled, wrong IPv4 configuration etc.





          • Requirements:




            • Intel VT-x enabled in BIOS

            • Windows 10 64 bit with latest Ubuntu (or other GNU/Linux distribution) installed in WSL


            • VirtualBox 64 bit installed and Hyper-V disabled


            • Docker Machine 64 bit for Windows (file name docker-machine-Windows-x86_64.exe)

            • Preliminary knowledge about networking and docker machine




          • Environments:




            • VirualBox Guest (also Docker host): boot2docker lightweight GNU/Linux image for Docker

            • VirtualBox Host: Windows 10 64 bit

            • Docker Client: docker-ce in Ubuntu WSL

            • Used IPv4 range in Host-Only interface: From 192.168.99.0 to 192.168.99.255 i.e. 192.168.99.0/24 with DHCP enabled. You may change this as you want but DHCP is important for Docker Machine




          I followed the article link provided in the question. Install docker-ce client in Ubuntu WSL with these following commands:



          sudo apt-get update
          sudo apt-get upgrade
          sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
          curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
          sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
          sudo apt-get install docker-ce
          docker run hello-world
          # you’ll get a message like this:
          # docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.




          Now come back to Windows 10 host machine. Follow these step respectively:




          • Download Docker Machine 64 bit for Windows. Copy docker-machine-Windows-x86_64.exe file in VirtualBox installation folder or add VBOX_INSTALL_PATH environment variable so that docker machine executable can find VBoxManage.exe.


          • Add Host-Only virtual interface from VirtualBox Manager window. Then set up all the required IPv4 configurations in that window or from network control panel ncpa.cpl. Any private IPv4 addresses can be used. Here are the screenshots:


          • In Network Control Panel:



          ipv4-network-control-panel




          • In VirtualBox Manager Window:


          host-only-network-configuration




          • Allow 192.168.99.0/24 IPv4 range for both inbound and outbound connections in Windows Firewall. Also allow VBoxHeadless.exe in Windows Firewall for NTP connection in guest OS. Then run this command to create docker-host virtual OS in VitualBox with this command: docker-machine.exe create docker-host, it will install and configure VM guest OS.


          • Run docker-machine.exe env docker-host command to show configured environments. Copy those environments in WSL world or copy in .bash_profile file as following (variables will change):



          # These are example. Don't copy and paste.
          export DOCKER_HOST=192.168.99.104:2376
          export DOCKER_TLS_VERIFY=1
          export DOCKER_CERT_PATH=/mnt/c/users/username/.docker/machine/machines/docker-host
          export DOCKER_MACHINE_NAME=docker-host
          export COMPOSE_CONVERT_WINDOWS_PATHS=true




          In WSL Ubuntu try docker run hello-world. Use docker-machine.exe stop docker-host to stop the boot2docker VM. If Windows Firewall is blocking network connections then allow VirtualBox.exe, VirtualBoxVM.exe and VBoxHeadless.exe in Windows Firewall outbound rules. Also allow the host-only network IPv4 addresses with these following commands:





          New-NetFirewallRule -DisplayName "Host_Only_Network" -Name "Host_Only_Network_In" -Direction Inbound -RemoteAddress 192.168.99.0/24 -Action Allow
          New-NetFirewallRule -DisplayName "Host_Only_Network" -Name "Host_Only_Network_Out" -Direction Outbound -RemoteAddress 192.168.99.0/24 -Action Allow









          share|improve this answer














          TL;DR "Waiting for an IP" is shown when docker-machine wants to connect the guest machine from host. Possible causes: host-only network is blocked in Firewall, DHCP disabled, wrong IPv4 configuration etc.





          • Requirements:




            • Intel VT-x enabled in BIOS

            • Windows 10 64 bit with latest Ubuntu (or other GNU/Linux distribution) installed in WSL


            • VirtualBox 64 bit installed and Hyper-V disabled


            • Docker Machine 64 bit for Windows (file name docker-machine-Windows-x86_64.exe)

            • Preliminary knowledge about networking and docker machine




          • Environments:




            • VirualBox Guest (also Docker host): boot2docker lightweight GNU/Linux image for Docker

            • VirtualBox Host: Windows 10 64 bit

            • Docker Client: docker-ce in Ubuntu WSL

            • Used IPv4 range in Host-Only interface: From 192.168.99.0 to 192.168.99.255 i.e. 192.168.99.0/24 with DHCP enabled. You may change this as you want but DHCP is important for Docker Machine




          I followed the article link provided in the question. Install docker-ce client in Ubuntu WSL with these following commands:



          sudo apt-get update
          sudo apt-get upgrade
          sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
          curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
          sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
          sudo apt-get install docker-ce
          docker run hello-world
          # you’ll get a message like this:
          # docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.




          Now come back to Windows 10 host machine. Follow these step respectively:




          • Download Docker Machine 64 bit for Windows. Copy docker-machine-Windows-x86_64.exe file in VirtualBox installation folder or add VBOX_INSTALL_PATH environment variable so that docker machine executable can find VBoxManage.exe.


          • Add Host-Only virtual interface from VirtualBox Manager window. Then set up all the required IPv4 configurations in that window or from network control panel ncpa.cpl. Any private IPv4 addresses can be used. Here are the screenshots:


          • In Network Control Panel:



          ipv4-network-control-panel




          • In VirtualBox Manager Window:


          host-only-network-configuration




          • Allow 192.168.99.0/24 IPv4 range for both inbound and outbound connections in Windows Firewall. Also allow VBoxHeadless.exe in Windows Firewall for NTP connection in guest OS. Then run this command to create docker-host virtual OS in VitualBox with this command: docker-machine.exe create docker-host, it will install and configure VM guest OS.


          • Run docker-machine.exe env docker-host command to show configured environments. Copy those environments in WSL world or copy in .bash_profile file as following (variables will change):



          # These are example. Don't copy and paste.
          export DOCKER_HOST=192.168.99.104:2376
          export DOCKER_TLS_VERIFY=1
          export DOCKER_CERT_PATH=/mnt/c/users/username/.docker/machine/machines/docker-host
          export DOCKER_MACHINE_NAME=docker-host
          export COMPOSE_CONVERT_WINDOWS_PATHS=true




          In WSL Ubuntu try docker run hello-world. Use docker-machine.exe stop docker-host to stop the boot2docker VM. If Windows Firewall is blocking network connections then allow VirtualBox.exe, VirtualBoxVM.exe and VBoxHeadless.exe in Windows Firewall outbound rules. Also allow the host-only network IPv4 addresses with these following commands:





          New-NetFirewallRule -DisplayName "Host_Only_Network" -Name "Host_Only_Network_In" -Direction Inbound -RemoteAddress 192.168.99.0/24 -Action Allow
          New-NetFirewallRule -DisplayName "Host_Only_Network" -Name "Host_Only_Network_Out" -Direction Outbound -RemoteAddress 192.168.99.0/24 -Action Allow










          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 1 at 15:45

























          answered Dec 27 '18 at 16:34









          Biswapriyo

          2,68231140




          2,68231140












          • Let us continue this discussion in chat.
            – Biswapriyo
            Dec 28 '18 at 17:47


















          • Let us continue this discussion in chat.
            – Biswapriyo
            Dec 28 '18 at 17:47
















          Let us continue this discussion in chat.
          – Biswapriyo
          Dec 28 '18 at 17:47




          Let us continue this discussion in chat.
          – Biswapriyo
          Dec 28 '18 at 17:47


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386752%2fdocker-waiting-for-an-ip-when-starting-or-creating-new-machine%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

          Eduardo VII do Reino Unido