Virtualbox Guest

Installation
Installing Gentoo as a VirtualBox guest OS is not that much different from the standard installation. Proceed as recommended in the Installation Handbook, with the following modifications.

Configuring the Compile Options
If you are planning to use X, add the following lines to : or :

Use the settings above regardless of your host machine's actual hardware.

Follow the rest of the section as written in the handbook.

One important note is "symmetric multi-processing support" and "SMT (Hyperthreading) scheduler support)" are needed for VM's that have more than one core assigned

Configuring the Kernel
The important settings for a kernel that runs under VirtualBox are:

You will also need some of the more common options under "Device Drivers ---> SCI device Support" (if you wind up having to debug). For instance, check "sata_sil" under serial-ATA (device driver), as compiled into kernel.

Additionally, there appears to be a problem in some configurations. Apparently, the snd-intel8x0 module doesn't detect the VirtualBox emulated AC97 chip clock correctly, assumes 96 kHz, and the emulated chip has an unusually low clock of 48 kHz. If you experience sound reproduction one octave lower than you expected and at half normal speed, then, add the following line to :

Configuring your System
You should be able to continue with the handbook installation from this point without any problems.

Guest Additions
The VirtualBox Guest Additions provide seamless mouse integration, higher screen resolutions, and other advanced features.

Emerge the guest additions and drivers:

This will emerge the VirtualBox drivers.

Be sure to use the newest version of virtualbox-guest-additions (the following example is for an x86 architecture installation; be sure to change ~x86 to the actual architecture of your Gentoo installation, e.g. ~amd64):

As of VirtualBox 4.1.20, you will also need to add the following keyword change (again, change ~x86 to your architecture as necessary):

Now emerge the virtualbox-guest-additions package:

At this point the required packages are installed and need to be configured. Add guest additions to the default runlevel and enable them for the current session:

The Xorg configuration file is not necessary with >=xorg-server-1.8, udev, and evdev. You can safely remove it if you have one:

Add unprivileged users to vboxguest group. This will allow automatic resize and seamless mode:

For automatic resize, clipboard and seamless mode need start (for example in file .xsession):