Arch Linux VirtualBox Guest

From ArchWiki
Revision as of 18:55, 10 March 2011 by Mitch feaster (Talk | contribs) (virtualbox-ext-oracle: adding instructions to "insert the guest additions cd")

Jump to: navigation, search

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Arch Linux VirtualBox Guest#)

You have two choices: The GPL virtual box additions which are in the ArchLinux repositories, or the additions provided by Oracle.

Follow these instructions after doing a basic install following the Beginners' Guide.

The file locations and script names are slightly different between the GPL and PUEL versions of Virtualbox (See below). For both versions, the install of VBoxLinuxAdditions will build and install the kernel modules, install the Xorg drivers and create init scripts. It will most probably print out errors about init scripts and run levels, which can (in most cases) be ignored. Among the files created, Template:Filename will load the Guest Additions on demand.

virtualbox - GPL Version

Install the required package and kernel headers:

# pacman -S virtualbox-additions kernel26-headers xorg gcc make

Now, mount the installed ISO containing the additions:

# modprobe loop
# mount /usr/lib/virtualbox/additions/VBoxGuestAdditions.iso /mnt -o loop

Run the installer:

# sh /mnt/

Add it to the Template:Codeline array to load on boot:

DAEMONS=(... rc.vboxadd)


Install the kernel headers, xorg (if it's not already installed), and the build tools :

# pacman -S kernel26-headers xorg gcc make

Make the guest additions "CD" available to the guest OS by clicking Devices->Install Guest Additions.

Now, mount the installed ISO containing the additions from the host, this connects a disk to /dev/cdrom:

# mkdir /mnt/cdrom
# mount /dev/cdrom /mnt/cdrom

Run the installer script which tests the proper architecture and installs the additions:

# /mnt/cdrom/
Note: rc.vboxadd is automatically run from /etc/rc.local

Enabling OpenGL acceleration in Arch Linux guests

  • Make sure the user starting X in the guest is in the video group.
  • Make sure you have checked '3D acceleration' under the VirtualBox settings on the host.
  • Make sure you have installed drivers for your graphics card. Nvidia, ATI or Intel (xf86-video-fbdev)
Note: Don't compare before-after performance using glxgears! You may get a lot less FPS due to now-working vsync support. Compare performance using a real, heavy 3D application (like a game).

Note: If you upgrade the kernel in the Virtual Machine you will need to re-install the Guest Additions in order for some features to work properly.

If you need to rebuild the Virtual Box Additions in a guest installation of Arch Linux, use this command:

# /etc/rc.d/rc.vboxadd setup

Copy and paste is not working in Arch guests!

You forgot to start VBoxclient-all. See above.