shedd / duckpan-vagrant

Vagrant + Chef virtual development environment for DuckDuckGo (http://duckduckhack.com)
Apache License 2.0
5 stars 5 forks source link

Changing MAC address breaks networking #22

Closed mikedep333 closed 9 years ago

mikedep333 commented 9 years ago

There are 3 ways in which the MAC address can be changed.

  1. The user clones the VM.
  2. The user exports the VM as a .OVF/.OVA, imports it, and chooses to change the MAC address while importing.
  3. The user goes into the VM's settings and clicks the button to generate a new MAC address. (Users often click this by accident.)

When this happens, Ubuntu 12.04's udev detects the NIC as a new NIC, and assigns it the name eth1 instead of eth0. There is no config defined for eth0, so it is not used. In turn, vagrant ssh cannot even work. To fix it, the user would have to use recovery mode or a live CD.

Anyway, I already have a fix ready. I will submit a pull request shortly. It is based on this advice: http://askubuntu.com/questions/240632/how-to-disable-udev-net-rule-generation