Virtualbox Guest
From Gentoo Linux Wiki
Contents |
[edit] 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.
[edit] Configuring the Compile Options
If you are planning to use X, add the following lines to /etc/make.conf:
INPUT_DEVICES="keyboard virtualbox evdev" VIDEO_CARDS="virtualbox"
Use the settings above regardless of your host machine's actual hardware.
Follow the rest of the section as written in the handbook.
[edit] Configuring the Kernel
The important settings for a kernel that runs under VirtualBox are:
| Linux Kernel Configuration: VirtualBox-friendly kernel |
Processor type and features --->
[*] Tickless System (Dynamic Ticks)
[ ] High Resolution Timer Support
[ ] Symmetric multi-processing support
Subarchitecture Type (PC-compatible) --->
[ ] Machine Check Exception
Power management and ACPI options --->
[*] Power Management support
[ ] Suspend to RAM and standby
[ ] Hibernation (aka 'suspend to disk')
[*] ACPI (Advanced Configuration and Power Interface) Support --->
Device Drivers --->
< > ATA/ATAPI/MFM/RLL support
<*> Serial ATA and Parallel ATA drivers
[*] ATA SFF support
<*> Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support
[*] Network device support --->
[*] Ethernet (10 or 100Mbit) --->
[*] EISA, VLB, PCI and on board controllers
<M> AMD PCnet32 PCI support
[*] Ethernet (1000 Mbit) --->
<M> Intel(R) PRO/1000 Gigabit Ethernet support
[ ] Ethernet (10000 Mbit) --->
Graphics support --->
<*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
< > all options can be empty
Input device support -->
[*] Mice --->
<*> PS/2 mouse
|
For network device support, feel free to select only the driver that corresponds to the interface you configured for your VM. It is safe to remove the other driver if you don't plan to use it. It is also safe to remove all Ethernet drivers not mentioned in the above configuration.
You should be able to continue with the handbook installation from this point without any problems.
[edit] Guest Additions
The VirtualBox guest additions provide seamless mouse integration, higher screen resolutions and other advanced features. To install them, you first need to unmask them. Add the following lines to /etc/portage/package.keywords:
=app-emulation/virtualbox-guest-additions-2.0.4 =x11-drivers/xf86-input-virtualbox-2.0.4 =x11-drivers/xf86-video-virtualbox-2.0.4
You should of course replace 2.0.4 with the version of VirtualBox you have installed.
It's not necessary to load the x11-drivers directly. An "emerge -uND world" will do it also because of the INPUT_DEVICES and VIDEO_CARDS parameters in /etc/make.conf.
Emerge the guest additions:
Add them to the default runlevel:
That should take care of starting the needed services at your next reboot. To enable the guest additions for your current session, run:
[edit] X Configuration Settings
In the section for configuring your video card, use the vboxvideo driver, like so:
Section "Device"
Identifier "Card0"
Driver "vboxvideo"
EndSection
In the section for configuring your mouse, use the vboxmouse driver, like so:
Section "InputDevice"
Identifier "Mouse0"
Driver "vboxmouse"
Option "Protocol" "PS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection