Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using MAMP to host my local sites, and VirtualHostX so that I can access sites during local development via a convenient URL like

I'm also running Windows XP via VirtualBox, and it would be great to be able to load up any of my local sites within windows while offline as currently often working without access, on the move, unfortunately.

I know that I can append my IP and a nice domain name to the host file in C:/WINDOWS/system32/drivers/etc ... and i can find my IP simply through terminal with "ifconfig" while I'm online.

The problem is that when I'm not online, there's no IP. Even if there is an IP (when i have a connection), I still have grab it and update the windows hosts' file all the time, since I'm developing from a laptop and have a new IP at the drop of a dime.

I found a tutorial where the author is able to get a permanent IP. He uses VMware Fusion as his VMachine, which is the only difference between his setup and mine. By running the terminal command "ifconfig vmnet1" he gets:

a secret IP the virtual machine uses to talk to OSX

And that doesn't change - which is awesome. I'm assuming it exists even if he's offline.

It would be pretty fabulous if I could replicate this with VirtualBox.

Anyone have ideas?

share|improve this question

You can do a similar thing if you're running VirtualBox

Run ifconfig and get a list of available interfaces (with VBox active) My list had an interface named 'vboxnet0' and an ipv6 address

Throw the address into your hosts file in the Win VM and you should be right to go

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .