Most of us (developers) already use virtualization in some form for testing, but in order to take advantage of this particular environment – MAMP with virtual hosts – we need to update the hosts file on the virtual machine so that it resolves the domains to the Mac's IP.
One catch: if you’re on a latop, chances are the Mac’s IP will change often. That’s why we need to get the secret IP the VM uses to talk to the Mac. Here’s how we find it:
ifconfig vmnet1 into a Terminal window. You should get a return like this:
vmnet1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500