Hi there! I'm Michael Smith

I'm a passionate, coffee loving, Senior Ruby Developer in Manchester at On The Beach.

I love all things devops and I'm currently experimenting with Kubernetes, Mesos and Nomad. I also like to create great, simple, user experiences with JavaScript, CSS3 & HTML5.

How to reach your host machine from VirtualBox

Say you are doing local development for your site (e.g. http://spokefire.dev) and you want to start IE testing using some virtual machines. Only you can’t because you have to set up the hosts file to point to your host machines IP address, which constantly changes due to DHCP servers changing your IP.

This gets really old, so a solution (if you are using a VM other than VirtualBox, YMMV) then add a rule for the following into your hosts file.

10.0.2.2 spokefire.dev

Then, from your virtual machine, simply go to http://spokefire.dev in your browser (IE I’m guessing) and it should tunnel back through to your host machine!

Hope that helps someone out, took me ages to track down.

Published on Thursday, 12 April 2012