Sun VirtualBox is a collection of powerful virtual machine tools, targeting desktop
computers, enterprise servers and embedded systems. With VirtualBox, you can virtualize 32-bit and 64-bit operating systems on machines with Intel and AMD processors,
either by using hardware virtualization features provided by these processors or even
entirely in software, at your option.
You can find a brief feature overview in chapter 1.3, Features overview, page 13; see
chapter 12, Change log, page 155 for a detailed list of version changes.
1.1 Virtualization basics
With VirtualBox, you can run unmodified operating systems – including all of the
software that is installed on them – directly on top of your existing operating system,
in a special environment called a “virtual machine”. Your physical computer is then
usually called the “host”, while the virtual machine is often called a “guest”.
The following image shows you how VirtualBox, on a Linux host, is running Win-
dows Vista as guest operating system in a virtual machine window:
VirtualBox allows the guest code to run unmodified, directly on the host computer,
and the guest operating system “thinks” it’s running on a real machine. In the back-
9
1 Introduction
ground, however, VirtualBox intercepts certain operations that the guest performs to
make sure that the guest does not interfere with other programs on the host.
The techniques and features that VirtualBox provides are useful for several scenar-
ios:
• Operating system support. With VirtualBox, one can run software written for
one operating system on another (for example, Windows software on Linux)
without having to reboot to use it. You can even install an old operating system
such as DOS or OS/2 in a virtual machine if your real computer’s hardware is
too advanced to be supported.
• Infrastructure consolidation. Virtualization can significantly reduce hardware
and electricity costs. The full performance provided by today’s powerful hardware is only rarely really needed, and typical servers have an average load of
only a fraction of their theoretical power. So, instead of running many such
physical computers that are only partially used, one can pack many virtual machines onto a few powerful hosts and balance the loads between them. With
VirtualBox, you can even run virtual machines as mere servers for the VirtualBox
Remote Desktop Protocol (VRDP), with full client USB support. This allows for
consolidating the desktop machines in an enterprise on just a few RDP servers,
while the actual clients only have to be capable of displaying VRDP data.
• Testing and disaster recovery. Once installed, a virtual box and its virtual hard
disk can be considered a “container” that can be arbitrarily frozen, woken up,
copied, backed up, and transported between hosts. On top of that, with the use
of another VirtualBox feature called “snapshots”, one can save a particular state
of a virtual machine and revert back to that state, if necessary. This way, one
can freely experiment with a computing environment. If something goes wrong
(e.g. after installing misbehaving software or infecting the guest with a virus),
one can easily switch back to a previous snapshot and avoid the need of frequent
backups and restores.
When dealing with virtualization (and also for understanding the following chapters
of this documentation), it helps to acquaint oneself with a bit of crucial terminology,
especially the following terms:
Host operating system (host OS): the operating system of the physical computer
where VirtualBox is running. There are versions of VirtualBox for several host
operating systems (see chapter 1.4, Supported host operating systems, page 16 for
further information). While the various VirtualBox versions are usually discussed
together in this document, there may be platform-specific differences which we
will point out where appropriate.
Guest operating system (guest OS): the operating system that is running inside
the virtual machine. Theoretically, VirtualBox can run any x86 operating system (DOS, Windows, OS/2, FreeBSD, OpenBSD), but to achieve near-native
10
1 Introduction
performance of the guest code on your machine, we had to go through a lot
of optimizations that are specific to certain operating systems. So while your
favorite operating system may run as a guest, we officially support and optimize
for a select few (which, however, include the most common ones).
See chapter 1.5, Supported guest operating systems, page 17 for further information.
Virtual machine (VM). When running, a VM is the special environment that
VirtualBox creates for your guest operating system. So, in other words, you
run your guest operating system “in” a VM. Normally, a VM will be shown as
a window on your computer’s desktop, but depending on which of the various frontends of VirtualBox you use, it can be displayed in full-screen mode or
remotely by use of the Remote Desktop Protocol (RDP).
Sometimes we also use the term “virtual machine” in a more abstract way. Internally, VirtualBox thinks of a VM as a set of parameters that determine its
operation. These settings are mirrored in the VirtualBox graphical user interface
as well as the VBoxManage command line program; see chapter 8, VBoxManage
reference, page 100. They include hardware settings (how much memory the
VM should have, what hard disks VirtualBox should virtualize through which
container files, what CD-ROMs are mounted etc.) as well as state information
(whether the VM is currently running, saved, its snapshots etc.).
In other words, a VM is also what you can see in its settings dialog.
Guest Additions. With “Guest Additions”, we refer to special software packages that
are shipped with VirtualBox. Even though they are part of VirtualBox, they are
designed to be installed inside a VM to improve performance of the guest OS and
to add extra features. This is described in detail in chapter 4, Guest Additions,
page 60.
1.2 Software vs. hardware virtualization (VT-x and
AMD-V)
In a nutshell, virtualization means that the software in the virtual machine is allowed
to run directly on the processor of the host, while VirtualBox employs an array of
complex techniques to intercept operations that would interfere with your host.
Whenever the guest attempts to do something that could be harmful to your computer and its data, VirtualBox steps in and takes action. In particular, for lots of hardware that the guest believes to be accessing, VirtualBox simulates a certain “virtual”
environment according to how you have configured a virtual machine. For example, if
the guest attempts to access a hard disk, VirtualBox redirects these requests to whatever you have configured to be the virtual machine’s virtual hard disk – normally, an
image file on your host.
11
1 Introduction
There are two ways in which VirtualBox can achieve virtualization: either entirely
in software or, with newer processors, using certain hardware features.
• For some years, Intel and AMD processors have had support for so-called “hard-
ware virtualization”. This means that these processors aid virtualization soft-
ware such as VirtualBox in intercepting potentially dangerous operations that a
guest operating system may be attempting and in presenting virtual hardware to
a virtual machine.
These hardware features differ between Intel and AMD processors. Intel named
its technology VT-x; AMD calls theirs AMD-V.
Note: On most systems, the hardware virtualization features first need to be
enabled in the BIOS before VirtualBox can use them.
• As opposed to other virtualization software, for many usage scenarios,
VirtualBox does not require hardware virtualization features to be present.
Through sophisticated techniques, VirtualBox virtualizes many guest operating
systems entirely in software. This means that you can run virtual machines even
on older processors which do not support hardware virtualization.
You can select for each virtual machine individually whether VirtualBox should use
software or hardware virtualization. Prior to version 2.2, software virtualization was
the default; starting with version 2.2, VirtualBox will enable hardware virtualization
by default for new virtual machines that you create. (Existing virtual machines are
not automatically changed for compatibility reasons, and the default can of course be
changed for each virtual machine.)
Even though VirtualBox does not always require hardware virtualization, enabling
it is required in the following three scenarios:
• Certain rare guest operating systems like OS/2 make use of very esoteric processor instructions that are not supported with our software virtualization. For
virtual machines that are configured to contain such an operating system, hardware virtualization is enabled automatically.
• VirtualBox’s 64-bit guest support (added with version 2.0) and multiprocessing
(SMP, added with version 3.0) both require hardware virtualization to be enabled. (This is not much of a limitation since the vast majority of today’s 64-bit
and multicore CPUs ship with hardware virtualization anyway; the exceptions to
this rule are e.g. older Intel Celeron and AMD Opteron CPUs.)
The reason for changing the default with version 2.2 is that the hardware has significantly improved with the latest Intel and AMD processors, and VirtualBox has also
fine-tuned its hardware virtualization support to a degree that it is now faster than
software virtualization in many situations.
12
1 Introduction
Warning: Do not run other hypervisors (open-source or commercial virtualization products) together with VirtualBox! While several hypervisors can
normally be installed in parallel, do not attempt to run several virtual machines from competing hypervisors at the same time. VirtualBox cannot track
what another hypervisor is currently attempting to do on the same host, and
especially if several products attempt to use hardware virtualization features
such as VT-x, this can crash the entire host.
In addition to “plain” hardware virtualization, your processor may also support additional sophisticated techniques:
1
• A newer feature called “nested paging” implements some memory management
in hardware, which can greatly accelerate hardware virtualization since these
tasks no longer need to be performed by the virtualization software.
On AMD processors, nested paging has been available starting with the
Barcelona (K10) architecture; Intel added support for nested paging, which
they call “extended page tables” (EPT), with their Core i7 (Nehalem) processors.
Nested paging is still disabled by default even for new machines, but it can be
enabled for each virtual machine individually in the machine settings.
If your system supports nested paging (AMD-V) or EPT (VT-x), then you can
expect a significant performance increase by enabling hardware virtualization
and the nested paging feature
• Another hardware feature called “Virtual Processor Identifiers” (VPIDs) can
greatly accelerate context switching by reducing the need for expensive flushing
of the processor’s Translation Lookaside Buffers (TLBs). To enable this feature
for a VM, you need to use the command line; see chapter 8.5, VBoxManage
modifyvm, page 107.
1.3 Features overview
Here’s a brief outline of VirtualBox’s main features:
• Portability. VirtualBox runs on a large number of 32-bit and 64-bit host op-
erating systems (Windows, Linux, Mac OS X and Solaris; see chapter 1.4, Sup-
ported host operating systems, page 16 for details). Virtual machines can easily be
imported and exported using the industry-standard Open Virtualization Format
(OVF, see chapter 3.8, Importing and exporting virtual machines, page 56). Since
the file and image formats used are identical on all the platforms, this works
between all supported host operating systems.
1
VirtualBox 2.0 added support for AMD’s nested paging; support for Intel’s EPT and VPIDs was added with
version 2.1.
13
1 Introduction
• Clean architecture; unprecedented modularity. VirtualBox has an extremely
modular design with well-defined internal programming interfaces and a clean
separation of client and server code. This makes it easy to control it from several
interfaces at once: for example, you can start a VM simply by clicking on a
button in the VirtualBox graphical user interface and then control that machine
from the command line, or even remotely. See chapter 7, Alternative front-ends;
remote virtual machines, page 90 for details.
Due to its modular architecture, VirtualBox can also expose its full functionality
and configurability through a comprehensive software development kit (SDK),
which allows for integrating every aspect of VirtualBox with other software systems. Please see chapter 10, VirtualBox programming interfaces, page 143 for
details.
• No hardware virtualization required. As explained in the previous chapter, in
most cases, VirtualBox does not require the processor features built into newer
hardware like Intel VT-x or AMD-V. As opposed to many other virtualization
solutions, you can therefore use VirtualBox even on older hardware where these
features are not present.
• Guest Additions: shared folders, seamless windows, 3D virtualization. The
VirtualBox Guest Additions are software packages which can be installed inside
of supported guest systems to improve their performance and to provide additional integration and communication with the host system. After installing the
Guest Additions, a virtual machine will support automatic adjustment of video
resolutions, seamless windows, accelerated 3D graphics and more. The Guest
Additions are described in detail in chapter 4, Guest Additions, page 60.
In particular, Guest Additions provide for “shared folders”, which let you access
files from the host system from within a guest machine. Shared folders are
described in chapter 4.6, Folder sharing, page 68.
• Great hardware support. Among others, VirtualBox supports:
– Guest multiprocessing (SMP). Starting with version 3.0, VirtualBox can
present up to 32 virtual CPUs to a virtual machine.
– Hardware compatibility. VirtualBox virtualizes a vast array of virtual de-
vices, among them many devices that are typically provided by other virtualization platforms – including an Input/Output Advanced Programmable
Interrupt Controller (I/O APIC) which is found in many modern PC systems. This eases cloning of PC images from real machines or 3rd party
virtual machines into VirtualBox.
– USB device support. VirtualBox implements a virtual USB controller and
allows you to connect arbitrary USB devices to your virtual machines without having to install device-specific drivers on the host. USB support is not
limited to certain device categories. For details, see chapter 3.7.9.1, USB
settings, page 54.
14
1 Introduction
– Full ACPI support.The Advanced Configuration and Power Interface
(ACPI) is fully supported by VirtualBox. This eases cloning of PC images
from real machines or third-party virtual machines into VirtualBox. With its
unique ACPI power status support, VirtualBox can even report to ACPIaware guest operating systems the power status of the host. For mobile
systems running on battery, the guest can thus enable energy saving and
notify the user of the remaining power (e.g. in fullscreen modes).
– Multiscreen resolutions. VirtualBox virtual machines support screen res-
olutions many times that of a physical screen, allowing them to be spread
over a large number of screens attached to the host system.
– Built-in iSCSI support. This unique feature allows you to connect a vir-
tual machine directly to an iSCSI storage server without going through the
host system. The VM accesses the iSCSI target directly without the extra
overhead that is required for virtualizing hard disks in container files. For
details, see chapter 5.5, iSCSI servers, page 80.
– PXE Network boot. The integrated virtual network cards of VirtualBox
fully support remote booting via the Preboot Execution Environment (PXE).
• Multigeneration snapshots. VirtualBox can save successive snapshots of the
state of the virtual machine. You can revert the virtual machine to the state of
any of the snapshots. For details, see chapter 3.4.4, Snapshots, page 42.
• VRDP remote access. You can run any virtual machine in a special VirtualBox
program that acts as a server for the VirtualBox Remote Desktop Protocol
(VRDP). With this unique feature, VirtualBox provides high-performance remote
access to any virtual machine. A custom RDP server has been built directly into
the virtualization layer and offers unprecedented performance and feature richness.
VRDP support is described in detail in chapter 7.4, Remote virtual machines
(VRDP support), page 93.
On top of this special capacity, VirtualBox offers you more unique features:
on Windows and PAM on Linux for RDP authentication. In addition, it
includes an easy-to-use SDK which allows you to create arbitrary interfaces
for other methods of authentication; see chapter 9.3, Custom external VRDP
authentication, page 129 for details.
– USB over RDP. Via RDP virtual channel support, VirtualBox also allows
you to connect arbitrary USB devices locally to a virtual machine which is
running remotely on a VirtualBox RDP server; see chapter 7.4.3, Remote
USB, page 97 for details.
15
1 Introduction
1.4 Supported host operating systems
Currently, VirtualBox is available for the following host operating systems:
• Windows hosts:
– Windows XP, all service packs (32-bit)
– Windows Server 2003 (32-bit)
– Windows Vista (32-bit and 64-bit2).
– Windows Server 2008 (32-bit and 64-bit)
– Windows 7 beta (32-bit and 64-bit)
• Apple Mac OS X hosts: Intel hardware is required, all versions of Mac OS X
supported; please see chapter 13, Known limitations, page 213 also.
3
• Linux hosts (32-bit and 64-bit4). Among others, this includes:
– Debian GNU/Linux 3.1 (“sarge”), 4.0 (“etch”) and 5.0 (“lenny”)
– Fedora Core 4 to 11
– Gentoo Linux
– Redhat Enterprise Linux 4 and 5
– SUSE Linux 9 and 10, openSUSE 10.3, 11.0 and 11.1
It should be possible to use VirtualBox on most systems based on Linux kernel
2.6 using either the VirtualBox installer or by doing a manual installation; see
chapter 2.3, Installing on Linux hosts, page 21.
Note that starting with VirtualBox 2.1, Linux 2.4-based host operating systems
are no longer supported.
• Solaris hosts (32-bit and 64-bit5) are supported with the restrictions listed in
chapter 13, Known limitations, page 213:
– OpenSolaris (2008.05 and higher, “Nevada” build 86 and higher)
– Solaris 10 (u4 and higher)
2
Support for 64-bit Windows was added with VirtualBox 1.5.
3
Preliminary Mac support (beta stage) was added with VirtualBox 1.4, full support with 1.6.
4
Support for 64-bit Linux was added with VirtualBox 1.4.
5
Support for OpenSolaris was added with VirtualBox 1.6.
16
1 Introduction
1.5 Supported guest operating systems
Since VirtualBox is designed to provide a generic virtualization environment for x86
systems, it may run operating systems of any kind, even those that are not officially
supported by Sun Microsystems. However, our focus is to optimize the product’s performance for a select list of guest systems:
Windows NT 4.0 All versions/editions and service packs are fully supported; how-
ever, there are some issues with older service packs. We recommend to install
service pack 6a. Guest Additions are available with a limited feature set.
Windows 2000 / XP / Server 2003 / Vista / Server 2008 / Windows 7 beta All ver-
sions/editions and service packs are fully supported (including 64-bit versions,
under the preconditions listed below). Guest Additions are available.
DOS / Windows 3.x / 95 / 98 / ME Limited testing has been performed. Use beyond
legacy installation mechanisms not recommended. No Guest Additions available.
Linux 2.4 Limited support.
Linux 2.6 All versions/editions are fully supported (32 bits and 64 bits). Guest Addi-
tions are available.
We strongly recommend using a Linux kernel version 2.6.13 or higher for better
performance.
Note: Certain Linux kernel releases have bugs that prevent them from executing in a virtual environment; please see chapter 11.3.3, Buggy Linux 2.6
kernel versions, page 148 for details.
Solaris 10, OpenSolaris Fully supported (32 bits and 64 bits). Guest Additions are
available.
FreeBSD Limited support. Guest Additions are not available yet.
OpenBSD Versions 3.7 and later are supported. Guest Additions are not available
yet.
OS/2 Warp 4.5 Requires hardware virtualization to be enabled. We officially support
MCP2 only; other OS/2 versions may or may not work. Guest Additions are
available with a limited feature set.
6
See chapter 13, Known limitations, page 213.
6
17
1 Introduction
1.6 64-bit guests
Starting with Version 2.0, VirtualBox also supports 64-bit guest operating systems.
Starting with Version 2.1, you can even run 64-bit guests on a 32-bit host operating
system, so long as you have sufficient hardware.
In particular, 64-bit guests are supported under the following conditions:
1. You need a 64-bit processor with hardware virtualization support (see chapter
1.2, Software vs. hardware virtualization (VT-x and AMD-V), page 11).
2. You must enable hardware virtualization for the particular VM for which you
want 64-bit support; software virtualization is not supported for 64-bit VMs.
3. If you want to use 64-bit guest support on a 32-bit host operating system, you
must also select a 64-bit operating system for the particular VM. Since supporting
64 bits on 32-bit hosts incurs additional overhead, VirtualBox only enables this
support upon explicit request.
On 64-bit hosts, 64-bit guest support is always enabled, so you can simply install
a 64-bit operating system in the guest.
Warning: On any host, you should enable the I/O APIC for virtual machines
that you intend to use in 64-bit mode. This is especially true for 64-bit Windows VMs. See chapter 3.7.1.2, “Advanced” tab, page 46. In addition, for
64-bit Windows guests, you should make sure that the VM uses the Intel net-working device, since there is no 64-bit driver support for the AMD PCNet
card; see chapter 6.1, Virtual networking hardware, page 82.
If you use the “Create VM” wizard of the VirtualBox graphical user interface (see
chapter 3.2, Creating a virtual machine, page 32), VirtualBox will automatically use
the correct settings for each selected 64-bit operating system type.
18
2Installation
As installation of VirtualBox varies depending on your host operating system, we provide installation instructions in four separate chapters for Windows, Mac OS X, Linux
and Solaris, respectively.
2.1 Installing on Windows hosts
2.1.1 Prerequisites
For the various versions of Windows that we support as host operating systems, please
refer to chapter 1.4, Supported host operating systems, page 16.
In addition, Windows Installer 1.1 or higher must be present on your system. This
should be the case if you have all recent Windows updates installed.
2.1.2 Performing the installation
The VirtualBox installation can be started
• either by double-clicking on its executable file (contains both 32- and 64-bit
architectures)
• or by entering
VirtualBox.exe -extract
on the command line. This will extract both installers into a temporary directory
in which you’ll then find the usual .MSI files. Then you can do a
In either case, this will display the installation welcome dialog and allow you to
choose where to install VirtualBox to and which components to install. In addition to
the VirtualBox application, the following components are available:
USB support This package contains special drivers for your Windows host that
VirtualBox requires to fully support USB devices inside your virtual machines.
19
2 Installation
Networking This package contains extra networking drivers for your Windows host
that VirtualBox needs to support Host Interface Networking (to make your VM’s
virtual network cards accessible from other machines on your physical network).
Depending on your Windows configuration, you may see warnings about “unsigned
drivers” or similar. Please select “Continue” on these warnings as otherwise VirtualBox
might not function correctly after installation.
The installer will create a “VirtualBox” group in the programs startup folder which
allows you to launch the application and access its documentation.
With standard settings, VirtualBox will be installed for all users on the local system.
In case this is not wanted, you have to invoke the installer by first extracting it by using
on the extracted .MSI files. This will install VirtualBox only for the current user.
2.1.3 Uninstallation
As we use the Microsoft Installer, VirtualBox can be safely uninstalled at any time by
choosing the program entry in the “Add/Remove Programs” applet in the Windows
Control Panel.
2.1.4 Unattended installation
Unattended installations can be performed using the standard MSI support.
2.2 Installing on Mac OS X hosts
2.2.1 Performing the installation
For Mac OS X hosts, VirtualBox ships in a disk image (dmg) file. Perform the following
steps:
1. Double-click on that file to have its contents mounted.
2. A window will open telling you to double click on the VirtualBox.mpkg installer file displayed in that window.
3. This will start the installer, which will allow you to select where to install
VirtualBox to.
After installation, you can find a VirtualBox icon in the “Applications” folder in the
Finder.
20
2 Installation
2.2.2 Uninstallation
To uninstall VirtualBox, open the disk image (dmg) file again and double-click on the
uninstall icon contained therein.
2.2.3 Unattended installation
To perform a non-interactive installation of VirtualBox you can use the command line
version of the installer application.
Mount the disk image (dmg) file as described in the normal installation. Then open
For the various versions of Linux that we support as host operating systems, please
refer to chapter 1.4, Supported host operating systems, page 16.
You will need to install the following packages on your Linux system before starting
the installation (some systems will do this for you automatically when you install
VirtualBox):
• Qt 4.3.0 or higher;
• SDL 1.2.7 or higher (this graphics library is typically called libsdl or similar).
Note: To be precise, these packages are only required if you want to run the
VirtualBox graphical user interfaces. In particular, VirtualBox, our main
graphical user interface, requires both Qt and SDL; VBoxSDL, our simplified
GUI, requires only SDL. By contrast, if you only want to run the headless
VRDP server that comes with VirtualBox, neither Qt nor SDL are required.
2.3.2 The VirtualBox kernel module
VirtualBox uses a special kernel module to perform physical memory allocation and to
gain control of the processor for guest system execution. Without this kernel module,
you will still be able to work with virtual machines in the configuration interface, but
you will not be able to start any virtual machines.
21
2 Installation
The VirtualBox kernel module is automatically installed on your system when you
install VirtualBox. To maintain it with future kernel updates, for recent Linux distributions – for example Fedora Core 5 and later, Ubuntu 7.10 (Gutsy) and later and Mandriva 2007.1 and later –, generally we recommend installing Dynamic Kernel Module
Support (DKMS)1. This framework helps to build kernel modules and to deal with
kernel upgrades.
If DKMS is not already installed, execute one of the following:
• On an Ubuntu system:
sudo apt-get install dkms
• On a Fedora system:
yum install dkms
• On a Mandriva system:
urpmi dkms
If DKMS is available and installed, the VirtualBox kernel module should always work
automatically, and it will be automatically rebuilt if your host kernel is updated.
Otherwise, there are only two situations in which you will need to worry about the
kernel module:
1. The original installation fails. This probably means that your Linux system is not
prepared for building external kernel modules.
Most Linux distributions can be set up simply by installing the right packages normally, these will be the GNU compiler (GCC), GNU Make (make) and packages containing header files for your kernel - and making sure that all system
updates are installed and that the system is running the most up-to-date kernel
included in the distribution. The version numbers of the header file packages must
be the same as that of the kernel you are using.
• With Debian and Ubuntu releases, you must install the right version of the
linux-headers and if it exists the linux-kbuild package. Current
Ubuntu releases should have the right packages installed by default.
• In even older Debian and Ubuntu releases, you must install the right version
of the kernel-headers package.
• On Fedora and Redhat systems, the package is kernel-devel.
• On SUSE and openSUSE Linux, you must install the right versions of the
kernel-source and kernel-syms packages.
• Alternatively, if you have built your own kernel, /usr/src/linux should
point to your kernel sources. If you have not removed the files created
during the build process, then your system will already be set up correctly.
1
See http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support for an introduction.
22
2 Installation
2. The kernel of your Linux host got updated. In that case, the kernel module will
need to be reinstalled by executing (as root):
/etc/init.d/vboxdrv setup
2.3.3 USB and advanced networking support
In order to use VirtualBox’s USB support, the user account under which you intend to
run VirtualBox must have read and write access to the USB filesystem (usbfs).
In addition, access to /dev/net/tun will be required if you want to use Host
Interface Networking, which is described in detail in chapter 6.5, Bridged networking,
page 86.
2.3.4 Performing the installation
VirtualBox is available in a number of package formats native to various common Linux
distributions (see chapter 1.4, Supported host operating systems, page 16 for details).
In addition, there is an alternative generic installer (.run) which should work on most
Linux distributions.
2.3.4.1 Installing VirtualBox from a Debian/Ubuntu package
First, download the appropriate package for your distribution. The following examples
assume that you are installing to an Ubuntu Edgy system. Use dpkg to install the
Debian package:
sudo dpkg -i VirtualBox_3.0.0_Ubuntu_edgy.deb
You will be asked to accept the VirtualBox Personal Use and Evaluation License.
Unless you answer “yes” here, the installation will be aborted.
The group vboxusers will be created during installation. Note that a user who is
going to run VirtualBox must be member of that group. A user can be made member of
the group vboxusers through the GUI user/group management or at the command
line with
sudo usermod -a -G vboxusers username
Also note that adding an active user to that group will require that user to log out
and back in again. This should be done manually after successful installation of the
package.
The installer will also search for a VirtualBox kernel module suitable for your
kernel.The package includes pre-compiled modules for the most common kernel configurations.If no suitable kernel module is found, the installation script
tries to build a module itself.If the build process is not successful you will be
shown a warning and the package will be left unconfigured. Please have a look at
/var/log/vbox-install.log to find out why the compilation failed. You may
have to install the appropriate Linux kernel headers (see chapter 2.3.2, The VirtualBox
kernel module, page 21). After correcting any problems, do
23
2 Installation
sudo /etc/init.d/vboxdrv setup
This will start a second attempt to build the module.
If a suitable kernel module was found in the package or the module was successfully
built, the installation script will attempt to load that module. If this fails, please see
chapter 11.5.1, Linux kernel module refuses to load, page 150 for further information.
Once VirtualBox has been successfully installed and configured, you can start it by
selecting “VirtualBox” in your start menu or from the command line (see chapter 2.3.5,
Starting VirtualBox on Linux, page 28).
2.3.4.2 Using the alternative installer (VirtualBox.run)
The alternative installer performs the following steps:
• It unpacks the application files to a target directory of choice. By default,
/opt/VirtualBox/
will be used.
• It builds the VirtualBox kernel module (vboxdrv) and installs it.
• It creates /etc/init.d/vboxdrv, an init script to start the VirtualBox kernel
module.
• It creates a new system group called vboxusers.
• It creates symbolic links to VirtualBox, VBoxSDL, VBoxVRDP, VBoxHeadless
and VBoxManage in /usr/bin.
• It creates /etc/udev/60-vboxdrv.rules, a description file for udev, if
that is present, which makes the module accessible to anyone in the group
vboxusers.
• It writes the installation directory to /etc/vbox/vbox.cfg.
The installer must be executed as root with either install or uninstall as the
first parameter. If you do not want the installer to ask you whether you wish to accept
the license agreement (for example, for performing unattended installations), you can
add the parameter license_accepted_unconditionally. Finally, if you want
to use a directory other than the default installation directory, add the desired path as
an extra parameter.
sudo ./VirtualBox.run install /opt/VirtualBox
Or if you do not have the “sudo” command available, run the following as root
instead:
./VirtualBox.run install /opt/VirtualBox
24
2 Installation
After that you need to put every user which should be able to use VirtualBox in the
group vboxusers, either through the GUI user management tools or by running the
following command as root:
sudo usermod -a -G vboxusers username
Note: The usermod command of some older Linux distributions does not
support the -a option (which adds the user to the given group without
affecting membership of other groups). In this case, find out the current
group memberships with the groups command and add all these groups in a
comma-separated list to the command line after the -G option, e.g. like this:
usermod -G group1,group2,vboxusers username.
If any users on your system should be able to access host USB devices from within
VirtualBox guests, you should also add them to the appropriate user group that your
distribution uses for USB access, e.g. usb or usbusers.
2.3.4.3 Performing a manual installation
If, for any reason, you cannot use the shell script installer described previously, you
can also perform a manual installation. Invoke the installer like this:
./VirtualBox.run --keep --noexec
This will unpack all the files needed for installation in the directory install
under the current directory.The VirtualBox application files are contained in
VirtualBox.tar.bz2 which you can unpack to any directory on your system. For
example:
sudo mkdir /opt/VirtualBox
sudo tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox
or as root:
mkdir /opt/VirtualBox
tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox
The sources for VirtualBox’s kernel module are provided in the src directory. To
build the module, change to the directory and issue
make
If everything builds correctly, issue the following command to install the module to
the appropriate module directory:
sudo make install
In case you do not have sudo, switch the user account to root and perform
25
2 Installation
make install
The VirtualBox kernel module needs a device node to operate. The above make
command will tell you how to create the device node, depending on your Linux system.
The procedure is slightly different for a classical Linux setup with a /dev directory, a
system with the now deprecated devfs and a modern Linux system with udev.
On certain Linux distributions, you might experience difficulties building the module. You will have to analyze the error messages from the build system to diagnose the
cause of the problems. In general, make sure that the correct Linux kernel sources are
used for the build process.
Note that the user who is going to run VirtualBox needs read and write permission
on the VirtualBox kernel module device node /dev/vboxdrv. You can either define
a vboxusers group by entering
or, alternatively, simply give all users access (insecure, not recommended!)
chmod 666 /dev/vboxdrv
You should also add any users who will be allowed to use host USB devices in
VirtualBox guests to the appropriate USB users group for your distribution. This group
is often called usb or usbusers.
Next, you will have to install the system initialization script for the kernel module:
cp /opt/VirtualBox/vboxdrv.sh /etc/init.d/vboxdrv
(assuming you installed VirtualBox to the /opt/VirtualBox directory) and activate
the initialization script using the right method for your distribution. You should create
VirtualBox’s configuration file:
Before updating or uninstalling VirtualBox, you must terminate any virtual machines
which are currently running and exit the VirtualBox or VBoxSVC applications. To
update VirtualBox, simply run the installer of the updated version.To uninstall
VirtualBox, invoke the installer like this:
26
2 Installation
sudo ./VirtualBox.run uninstall
or as root
./VirtualBox.run uninstall
. Starting with version 2.2.2, you can uninstall the .run package by invoking
/opt/VirtualBox/uninstall.sh
To manually uninstall VirtualBox, simply undo the steps in the manual installation in
reverse order.
2.3.4.5 Automatic installation of Debian packages
The Debian packages will request some user feedback when installed for the first time.
The debconf system is used to perform this task. To prevent any user interaction during
installation, default values can be defined. A file vboxconf can contain the following
debconf settings:
The first line allows compilation of the vboxdrv kernel module if no module was found
for the current kernel. The second line allows the package to delete any old vboxdrv
kernel modules compiled by previous installations.
These default settings can be applied with
debconf-set-selections vboxconf
prior to the installation of the VirtualBox Debian package.
2.3.4.6 Automatic installation of .rpm packages
The .rpm format does not provide a configuration system comparable to the debconf system.To configure the installation process of our .rpm packages, a file
/etc/default/virtualbox is interpreted. The automatic generation of the udev
rule can be prevented by the following setting:
INSTALL_NO_UDEV=1
The creation of the group vboxusers can be prevented by
INSTALL_NO_GROUP=1
If the line
INSTALL_NO_VBOXDRV=1
is specified, the package installer will not try to build the vboxdrv kernel module if
no module according to the current kernel was found.
27
2 Installation
2.3.5 Starting VirtualBox on Linux
The easiest way to start a VirtualBox program is by running the program of your choice
(VirtualBox, VBoxManage, VBoxSDL or VBoxHeadless) from a terminal. These
are symbolic links to VBox.sh that start the required program for you.
The following detailed instructions should only be of interest if you wish to execute VirtualBox without installing it first. You should start by compiling the vboxdrv
kernel module (see above) and inserting it into the Linux kernel. VirtualBox consists
of a service daemon (VBoxSVC) and several application programs. The daemon is
automatically started if necessary. All VirtualBox applications will communicate with
the daemon through Unix local domain sockets. There can be multiple daemon instances under different user accounts and applications can only communicate with
the daemon running under the user account as the application. The local domain
socket resides in a subdirectory of your system’s directory for temporary files called
.vbox-<username>-ipc. In case of communication problems or server startup
problems, you may try to remove this directory.
All VirtualBox applications (VirtualBox, VBoxSDL, VBoxManage and VBoxHeadless)
require the VirtualBox directory to be in the library path:
For the various versions of Solaris that we support as host operating systems, please
refer to chapter 1.4, Supported host operating systems, page 16.
If you have a previously installed instance of VirtualBox on your Solaris host, please
uninstall it first before installing a new instance. Refer to chapter 2.4.3, Uninstallation,
page 29 for uninstall instructions.
2.4.1 Performing the installation
VirtualBox is available as a standard Solaris package. Download the VirtualBox SunOS
package which includes both the 32-bit and 64-bit versions of VirtualBox. The installa-tion must be performed as root and from the global zone as the VirtualBox installer loads
kernel drivers which cannot be done from non-global zones. To verify which zone you
are currently in, execute the zonename command. Execute the following commands:
gunzip -cd VirtualBox-3.0.0-SunOS-x86.tar.gz | tar xvf -
Starting with VirtualBox 1.6.2 we ship the VirtualBox kernel interface module (vbi).
The purpose of this module is to shield the VirtualBox kernel driver from changes to the
SunOS kernel. If you do not have vbi already installed (check for the existence of the
file /platform/i86pc/kernel/misc/vbi) install it by executing the command:
pkgadd -G -d VirtualBoxKern-3.0.0-SunOS.pkg
28
2 Installation
Future versions of OpenSolaris may ship the VirtualBox kernel interface module, in
which case you can remove this one before upgrading OpenSolaris.
Next you should install the main VirtualBox package using:
pkgadd -d VirtualBox-3.0.0-SunOS-x86.pkg
Note: If you are using Solaris Zones, to install VirtualBox only into the current
zone and not into any other zone, use pkgadd -G. For more information
refer to the pkgadd manual; see also chapter 2.4.5, Configuring a zone for
running VirtualBox, page 30.
The installer will then prompt you to enter the package you wish to install. Choose
“1” or “all” and proceed. Next the installer will ask you if you want to allow the
postinstall script to be executed. Choose “y” and proceed as it is essential to execute
this script which installs the VirtualBox kernel module. Following this confirmation
the installer will install VirtualBox and execute the postinstall setup script.
Once the postinstall script has been executed your installation is now complete. You
may now safely delete the uncompressed package and autoresponse files from your
system. VirtualBox would be installed in /opt/VirtualBox.
2.4.2 Starting VirtualBox on Solaris
The easiest way to start a VirtualBox program is by running the program of your choice
(VirtualBox, VBoxManage, VBoxSDL or VBoxHeadless) from a terminal. These
are symbolic links to VBox.sh that start the required program for you.
Alternatively, you can directly invoke the required programs from /opt/VirtualBox.
Using the links provided is easier as you do not have to type the full path.
You can configure some elements of the VirtualBox Qt GUI such as fonts and
colours by executing VBoxQtconfig from the terminal.
2.4.3 Uninstallation
Uninstallation of VirtualBox on Solaris requires root permissions. To perform the uninstallation, start a root terminal session and execute:
pkgrm SUNWvbox
After confirmation, this will remove VirtualBox from your system.
To uninstall the VirtualBox kernel interface module, execute:
pkgrm SUNWvboxkern
29
2 Installation
2.4.4 Unattended installation
To perform a non-interactive installation of VirtualBox we have provided a response
file named autoresponse that the installer will use for responses to inputs rather
than ask them from you.
Extract the tar.gz package as described in the normal installation. Then open a root
terminal session and execute:
pkgadd -d VirtualBox-3.0.0-SunOS-x86 -n -a autoresponse SUNWvbox
To perform a non-interactive uninstallation, open a root terminal session and execute:
pkgrm -n -a /opt/VirtualBox/autoresponse SUNWvbox
2.4.5 Configuring a zone for running VirtualBox
Starting with VirtualBox 1.6 it is possible to run VirtualBox from within Solaris
zones. For an introduction of Solaris zones, please refer to http://www.sun.com/
bigadmin/features/articles/solaris_zones.jsp.
Assuming that VirtualBox has already been installed into your zone, you need to give
the zone access to VirtualBox’s device node. This is done by performing the following
steps. Start a root terminal and execute:
zonecfg -z vboxzone
Inside the zonecfg prompt add the device resource and match properties to the
zone. Here’s how it can be done:
If you are running VirtualBox 2.2.0 or above on OpenSolaris or Nevada hosts, you
should add a device for /dev/vboxusbmon too, similar to what was shown above.
This does not apply to Solaris 10 hosts due to lack of USB support.
Replace “vboxzone” with the name of the zone in which you intend to run
VirtualBox. Next reboot the zone using zoneadm and you should be able to run
VirtualBox from within the configured zone.
30
Loading...
+ 229 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.