It is possible to install VirtualBox guest additions through portage.
- Add the following lines to
/etc/portage/package.keywords:
>=dev-util/kbuild-0.1.4
=app-emulation/virtualbox-guest-additions-2.0.2
=x11-drivers/xf86-input-virtualbox-2.0.2
=x11-drivers/xf86-video-virtualbox-2.0.2 - Emerge the kernel sources.
$ sudo emerge gentoo-sources - Configure and build the kernel. The exact steps are outside the scope of this post but you could follow the configuration settings here. (Installing the kernel created by this step is optional. You only have to execute
make.) - Emerge the guest additions.
$ sudo emerge virtualbox-guest-additions xf86-input-virtualbox xf86-video-virtualbox - Add virtualbox-guest-additions to the default runlevel.
$ sudo rc-update add virtualbox-guest-additions default - Reboot (or run
/etc/init.d/virtualbox-guest-additions start) to get things working.