Virtualbox Guest

From Gentoo Linux Wiki

Jump to: navigation, search

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:

File: /etc/make.conf
INPUT_DEVICES="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
        <*> AHCI SATA Support
        [*] 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
    <M> Sound card support --->
        <M> Advanced Linux Sound Architecture --->
            [*] PCI sound Devices --->
                <M> Intel/SiS/nVidia/AMD/ALi AC97 Controller
    Input device support --->
        [*] Mice --->
           <*> PS/2 mouse

[edit] Configuring your System

Make sure you set CLOCK="local" in /etc/conf.d/clock, not UTC.

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. Currently version 3.0.12 is considered stable.

To install a more recent version, you need to unmask all necessary files. To do this add the following lines to /etc/portage/package.keywords:

File: /etc/portage/package.keywords
=app-emulation/virtualbox-guest-additions-3.1.6
=x11-drivers/xf86-input-virtualbox-3.1.6
=x11-drivers/xf86-video-virtualbox-3.1.6

You should of course replace 3.1.6 with the version of VirtualBox you have installed on the host.

Emerge the guest additions:

emerge virtualbox-guest-additions

Add them to the default runlevel:

rc-update add virtualbox-guest-additions default

That should take care of starting the needed services at your next reboot. To enable the guest additions for your current session, run:

/etc/init.d/virtualbox-guest-additions start

The init script for recent virtualbox release is broken. (3.1.4 and 3.1.6, possibly others). See http://bugs.gentoo.org/show_bug.cgi?id=305583 for a solution.

If you are using X, you should add the vboxvideo kernel module at boot time:

File: /etc/modules.autoload.d/kernel-2.6
vboxvideo

[edit] Starting HAL

If you have a fresh install don't forget to start HAL. This will allow X to autodetect devices.

/etc/init.d/hald start

To enable this service at startup, just run:

rc-update add hald default

[edit] References

Personal tools