* Using VirtualGL with VirtualBox

VirtualBox is an enterprise-class, open source virtualization solution
provided by Oracle.  With the release of VirtualBox 2.1.0,
experimental support was added for hardware-accelerated OpenGL in Windows
and Linux guests running on Windows, MacIntel, Linux, and Solaris/x86 hosts.
3D acceleration in VirtualBox is accomplished by installing a special driver in
the guest that uses a subset of Chromium to transmit OpenGL calls through a
local connection to the VirtualBox process running on the host.  When used in
conjunction with VirtualGL on a Linux or Solaris/x86 host, this solution
provides a means of displaying Windows 3D applications remotely.

To use VirtualGL with VirtualBox, perform the following procedures:

*** Configuring the System
#OPT: noList! plain!

	#. Launch VirtualBox and use the VirtualBox GUI to create and test your
		virtual machine.

	#. Follow the procedures outlined in the VirtualBox User's Manual to enable
		3D acceleration on the virtual machine.  Verify that 3D acceleration works
		__without__ VirtualGL before adding VirtualGL to the mix.

	#. Follow the procedure described in {ref prefix="Chapter ": setuid_linux} to
		make ''librrfaker.so'' and ''libdlfaker.so'' setuid executables (Linux) or
		to add the VirtualGL library directory to the list of secure paths
		(Solaris).

*** Launching VirtualBox
#OPT: noList! plain!

This should work on most Linux systems.  It is known to work with VirtualBox
4.1.8 and prior and VirtualBox 4.2 and later.

	#. ''vglrun VirtualBox -startvm ''__''{VM name or UUID}''__

 !!! With VirtualBox 4.1.10 and later 4.1.x versions, it is necessary to rename
 ''/usr/lib/virtualbox/VBoxTestOGL'' and symlink ''/bin/true'' to
 ''/usr/lib/virtualbox/VBoxTestOGL'' in order to use those versions of
 VirtualBox with VirtualGL.

*** NOTES
#OPT: noList! plain!

	* You might want to temporarily enable profiling (add an argument of ''+pr''
		to ''vglrun'' above) or set the ''VGL_LOGO'' environment variable to ''1''
		in order to verify that VirtualGL is loaded and working.

	* It is necessary to start the virtual machine directly as described above.
		Simply executing ''vglrun VirtualBox'' and using the GUI to launch the VM
		does not work.  VirtualBox forks a separate process for each VM, and the
		value of the ''LD_PRELOAD'' environment variable from ''vglrun'' does not
		get propagated to the VM process unless you start it directly.

	* VirtualBox sends mainly uncompressed image updates to the X display, so
		the 2D elements of the virtual machine display will not perform well
		over a remote X11 connection unless a
		[[#Direct_X11_Connection][direct X11 connection]] (''vglconnect -x'') is
		used with gigabit Ethernet (or faster.)  For 100 Megabit and slower
		networks, using a high-performance X proxy (such as TurboVNC)
		is recommended when remotely displaying VirtualBox using VirtualGL.
