Arch Linux VirtualBox Guest

From ArchWiki
Revision as of 14:18, 3 June 2011 by Sykopomp (talk | contribs) (more clarification)
Jump to: navigation, search

Installing Arch under VirtualBox is straightforward. Once the install is done, if you want the guest additions under X, 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. Installation of the open source additions is straightforward and can be managed by the Arch repositories.

virtualbox - GPL Version

Install the required package:

# pacman -Sy virtualbox-guest-additions

Load the necessary modules:

# modprobe vboxguest
# modprobe vboxsf
# modprobe vboxvideo

Add the three modules above to the MODULES array in /etc/rc.conf to have them autoloaded on reboot, too.

# nano /etc/rc.conf


# vi /etc/rc.conf

Finally, in order for certain guest additions to work, you'll need to start VBoxClient-all once X starts:

# nano ~/.xinitrc

and add VBoxClient-all.

You should now be all set, and all guest additions should work properly. This includes OpenGL accelerationThis was confirmed to work with vbox 4.0.8. Note that the Arch packages do not currently provide an rc.vboxadd daemon, unlike the additions installed through the iso.


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

# pacman -S kernel26-headers xorg-server base-devel

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

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 Oracle (PUEL) Virtual Box Additions in a guest installation of Arch Linux, use this command:

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


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 on the host. Nvidia, ATI or Intel (xf86-video-fbdev)

If you receive (EE) AIGLX error: vboxvideo does not export required DRI extension:

# ln -s /usr/lib/xorg/modules/dri /usr/lib/dri
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).

Copy and paste is not working in Arch guests!

You forgot to start VBoxclient-all. See above.

Failed to load module vboxvideo when starting X

When running the installer, you may get the following error:

:: Installing X.Org Server 1.9 modules
ln: failed to create symbolic link `/usr/lib/xorg/modules/drivers/': No such file or directory

This, in turn, may cause X to fail to start because it can't find the vboxvideo driver. To work around this, create the "drivers" directory in /usr/lib/xorg/modules as root:

# mkdir /usr/lib/xorg/modules/drivers

Now run the installer again and the symbolic link error should be gone.