What is paravirtualization?

Paravirtualization is an enhancement of virtualization technology in which a guest operating system (OS) is modified prior to installation inside a virtual machine (VM). This lets all guest OSes within the system share resources and successfully collaborate rather than emulate an entire hardware environment.

With paravirtualization, virtual machines are accessible through interfaces similar to the underlying hardware. This capacity minimizes overhead and optimizes system performance by supporting the use of VMs that would otherwise be underutilized in conventional or full hardware virtualization.

Paravirtualization eliminates the need for the virtual machine to trap privileged instructions. Trapping, a means of handling unexpected or unallowable conditions, can be time consuming and lower performance in systems that employ full virtualization.

The main limitation of paravirtualization is that the guest OS must be tailored specifically to run on top of the virtual machine monitor (VMM) -- the host program that lets a single computer support multiple, identical execution environments.

How does paravirtualization work?

Paravirtualization attempts to resolve issues found in full virtualization. The primary difference between paravirtualization and full virtualization is the ability to make modifications to the guest OS in paravirtualization.

Furthermore, in paravirtualization, the guest OS is aware it is being virtualized. In full virtualization, the unmodified OS is unaware it is being virtualized, and sensitive OS calls are captured and translated using binary translation.

By granting the guest OS access to the underlying hardware, paravirtualization enables communication between the guest OS and the hypervisor, thus improving performance and efficiency within the system.

More specifically, the paravirtualization process consists of the guest OS being modified specifically for installation on a VM. This is necessary because unmodified guest OSes are unable to run on a VMM. The intent of the modification is to decrease the execution time required to complete operations that can be problematic in virtual environments.

In paravirtualization, the guest kernel is modified to run with the hypervisor. This frequently involves removing operations that only run on ring 0 of the processor with calls to the hypervisor, or hypercalls.

The hypervisor responds by performing the task for the guest kernel and supplying hypercall interfaces that can complete other important kernel operations -- such as interrupt handling, time keeping and memory management.

Uses of paravirtualization

Paravirtualization is an expansion of a technology that has existed for years in the IBM operating system. Xen, an open source hypervisor, incorporates paravirtualization. Xen virtualizes the memory and processor using an altered Linux kernel. It also virtualizes the I/O using custom guest OS device drivers.

Paravirtualization offers various performance advantages as well as efficiencies that offer improved scaling. It is useful in a variety of technical fields, including disaster recovery; capacity management; separating test systems and development environments; and transferring data from one system to another.

Advantages and disadvantages of paravirtualization

Applying paravirtualization can result in a variety of advantages:

  • Improved performance levels. Direct communication between the guest kernel and the hypervisor can boost efficiency and overall performance.
  • Manageable virtual server traffic. The thin software layer created in paravirtualization controls virtual server traffic by allowing a single guest OS to gain access to the physical hardware device while ceasing access for all other guest OS.
  • Lower virtualization overhead. Paravirtualization does not attempt to fully rebuild the hardware, resulting in lower overhead for projects.
  • Lower hardware limitations. Paravirtualization does not include device drivers because it utilizes the drivers already present in the guest OS. Therefore, organizations can take full advantage of the hardware in the server instead of being limited to hardware with available drivers, as is the case in full virtualization.

Along with its benefits, paravirtualization also has several disadvantages:

  • Lower open source capabilities. Modifications of the guest OS are necessary for any interaction with the paravirtualization interfaces to take place, limiting support to open source OSes like Linux.
  • Limited compatibility. Since paravirtualization cannot perform with unmodified guest OS, its compatibility and portability are minimal with systems like Microsoft Windows.
  • Added complexity. Significant support and maintenance issues might arise since the production environment requires complex guest kernel modifications.
This was last updated in November 2023

Continue Reading About paravirtualization

Dig Deeper on Containers and virtualization

Software Quality
App Architecture
Cloud Computing
Data Center