dash icon indicating copy to clipboard operation
dash copied to clipboard

dev machine ip is not constant

Open onnimonni opened this issue 9 years ago • 3 comments

I was having problems with creating new dev machine while tinkering with the setup.

Ansible configures /etc/exports nfsd with 192.168.99.100 believing it won't change. This is usually the port but if something goes wrong or you just want to recreate the dev box then Virtualbox will give you another address for example in my case it was 192.168.99.105. After this bootsync.sh will fail to mount causing $ docker-machine restart dev to fail.

onnimonni avatar Feb 16 '16 15:02 onnimonni

I had the same issue. Once the machine gets a new IP, the host cannot connect to the Docker daemon and the VM is pretty much useless. I removed all of my VMs and restarted VirtualBox from terminal to reset the DHCP server, then ran dev update. The new machine had the correct IP and everything worked as expected.

A co-worker of mine (@santi6291) tried to manually change the machine's IP in VB's settings screen, but AFAIK that didn't work.

Would love to see the configuration to be more dynamic to play nicely with a variable setup based on each hosts current network setup.

benjamin-smith avatar Feb 16 '16 16:02 benjamin-smith

I have run into this as well, and so far I haven't found a good way to make the configuration dynamic.

An easier way that I've found is to disable the DHCP server in the VirtualBox settings, restart the computer, and then re-enable the DHCP server. It still is not a great experience, but at least you don't have to remove all VMs.

silvamerica avatar Feb 16 '16 19:02 silvamerica

Well this has few pointers after debugging:

  • OS X only reads files in /etc/resolver/ once. So to make changes the symlink needs to be removed first and contents of resolver-dev.conf should be updated
  • We could update the files to correct ip addresses everytime dev machine is created or started

onnimonni avatar Feb 16 '16 21:02 onnimonni