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

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

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):