An Overview of VirtualBox 2
The objective of this chapter of VirtualBox 2 Essentials is to provide an overview of the history of VirtualBox and offer a high level overview of how VirtualBox works and how it compares to other approaches to virtualization.
What is VirtualBox?
VirtualBox is a desktop virtualization solution which enables multiple guest operating systems to run on a single host computer. The technology was originally developed by a German company called Innotek. Innotek was subsequently acquired by Sun Microsystems in 1998 and the VirtualBox product incorporated into Sun's xVM family of virtualization technologies.
VirtualBox is supplied in two different editions. The most suitable edition will depend on the needs of the user:
- VirtualBox Full Binary Edition - Free for personal use and evaluation purposes, this edition is pre-built for a variety of host operating systems and is fully functional. The source code for this edition is not available and licenses must be purchased for commercial use of the product.
- VirtualBox Open Source Edition (OSE) - Freely available for personal and commercial use and includes source code released under the terms of the GNU Public License (GPL). The source code must be compiled prior to use and the following features are missing from this edition:
- - Remote Display Protocol (RDP) Server - Allows remote access to virtual machines via RDP based clients.
- - USB support - Provides virtual machine access to USB devices connected to the host computer system.
- - USB over RDP - Allows USB devices attached to a local system to be made available to virtual machines running on remote hosts.
- - iSCSI initiator - Enables iSCSI storage devices to be used as virtual disks without the need for iSCSI drivers on the guest operating system.
- - Serial ATA controller - Increases the performance of virtual hard disks and allows more than three virtual hard disks to be connected to a single virtual machine.
VirtualBox Architecture Basics
Virtualization technology typically falls into one of a number of categories, namely software virtualization, shared kernel virtualization, kernel level virtualization, hypervisor virtualization, paravirtualization, full virtualization and hardware virtualization. A full overview of each of these techniques is beyond the scope of this chapter, but an excellent description of each is available in An Overview of Virtualization Techniques.
VirtualBox is somewhat unusual in that it is able to utilize two forms of virtualization - software virtualization and hardware virtualization.
Software virtualization is perhaps the easiest concept to understand. In this scenario the physical host computer system runs a standard unmodified operating system such as Windows, Linux, UNIX (for example Solaris) or Mac OS X. Running on this operating system is a virtualization application (in this case VirtualBox) which executes in much the same way as any other application such as a word processor or spreadsheet would run on the system. It is within this virtualization application that one or more virtual machines are created to run the guest operating systems on the host computer. The virtualization application is responsible for starting, stopping and managing each virtual machine and essentially controlling access to physical hardware resources on behalf of the individual virtual machines. The virtualization application also engages in a process known as binary rewriting which involves scanning the instruction stream of the executing guest system and replacing any privileged instructions with safe emulations. This has the effect of making the guest system think it is running directly on the system hardware, rather than in a virtual machine within an application.
The following figure provides a high level illustration of software based virtualization:
As outlined in the above diagram, the guest operating systems operate in virtual machines within the virtualization application which, in turn, runs on top of the host operating system. Clearly, the multiple layers of abstraction between the guest operating systems and the underlying host hardware are not conducive to high levels of virtual machine performance. This technique does, however, have the advantage that no changes are necessary to either host or guest operating systems and no special CPU hardware virtualization support is required.
Hardware virtualization leverages virtualization features built into the latest generations of CPUs from both Intel and AMD. These technologies, known as Intel VT and AMD-V respectively, provide extensions necessary to run unmodified guest virtual machines without the overheads inherent in other forms of virtualization.
VirtualBox - Software and Hardware Virtualization
As previously discussed, VirtualBox primarily uses software virtualization to run virtual machines. In fact, this is the default behavior for any virtual machines (with the exception of 64-bit guest operating systems) created within the VirtualBox environment. VirtualBox does, however, provide the option to enable hardware virtualization on a per virtual machine basis when running on AMD-V and Intel-VT capable CPUs. On more recent CPU designs, VirtualBox is also able to make use of nesting paging tables to improve virtual machine performance.
The developers of VirtualBox do, however, warn that depending on the guest environment and workload, greater performance may be achieved by leaving the hardware virtualization option switch off for some virtual machines. Clearly, if virtual machine performance is an issue, some experimentation with hardware virtaulization switched on and off to identify the optimal configuration is recommended.
VirtualBox - A Summary
In summary, VirtualBox allows multiple and differing guest operating systems to run simultaneously on a single host computer system. It is available in a bre-built, fully functional version which is free for personal and for a charge for commercial use and a free, open source version with some functionality missing.
VirtualBox runs on a host operating system and is able to run unmodified guest operating systems (i.e operating systems that have not been modified to run in a virtual machine). This is achieved using either software virtualization, or in the case of hosts with AMD-V or Intel-V CPUs, hardware virtualization.