I just installed three VirtualBox virtual machines today specifically for connecting to MAMP on an OS X host. Thought Id shares my method of doing this, since it works well for me.
When accessing localhost through 10.0.2.2 I find using host only network a more flexible and reliable way to handle scripts. You get a different IP address, so debugging network problems in a virtual machine may also work.
First go to VirtualBox Preferences… Then select Host-only Networks . You must have a vboxnet0 adapter. If not, add it.

Once you are tuned in, select the vboxnet0 adapter and click on the small yellow screwdriver icon on the right side of this window to edit the settings. In the Adapter set the IPv4 address to 192.168.56.1 and the network mask to 255.255.255.0 . Leave the IPv6 field blank. The IPv6 netmask must be 0 .

The contents of the DHCP server must be empty, for example.

Good? Got this set. Now select your virtual machine. In my example, this image is IE8 - Win7 for testing web development. And click the Settings button. Then click the Network icon. Now select Adapter 2 . And select Host-only Adapter in the drop-down menu for Attached to: And then select vboxnet0 in the Name: section. The remaining parameters should be standard.

Now that you are starting your Windows virtual machine, launch Internet Explorer. And go to the address:
http:
With this you must be installed! But if you're used to using a Mac, make sure you have http:// in front of the address. I was embarrassingly stuck when I just went into direct 192.168.56.1 .
And as Jon Jaques in your answer, you can edit the hosts on Windows to point to the IP address 192.168.56.1 . This will simplify your life, and if you know how to set up virtual hosts in MAMP (not difficult), you can set up several different sites for testing through VirtualBox.
Oh, also, if you are used to using your computer name in OS X to connect to MAMP-like with the name LogicArtist.local , if this is the name of your computer - you're out of luck. VirtualBox, built into the software router, claims to be transmitting multicast data, but it is not. Check out this post which explains it in more detail.
There are several network adapters in the environment created by VirtualBox that claim to be multicast. However, they are lying. Moreover, due to the way VirtualBox assigns metrics, your outgoing socket will be transferred to the liar, who will happily gobble up your multicast messages and not send them.
Annoying, but you can get around such things by at least editing your hosts to have an entry for LogicArtist.local as follows:
192.168.56.1 LogicArtist.local
Definitely not as elegant as the true multicast address being transmitted, but at least the short amount of time you spend on Windows for debugging will be simpler by adding this entry.