Virtualization is a technology that has already had plenty of time to reach its full maturity. It is currently represented in all segments of the IT world, from home users to full fledged enterprise professional environments – helping to exploit the advantages of simultaneous multiple instances of operating systems on the same hardware platform (computer). In addition to saving hardware and energy resources (consolidation), which is the primary reason for its application, virtualization is often used for creating test and experimental environments.
VirtualBox is a free virtualization software package from the company Oracle, which was originally developed by the company Innotek 2007. The path to ownership of Oracle Corporation went indirectly, through Innotek’s acquisition by the company Sun Microsystems, which was later acquired by Oracle. The software is available under the General Public 2 license (GPL) and is available as 32 bit and 64 architecture.
VirtualBox is a multi-platform solution, in the truest sense of the phrase, since it runs on a really impressive list of operating systems: supported are Microsoft Windows, Linux, Solaris, IBM OS / 2, Mac OS X, Linux, OpenBSD. The official website of VirtualBox can be found at: https://www.virtualbox.org/. It supports wide range of Microsoft Windows versions. For example, it can run Windows 10 in 32bit and 64 bit mode, but it can also run Windows 3.1.
General features
Oracle VirtualBox is installed on an existing operating system. As already mentioned, this software provides the ability to use multiple operating systems at the same time, by starting one or more virtual instances from the existing host operating system. A very important feature of VirtualBox is it’s flexibility. In other words, we can use it on laptops or desktop computers as well as in the data center. The only limiting factor in terms of competitive use of the number of virtual machines you set up is your hardware, memory, storage capacity and processing power.
Terminology and definitions of virtualization technology are known to be confusing, and so on Oracle’s official website you can read that the VirtualBox is synonymous with “hosted” hypervisor (hypervisor type 2), or the type of hypervisor that is not implemented directly on the hardware, but also represents a layer between the host operating system and the “guest” system. In addition, VirtualBox subsumed as a “personal desktop virtualization” solution, and can be seen along with the term “guest operating system” as a type of virtualization. VirtualBox is all of that plus a “full virtualization” solution. This means that the installation media does not have to be modified when we install the operating system on a virtual machine. Created virtual machines can be used later within our existing operating system, or the host. Adhering to the virtualization terminology, we note that the virtual machine is an environment under which we start guest systems, although in practice the terms virtual machine and guest system often have the same meaning. VirtualBox represents the application layer between the operating system and virtual guest system.
Installation, virtual machines and basic settings
The VirtualBox installation process is independent of the operating system on which you install, and it is fairly easy. Characteristically, the installation comes in the form of two packages – the first basic installation package, which falls under the GNU GPL 2 license and an additional package with the extensions that extend the functionality of the basic package. Most users will install the basic package, as this will be sufficient. After successfully completing installation, users are all set to create a new virtual machine (VM part) and the installation of the “guest” system. Throughout the installation process, the wizard guides you along the way, and the process comes down to the choice of an operating system which needs to be installed, the choice of the RAM memory you wish to reserve for the virtual machine, as well as booking space on a physical disk drive for the virtual disks to be used by the virtual machine. The virtual disk is usually only the image file in which VirtualBox captures all necessary data. Storage space of virtual disks can be allocated dynamically, which means that the virtual HDD increases “on the run”, as it fills up with data, and the initial size is 0. Allocation of space can be fixed, in which case the image file from the start takes a size which the user provides. Each of these solutions has its advantages and disadvantages. Dynamic allocation can significantly save space, but provides slightly less performance and vice versa. VirtualBox can handle the following formats of image files: VDI, MDK, a VHD, HDD.
The next step is to install the operating system of your choice onto a virtual machine. This step can be implemented by directly inserting the installation media in the CD / DVD drive on your computer, however, VirtualBox has a handy feature – attaching ISO image files directly. Just map the corresponding image and it will display the “guest” system as a CD / DVD player with whom we can run the installation of the operating system.
Network settings
A very important item to remember are the network settings. Each virtual machine can be assigned to one or more virtual network adapters. Whether, and how, virtual machines should be available on the network is completely up to the user. The network adapter can be placed in one of the following modes:
- no connection,
- NAT (network address translation),
- bridged network,
- internal network,
- host-only network and
- generic network.
By default VirtualBox creates a single network adapter in NAT mode. NAT mode ensures that the virtual machine is not directly visible on the network, but hidden behind the IP address of the “host” system, which is responsible for translating the network traffic from your address to the address of the “guest” system, providing them the ability to communicate with the rest of the world.
Bridged mode allows the “guest” system to share the same network as the rest of the machines on the local area network and will therefore be visible to all computers on the network.
“No connection” mode means that a virtual network adapter exists, but without an active network connection (UTP cable is connected).
Internal network mode is very similar to bridge mode, only with greater emphasis on safety: In bridge mode virtual adapter VMs and their packages are sent via the “host”, but there is the possibility of interception of network traffic, whereas with the internal network mode, this option is off – each virtual machine forwards network packets, not over “hosts”.
“Host-only” mode allows you to create an internal network between the host and one or more virtual machines. “Host” and the virtual machine will share the same network range and each will see the other. The virtual machine will not be visible to the rest of the network, because they will be different from the scope of the network LAN range.
Generic mode allows you to create a standalone driver (driver) for the network adapter. This mode is experimental and is rarely applied in practice. All the network settings can be made before or after the installation of the operating system.
The settings of individual virtual machines
Cloning VM
During the previous part of the text, we explained the varying choices of network options in some detail. In the settings of virtual machines the various options for adjusting the screen, sound, USB ports, support for serial ports, resource sharing (folder) from the host system, and so on are available. For more information, we recommend reviewing the excellent and extensive instructions found at http://dlc.sun.com.edgesuite.net/virtualbox/4.2.14/UserManual.pdf
After the installation process, the “guest” system can be installed along with the “guest additions” package, which we will discuss in greater detail later, but this step is optional. The virtual machine is now ready for exploitation. As the virtual machine is in use, the host computer can not be shut down or put into hibernation, and the virtual machine can be switched off or simply paused at will. The process of restarting the virtual machine only takes a few seconds and it provides the same state of the virtual machine as it was before pausing. If we need identical (or similar) copies of a given virtual machine, so that we would not have to repeat the installation process, there is a very handy option of cloning. There are two types of cloning. The first way is absolute cloning, in which identical copies of all existing settings and disk image will be created. This procedure doubles the HD space in use. Another option when cloning is to be created a new virtual machine that will reference the original virtual disk image.
VirtualBox features
The comparative advantage that was the base reason for why we selected VirtualBox in the first place is its portability. The “bare-metal” virtualization solutions, or solutions in which the hypervisor is directly on the hardware layer, most often can be installed only on specific, supported hardware, and the hardware is typically supplied and dedicated. VirtualBox has no hardware limitation of this type, and in addition it requires no processors with built-in support for Intel VT-x or AMD-V.
We have noted that VirtualBox can be installed on Microsoft Windows, Linux, Macintosh and Solaris operating systems. When multiple images of virtual machines are created on a single host, you can utilize the mapping of ISO image files to directly switch from one virtual machine to another, regardless of which operating system is running. The functionality is completely identical (although there are minor differences), regardless of the “host” operating system.
With VirtualBox comes a set of tools for guest systems (“guest additions”), which can be installed directly on the “guest” system, although this step is optional. The tools improve screen resolution, some “guest” systems have the ability to use 3D acceleration, speeds up work input peripherals, etc. VirtualBox provides a “guest” SMP multiprocessor systems support as well as support for USB devices, and in itself has a built-in iSCSI support. This functionality allows direct connection between “guest” systems on iSCSI storage system, without the mediation of the “host” system as an interlayer. Guest systems can enable network booting using PXE environment (Preboot Execution Environment).
One of the most useful features is support for creating a “snapshot” of URLs, which represent a cross-section of the system of virtual machines at a time. In this way we can capture the current state of the virtual machine with all installed applications and settings. This is very convenient to do as a kind of backup procedure, before installing any software or making any major changes to the system. If installation does not go as expected, the software does not justify expectations, or changes to the system make a problem, one click can restore the system state of the virtual machine from an instance before installation / changes at any time. A virtual machine can create any number of “snapshots” -this system itself reminiscent of a time machine. The process of creating or deleting a “snapshot” rather than requiring the stopping of virtual machines.
VirtualBox has another great function, which is the ability to group virtual machines. Everything that can be applied to a virtual machine, can be applied to an entire group at the same time. VirtualBox has full support for ACPI and is designed to be completely modular. It supports an OVF format (Open Virtualization Format), which supports a large number of other manufacturers, so it is possible to import a machine that is created on a VMware Workstation platform and vice versa.
Now let us mention another practical functionality, the possibility of quickly and easily sharing information between the “host” and virtual machines (Shared folders). To use a shared folder, it is necessary to install the “guest additions” package.
Conclusion
With this brief introduction we only touched the principles of the subject. User’s manual that we recommend is more extensive, more than 300 pages. In the end, here are a few more interesting facts: Although it has an excellent graphical interface, rich functionality, VirtualBox allows for additional flexibility. Everything that can be achieved using a GUI can be also done using the command line. Many command line functionality even don’t exist in the user interface. VBoxManage interface is responsible for console mode and contains a series of commands for the complete VirtualBox management. Another information that might interest developers: VirtualBox is also available as SDK (software development kit) tool that allows software development in correlation with VirtualBox management. Using the SDK can accessed all of its functionalities. VirtualBox is a small, flexible virtualization multi-tool and I highly recommend it for personal use and use in less demanding professional environments.
Sources and Literature:
Virtualbox UserManual, https://www.virtualbox.org/manual/UserManual.html
Virtuatopia.com – An Overview of Virtualization Techniques:
http://www.virtuatopia.com/index.php/An_Overview_of_Virtualization_Techniques
Wikipedia.org – Virtualbox, https://en.wikipedia.org/wiki/VirtualBox
Virtualbox.org – Documentation, https://www.virtualbox.org/wiki/Documentation
Leave a Reply