I have a VM which I want to allow to access the internet only through Tor. I'm using VirtualBox on OS X 10.8.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
The Whonix Project provides a virtual machine image (.ova) which can be imported into VirtualBox. It is a Tor-Gateway, which can route the traffic of another virtual machine through Tor. You can either use the fully preconfigured Whonix-Workstation, which is based on Debian or create your own Custom-Workstation, which supports any operating system.
You didn't explicitly ask for it, but the times where you can "just route it over Tor and be happy with anonymity" are over. There are many other way to mess up, such as proxy bypass, protocol leaks and other things you should now. Therefore I recommend to read about Tor and anonymity, so you're not deluded about the level of protection you have.
I am a maintainer of Whonix.
This procedure was designed for Linux and I tested it and used it successfully on both Ubuntu and Debian... shoudn't be too difficult to download the packages for OS X and adapt it.