Skip to content
This repository was archived by the owner on Sep 26, 2021. It is now read-only.

Toolbox hangs during setting of environment variables (Windows 8.1) #116

Closed
jischebeck opened this issue Aug 21, 2015 · 7 comments
Closed

Comments

@jischebeck
Copy link

When running the "Docker Quikstart Terminal", the startup stops after setting environment variables.
The virtualbox is up and running.

Welcome to Git (version 1.9.5-preview20150319)
Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
Machine default already exists in VirtualBox.
Starting machine default...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
Setting environment variables for machine default...
@gvlx
Copy link

gvlx commented Aug 31, 2015

It seems docker-machine.exe running in windows always wants the --shell option set.

As the start.sh script is a bash script (bash is installed as part of the MSYS git package) this cases problems.

Changing line 35 from
eval "$($DOCKER_MACHINE env $VM)"
to
eval "$($DOCKER_MACHINE env $VM --shell $SHELL)"
solves the problem (will it still work on other systems?)

Maybe docker-machine should check the SHELL environment variable before throwing the towel?

@tiangolo
Copy link
Contributor

tiangolo commented Sep 9, 2015

I copy my comment from here: #66 (comment) in this post, as I think it's probably the same issue.


I think @ameyrk nailed it down for Windows in this comment #66 (comment).

I confirm the same issue happens in Windows 7:

After a sleep / wake cycle, Windows detects the Host-Only network as a "duplicate" and changes its IP. After that, docker-machine (or the Quickstart terminal) doesn't work anymore.

It is probably caused by this VirtualBox bug (from 4 years ago): https://www.virtualbox.org/ticket/9151, so there doesn't seem to be a fix soon from VirtualBox. And it's probably a Windows bug.


The quick workaround that worked for me was:

  • Open VirtualBox
  • Go to File -> Preferences -> Network -> Host-only Networks
  • Docker Toolbox probably created a second Host-only network, probably named "VirtualBox Host-Only Ethernet Adapter # 2", double click that
  • Change the "IPv4 Address" from something like 192.168.99.1 to something like 192.168.99.2 (you will probably have to increase / decrease the IP every time). But it's important that the IP actually changes.
  • Hit OK. If the IP changed (it should have changed), you will be prompted for you "Windows Administrator OK" (or however it's named).

After that, the docker-machine and the Quickstart Terminal should work, and that way, you don't have to restart your whole Windows.

@0xhmn
Copy link

0xhmn commented Sep 11, 2015

solved my problem on Windows 10

@itibook
Copy link

itibook commented Sep 18, 2015

just to confirm that @tiangolo's solution worked for me...

@mchiang0610
Copy link
Contributor

Seems to be fixed.

@sebastien-helbert
Copy link

@tiangolo +1

@yanqiw
Copy link

yanqiw commented Dec 6, 2015

@tiangolo +1
For Win 7, I need to delete all the adapters, and start the VM again. The issue is fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants