VirtualBox

Virtualbox is software that allows the user to run a Guest Operating System inside of the Host Operating System, without having to reboot.

Terminology
Host Operating System - the computer you are actually working on. (ie. Gentoo Linux)

Guest Operating System - the operating system you want to install or have installed within the VirtualBox emulation environment. (ie. You want to use MS Windows from within your Gentoo Linux box.)

VirtualBox Guest Additions - drivers for the Guest Operating system. These drivers provide smoother operation with the Host operating system compared to the standard drivers installed by the Guest operating system.

Installation
There is a source build and binary (precompiled) versions for the app-emulation/virtualbox. Of which, the binary version contains closed source proprietary patches for added functionality.

The useflag 'qt4' is for graphical interface.

Windows Guests
Or

Linux Guests
Or

The packages x11-drivers/xf86-input-virtualbox x11-drivers/xf86-video-virtualbox are the guest additions for Linux Guests.

Running
Users will not be able to run and use Virtualbox if they are not a member of the "vboxusers" group.

Changes will not take effect until the user re-logins.

Also, you will need to ensure you have loaded the modules installed by the app-emulation/virtualbox-modules package.

Since the modules use a good sum of memory depending on the amount of your system memory, I prefer not to auto load them.

Usage
Try to leave all options at their defaults, as they're set to a default usually for one reason or another. Not doing so will likely cause performance problems!

Microsoft Windows Guest

 * Do not enable APIC for Microsoft Windows guests! VirtualBox also has a bad habit of enabling this option at it's own will.  The fix is to select the System Processor Driver (ie.  ACPI Uniprocessor PC) and manually upgrade (change) to the Advanced Configuration and Power Interface (ACPI) PC.  Shutdown (not reboot), restart VirtualBox and ensure APIC is off, then boot the guest.  As usual, always make a backup before playing with Windows.
 * If you elect to use SATA controller, it is recommended to use Intel's SATA 7.8 driver version (ie. iata78_enu.exe). Using other versions will cause performance problems along with blue screen errors!
 * Slow performance using SATA driver? Only use the SATA controller interface for the hard disk.  Remove any CDROMs from the SATA controller and place them onto a IDE Controller.
 * When installing the VirtualBox Guest Additions into your Windows operating system, do not select to enable Direct3D (experimental) option as this will cause resizing problems and other anomalies. Also, you need to install the Guest Additions from Safe Mode.
 * Use the NAT connection option for the Ethernet Network Card settings. Using other options such as Bridged will slow the Windows guest operating system.

After performing the above, you should see blazingly fast performance of the Windows operating system guest within VirtualBox on Linux.

Linux Guest
None!

Links
Virtualbox Homepage