Getting vagrant box networking working again after wifi change

Tags: apple, python, django

I’m using vagrant for my osx python/django work. There’s one big problem I had: networking would stop working when I switched between work and home. Probably because of a different wifi.

Pretty irritating, as I’d have to do a full vagrant halt and vagrant up dance.

In the end, the solution was pretty obvious and simple. I didn’t think of it myself though :-) The solution was on stackoverflow. Inside the VM, execute:

sudo /etc/init.d/networking restart

Hurray!

(I’ve of course added it as a shell script to my personal tool/scripts/whatever collection.)

 
vanrees.org logo

Reinout van Rees

My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):