Changes

Jump to: navigation, search

Understanding and Installing VirtualBox Guest Additions

6,947 bytes added, 19:21, 16 March 2009
Installing VirtualBox Guest Addition on Linux
* '''VBoxWindowsAdditions-amd64.exe''' - The 64-bit VirtualBox Guest Additions executable for Windows guest systems. The is executed automatically by the main VBoxWindowsAdditions.exe installed on 64-bit guests.
Whilst the ISO image file may be manually added to the VirtualBox virtual media library and mounted on a virtual machine as a virtual CD/DVD device, a quicker mechanism is provided via the ''Devices...'' menu of the virtual machine window.
== Installing VirtualBox Guest Additions on Windows ==
 
As previously discussed, the VirtualBox Guest Additions reside in an ISO image file which is bundled with the VirtualBox software. This image file must be mounted as a virtual CD-ROM on the virtual machine on which the additions are to be installed. VirtualBox provides a shortcut to performing this task in the form of the ''Devices->Install Guest Additions....'' menu option. When selected, this option mounts the ''VBoxGuestAdditions.iso'' as a virtual CD-ROM and, assuming that AutoPlay is enabled on the guest Windows operating system, the VirtualBox Guest Additions installer will automatically start. If AutoPlay is not enabled, navigate to the CD-ROM using Windows Explorer and double click on ''VBoxWindowsAdditions.exe'' to initiate the installation process. Once invoked, the ''Sun xVM VirtualBox Guest Additions Setup Welcome'' screen will appear. Click ''Next >'' to proceed to the license screen, review the license and click ''I Agree'' to display the installation screen as illustrated below:
 
 
[[Image:virtualbox_guest_additions_install.jpg|Installing VirtualBox Guest Additions on a Windows guest]]
 
 
Either accept the default installation folder or browse to the desired location before clicking the ''Install'' button to initiate the installation process. The progress of the installation is communicate via a progress bar and a scrolling report of the various tasks as they are performed:
 
 
[[Image:virtualbox_guest_additions_installation_progress.jpg|The progress of a VirtualBox Guest Additions windows installation]]
 
 
Once the installation is complete, the guest operating system must be rebooted for the guest additions to take effect. The reboot may be initiated from the Setup screen, or performed manually at a later, more convenient time.
 
== Manually Extracting the VirtualBox Windows Drivers ==
 
The VirtualBox Guest Additions installer automatically extracts and installs the VirtualBox device drivers. In some situations, it is possible that just the drivers, and none of the other guest addition features may be required. In this situation, perform the following steps to extract the device drivers:
 
1. Mount the VirtualBox Guest Additions CD-ROM following steps outlined previously
 
2. Open a command prompt window and change directory to the location of the guest additions virtual CD-ROM
 
3. Execute one of the following commands depending on the guest operating system architecture:
 
::* VBoxWindowsAdditions-x86.exe /extract /D=C:\VBoxDrivers
 
::* VBoxWindowsAdditions-amd64.exe /extract /D=C:\VBoxDrivers
 
Note that the above commands extract the driver files into C:\VBoxDrivers\x86 and C:\VBoxDrivers\amd64 respectively. Alternate locations may be specified by modifying the ''/D='' directive accordingly.
 
== Installing VirtualBox Guest Addition on Linux ==
 
The VirtualBox Guest Additions for Linux guests require that the packages necessary to facilitate the building of Kernel modules be installed prior to installing the guest additions. This include the GNU C Compiler and kernel development sources. These are typically installed by default on Ubuntu distributions. On Red Hat, CentOS and Fedora systems however, this can be achieved by executing the following command as super user:
 
<pre>
su
yum install gcc kernel-devel
</pre>
 
It is also recommended that the Dynamic Kernel Module Support (DKMS) be installed on guest operating systems where it is supported. This can be achieved on Fedora as follows:
 
<pre>
yum install dkms
</pre>
 
and on Ubuntu by running the following command:
 
<pre>
sudo apt-get install dkms
</pre>
As with installation on Windows guests, the VirtualBox Guest Additions CD-ROM may be mounted by selecting the ''Devices->Install Guest Additions....'' menu option from the virtual machine window toolbar. The majority of modern Linux desktop environments will provide the option to automatically run the installer contained on the CD-ROM:
 
 
[[Image:virtualbox_guest_additions_linux_autorun.jpg|Auto running The VirtualBox Guest Additions Linux Installer]]
 
 
Alternatively, the installation script for the appropriate guest virtual machine architecture may be run manually by changing directory to the CD-ROM mount point and executing one of the following commands, either as super user or by prefixing the command with the ''sudo'':
 
* For 32-bit Linux guests
 
<pre>
sh VBoxLinuxAdditions-x86.run
</pre>
 
* For 64-bit Linux guests
 
<pre>
sh VBoxLinuxAdditions-amd64.run
</pre>
 
 
After the installation is complete, the system will need to be rebooted before the guest additions will become operational.
 
== Selected Installation of Linux Guest Additions ==
 
The default behavior of the Linux VirtualBox guest additions is to install all the components. Select components may be installed by running the installation script (either VBoxLinuxAdditions-amd64.run or sh VBoxLinuxAdditions-x86.run) with one or more of a number of command line options, for example:
 
sh VBoxLinuxAdditions-x86.run ''<option>''
 
where ''<options>'' represents one or more of the following:
 
* '''all''' - Installs all guest addition components (the default)
 
* '''x11''' - Install the guest drivers for for the X11 windowing system
 
* '''kernel-module''' - Installs the kernel module core components
 
* '''vfs-module''' - Installs the components to facilitate shared folders
 
* '''timesync''' - Installs the component responsible for synchronizing host and guest system times.
 
* '''Control''' - Installs the ''VBoxControl'' commandline management tool.
 
* '''help''' - Displays summary information of the above and other command line options.
 
== Recompiling the Linux Guest Addition Kernel Modules ==
 
To rebuild the VirtualBox Guest Additions Linux kernel modules, mount the guest additions CD-ROM ISO image if it is not already mounted, change directory to the mount point and run one of the following commands:
 
* For 32-bit Linux guests:
 
<pre>
sh VBoxLinuxAdditions-x86.run setup
</pre>
 
* For 64-bit Linux guests:
 
<pre>
sh VBoxLinuxAdditions-amd64.run setup
</pre>
 
== Updating the Linux VirtualBox Guest Additions ==
 
The VirtualBox Guest Additions installed on a guest operating system may be updated by mounting the latest VBoxGuestAdditions.iso image file and repeating the above installation process.
 
== Installing Solaris Guest Additions ==
 
The VirtualBox Guest Additions may be installed on a Solaris guest by mounting the ISO image as outlined previously, changing directory to the mount point and running the following command as super user:
 
<pre>
pkgadd -d ./VBoxSolarisAdditions.pkg
</pre>
 
When prompted for the package to install, enter ''1''.
 
To subsequently remove the guest additions from a Solaris host, run the following command as super user:
 
<pre>
pkgrm SUNWvboxguest
</pre>
 
To update guest additions on a Solaris guest, remove the current installation using the above command and then repeat the installation process using the latest ISO image file.
1,798
edits

Navigation menu