Overview of Virtualization Technologies

By: Michael New, Edward Whalen, Matthew Burke


Virtualization has been around for quite a while now; however, its mass appeal has only been realized with the extensive improvements that have appeared in the last few years. In virtualization’s early days, you had to purchase very expensive hardware; now, due to its ability to use commodity PC servers, you can download free virtualization software to get started. A number of different virtualization technologies are available in the market today, including the following:
  • Full software virtualization
  • Hardware-assisted software virtualization or Hardware Virtual Machine (HVM)
  • Paravirtualization or paravirtualized machine (PV)
  • Hardware-assisted software virtualization with paravirtual drivers (PVHVM)
  • Component or resource virtualization
Depending on your situation, you might be able to take advantage of one or more of these virtualization types. Here, I’ll explore each virtualization type, along with their pros and cons. Each type has its own attributes, which provide specific benefits. The type of virtualization that you choose depends on your needs. Oracle VM supports hardware-assisted software virtualization, paravirtualization, and the hybrid PVHVM.

Full Software Virtualization

In full software virtualization, all the hardware is simulated by a software program. Each device driver and process in the guest OS “believes” it is running on actual hardware, even though the underlying hardware is really a software program. Software virtualization even fools the OS into thinking that it is running on hardware.
One of the advantages of full software virtualization is that you can run any OS on it. It doesn’t matter if the OS in question understands the underlying host hardware or not. Thus, older OSs and specialty OSs can run in this environment. The architecture is very flexible because you don’t need a special understanding of the OS or hardware.
The OS hardware subsystem discovers the hardware in the normal fashion. It believes the hardware is really hardware. The hardware types and features that it discovers are usually fairly generic and might not be as full-featured as actual hardware devices, though the system is functional.
Another advantage of full software virtualization is that you don’t need to purchase any additional hardware. With hardware-assisted software virtualization, you need to purchase hardware that supports advanced VM technology. Although this technology is included in most systems available today, some older hardware does not have this capability. To use this older hardware as a virtual host, you must use either full software virtualization or paravirtualization.
NOTE
Only hardware-assisted software virtualization requires advanced VM hardware features; full software virtualization does not. Oracle VM and VMware ESX work on older hardware that does not have any special CPU features. This type of virtualization is also known as emulation.
Unfortunately, full software virtualization adds overhead. This overhead translates into extra instructions and CPU time on the host, resulting in a slower system and higher CPU usage. With full software virtualization, the CPU instruction calls are trapped by the Virtual Machine Monitor (VMM) and then emulated in a software program. Therefore, every hardware instruction that would normally be handled by the hardware itself is now handled by a program.
For example, when the disk device driver makes an I/O call to the “virtual disk,” the software in the VM system intercepts it, then processes it, and finally makes an I/O to the real underlying disk. The number of instructions to perform an I/O is greatly increased.
With networking, even more overhead is incurred since a network switch is simulated in the software. Depending on the amount of network activity, the overhead can be quite high. In fact, with severely overloaded host systems, you could possibly see network delays from the virtual switch itself. This is why sizing is so important.

Hardware-Assisted Software Virtualization

Hardware-assisted software virtualization is available with CPU chips with built-in virtualization support. Recently, with the introduction of the Intel VT and AMD-V technology, this virtualization type has become commoditized. This technology was first introduced on the IBM System/370 computer. It is similar to software virtualization, with the exception that some hardware functions are accelerated and assisted by hardware technology. Similar to software virtualization, the hardware instructions are trapped and processed, but this time using hardware in the virtualization components of the CPU chip.
By using hardware-assisted software virtualization, you get the benefits of software virtualization, such as the ability to use any OS without modifying it, and, at the same time, achieve better performance. Because of virtualization’s importance, significant effort is going into providing more support for hardware-assisted software virtualization. Hardware-assisted virtualization also supports any operating system.
Using hardware-assisted software virtualization, Oracle VM lets you install and run Linux and Solaris x86-based OSs as well as Microsoft Windows. With other virtualization techniques, Oracle VM only allows Linux OSs. This technique also makes migrating from VMware systems to Oracle VM easier.
As mentioned earlier, both Intel and AMD are committed to support for hardware-assisted software virtualization. They both introduced virtualization technology around the mid-2005–2006 period, which is not that long ago, and their support has improved the functionality and performance of virtualization. Intel and AMD do not yet fully support paravirtualization. Hardware-assisted software virtualization components are changing at a very fast pace, however, with new features and functionality being introduced continually.
NOTE
Hardware-assisted virtualization is really the long-term virtualization solution. Applications such as Xen will be mainly used for management.

Intel

Intel supports virtualization via its VT-x technology. The Intel VT-x technology is now part of many Intel chipsets, including the Pentium, Xeon, and Core processors families. The VT-x extensions support an Input/Output Memory Management Unit (IOMMU) that allows virtualized systems to access I/O devices directly. Ethernet and graphics devices can now have their DMA and interrupts directly mapped via the hardware. In the latest versions of the Intel VT technology, extended page tables have been added to allow direct translation from guest virtual addresses to physical addresses.

AMD

AMD supports virtualization via the AMD-V technology. The AMD-V technology includes a rapid virtualization indexing technology to accelerate virtualization. This technology is designed to assist with the virtual-to-physical translation of pages in a virtualized environment. Because this operation is one of the most common, by optimizing this function, performance is greatly enhanced. AMD virtualization products are available on both the Opteron and Athlon processor families.
The virtual machine that uses the hardware-assisted software virtualization model has become known as the Hardware Virtual Machine or HVM. This terminology will be used throughout the rest of this chapter and refers to the fully software virtualized model with hardware assist.

Paravirtualization

In paravirtualization, the guest OS is aware of and interfaces with the underlying host OS. A paravirtualized kernel in the guest understands the underlying host technology and takes advantage of that fact. Because the host OS is not faking the guest 100 percent, the amount of resources needed for virtualization is greatly reduced. In addition, paravirtualized device drivers for the guest can interface with the host system, reducing overhead. The idea behind paravirtualization is to reduce both the complexity and overhead involved in virtualization. By paravirtualizing both the host and guest operating system, very expensive functions are offloaded from the guest to the host OS.
The guest essentially calls special system calls that then allow these functions to run within the host OS. When using a system such as Oracle VM, the host operating system acts in much the same way as a guest operating system. The hardware device drivers interface with a layer known as the hypervisor. The hypervisor, which is also known as the Virtual Machine Monitor (VMM), was mentioned earlier in this chapter. There are two types of hypervisor: The type 1 hypervisor runs directly on the host hardware; the type 2 or hosted hypervisor runs in software.

Hybrid Virtualization Technology

Since Oracle Enterprise Linux (OEL5), Oracle has provided the ability to create a Hardware Virtualized Machine (HVM) that uses a few specific paravirtualized device drivers for network and I/O. This hybrid virtualization technology provides the benefits of a paravirtualized virtual machine with the additional hardware accelerations available within the Hardware Virtual Machine (HVM). This technology is still new but might be the future of virtualization.

The Hypervisor

The hypervisor is what makes virtualization possible. The hypervisor is the component that translates the virtual machines into the underlying hardware. The type of hypervisors that we are concerned with are the type 1 and type 2 hypervisors.

Type 1 Hypervisor

The type 1 (or embedded) hypervisor is a layer that runs directly on the host hardware, interfacing with the CPU, memory, and devices. Oracle VM and VMware ESX Server both use the type 1 hypervisor. The hypervisor treats the host OS in much the same way as a guest OS. The host OS is referred to as Domain 0 or dom0 and guests are referred to as Domain U or domU, as shown in Figure 13-1. Here you can see that that all virtual machines must go through the hypervisor to get to the hardware. The dom0 domain is a virtual system just like the domU virtual machines (but has more capabilities, as covered later in this chapter). Currently, the type 1 hypervisor is considered the most efficient and is the most recommended hypervisor.
fig13-1
FIGURE 1.   The type 1 hypervisor represented graphically
NOTE
Even though Oracle VM and VMware both use a type 1 hypervisor, these hypervisors are significantly different. VMware handles device drivers directly in the hypervisor; Xen handles them in dom0 or a driver domain.
As you can see from Figure 1, the dom0 domain does not differ much from other domains in the virtual environment, except that you access it differently and it is always enabled by default. In addition, dom0 has unlimited rights to hardware, whereas domU only has access through a layer of indirection and only to what dom0 grants it. Because the type 1 hypervisor is essentially part of the OS, it must be installed on the hardware itself and support the devices installed on the system.

Type 2 Hypervisor

The type 2 or hosted hypervisor runs as a program and is used for software virtualization. Because the type 2 hypervisor runs as a program, it neither has the same priority as the type 1 hypervisor, nor does it have the ability to access the hardware directly. Its main advantage is that you can install it on a variety of host systems without modification. The type 2 hypervisor works with both full software virtualization and hardware-assisted software virtualization. VMware Server is an example of a type 2 hypervisor. Recently Oracle has released a new product, Oracle VM VirtualBox. Oracle VM VirtualBox is a type 2 hypervisor–based product.

Leave a Reply