How Virtualization Works

The goal of virtualization technology is to create an independent environment for different applications on a single hardware machine.

This is done by creating virtual instances of operating systems, applications, etc. designed to run directly on hardware.

The technique extends the capabilities of your machine and allows you to run multiple applications (especially operating systems) at the same time over a single hardware configuration.

A Virtual Machine (VM) is application software which is responsible for creating these virtual instances. The end users have the same look and feel on a VM as they would have on the actual physical hardware.

These VMs are portable, platform independent and sandboxed from the host system. A host can even run multiple VMs simultaneously on a single hardware configuration. But to create a VM we need substantial processing power, physical memory and network bandwidth.

The figure below, shows the logical architecture of a VM in which multiple guest operating systems run simultaneously on a single host machine.

Virtual Architecture

Virtual Architecture

To properly manage the working of VMs and maintain the integrity of virtual environments, Virtual Machine Monitor (VMM) or Hypervisor is used.

It can be a software agent, a firmware or a hardware device. The physical machine on which the VMM runs is called the host machine and each VM is termed as a guest machine. We would like to discuss some popular VMM/Hypervisors.

XEN

Xen is a Type 1, native or bare-metal hypervisor. It directly runs on the host’s hardware and therefore multiple instances of operating systems (either similar or different) can be installed on a single hardware machine.

We can consider it as a software virtualization layer that operates over the hardware and manages CPU, memory and interrupts.

It is just the next program that succeeds the execution of the Bootloader program. Xen is an open source project which is used in the AWS Cloud, server virtualization, Infrastructure-as-a-Service (IaaS), desktop virtualization, security virtualization, and so.

The figure below shows the Xen hypervisor architecture.

Xen hypervisor architecture

Xen hypervisor architecture

You can see that the hypervisor layer is directly installed on Physical Hardware. There is no need to pre-install any host operating system to run virtual machines.

Features of Xen

The features of Xen are as follows:

Memory ballooning

It is an advance management technique in which they hypervisor can claim the unused memory from one guest machine and share it with the other guest machines within a host. It therefore allows the amount of RAM required by guest VMs to exceed the actual amount of physical RAM available on the host.

CPU pools

It is a unique resource management feature of XEN version 4.2. This technique divides the physical cores on the machine into different pools, each with its own customizable CPU scheduler.

At runtime, a VM is assigned to one of the pools, but it can further migrate between any other pools through the course of its execution. Since the scheduler is customizable, requests can be made for different scheduling parameters for different VMs.

Remus fault tolerance

It is responsible for high availability in Xen. This is done by recurrently creating live backups of running VMs to the backup server which automatically activates in case of failure.

Virtual machine introspection

It is a security technique in Xen which audits the sensitive memory areas of guest machines using specialized hardware support with minimal overhead.

Kernel-based virtual machine (KVM)

KVM is an open source virtualization layer fused into the mainline Linux kernel. It converts a Linux operated machine into Type 1, bare-metal hypervisor that can run multiple but isolated virtual environments.

Since KVM is integrated in Linux Kernel, modules like memory management, CPU scheduling, input/output (I/O), device management, and so on are already built-in.

Each VM is treated as a standard Linux process which is scheduled by a typical Linux Scheduler with virtualized hardware.

The figure below shows a typical KVM architecture.

KVM Architecture

KVM Architecture

The KVM module is embedded with the Linux operating system, over which virtual machines run simultaneously with standalone Linux applications.

QEMU is an open source emulator for hardware virtualization. It stands for Quick Emulator and acts as a virtual machine monitor when executed using the KVM kernel module in Linux.

Features of KVM
Mandatory Access Control (MAC) security

Mechanism are implemented for the security of guest machines. VM Security and VM Isolation is provided using enhanced Linux features, namely, security-enhanced Linus (SELinux) and secure virtualization (sVirt).

Hardware and storage support

KVM is compatible with a wide variety of Linux certified hardware platforms, local disks and network-attached storage (NAS)

Live VM migration

It is a feature of KVM through which running VMs can be migrated between hosts without service interruption.

VMware

VMware (now a subsidiary of Dell Technologies) is a virtualization software provider based in Palo Alto, California. The company has gained its position among the key virtualization provides in the industry.

VMware classified their products in the following two categories:

  • Desktop applications
  • Server applications
Desktop applications

Desktop applications are compatible with almost all operating systems and provide three major applications which are as follows:

  • VMware workstation : It is a virtualized software package in which multiple instances of operating systems (either similar or different) are installed on a single hardware machine.
  • VMware fusion : It is a specialized product for Apple’s Mac OS X with additional compatibility.
  • VMware player : VMware player is the free counterpart to VMware workstation.
Server applications
  • VMware server : It is a freeware server software used to introduce virtualization over pre-installed operating systems.
  • VMware ESX server : It is an enterprise-level server that provides improved functionality with lesser system overhead over the VMware server.
  • VMware ESXi server : It is the same as the ESX Server except that the service console is interchanging with the BusyBox installation. Alternatively, is also operated on a very low disk space as compared to ESX.

The figure below shows the architecture of VMware.

VMware architecture

VMware architecture

As mentioned, it requires a console OS to be installed over the hardware. It creates a software-based virtualization layer over which multiple instances of operating systems can be hosted simultaneously. All the instances of the operating systems can be similar or different but they share the single hardware configuration.

Features of VMware
  • Fault tolerance : This feature provides high availability and fault tolerance by creating a copy of a primary virtual machine. The copy becomes active immediately in case of VM failure.
  • Distributed Switch (VDS) : It is a virtual switch that can span multiple ESXi hosts. This feature enables a significant reduction of on-going network maintenance activities and increasing network capacity.
  • Host profiles : This feature saves the record of valid and authenticated hosts. Later, the hosts are auto-deployed using this stored configuration.

VirtualBox

VirtualBox is a free, open-source, pre-built Binaries hypervisor developed by Oracle Corporation for X86 AND AMD64/Intel64-based machines.

It is a ‘type 2 hypervisor’ that requires a pre-installed operating system over which it runs.

Being a cross-platform virtualization software product, VirtualBox can run on Windows, Linux, Mac OS, Solaris OS and all operating systems that exist as shown in the figure below.

Virtual Box hypervisor

Virtual Box hypervisor

It is a very powerful tool and provides support from desktop machines to cloud environment datacenters.

Features of VirtualBox
  • No specialized hardware : Unlike Intel VT-x or AMD-V, VirtualBox doesn’t have any backward compatibility issues nor does it require any additional hardware resources to run.
  • Hardware support : Inspite of being a Type 2 hypervisor, VirtualBox provides a number of hardware compatibility features like Guest Multiprocessing, USB device support, full Advance Configuration and Power Interface (ACPI) support, Multiscreen Resolution, PXE Network Boot, and so on.
  • Remote Display Protocol (RDP) : It is a unique feature of a VirtualBox and is generally used for security purposes. Through RDP, remote access to a running virtual machine is given to a remote desktop client. The clients’ need to authenticate themselves using the RDP authentication mechanism before connecting to a server. Winlogon on Windows and Pluggable Authentication Modules (PAM) on Linux are examples of RDP authentication services.

Citrix

Formerly known as XenServer, Citrix is a virtualization solution provider for application, desktop and server virtualization built over the Xen virtual machine hypervisor. It is well known for its integration with cloud technologies like Software-as-a-Service (SaaS) and Desktop-as-a-Service (DaaS).

Citrix offers remote devices to access applications and resources through a centrally located server.

Being an open source and platform independent, the resources can be accessed from anywhere, any time and from any device.

The figure below, shows a Citrix XenServer architecture.

Citrix XenServer architecture

Citrix XenServer architecture

The architecture is similar to Xen Hypervisor, which is a the heart of Citrix systems.

Areas where Citrix is used
  • Desktop and application virtualization : Citrix XenApp provides application virtualization whereas Citrix XenDesktop, Citrix VDI-in-a-Box are tools for desktop virtualization.
  • Desktop-as-a-Service (DaaS) : Some useful DaaS and business applications include Worx mobile apps for secure email, browser, and document sharing and Citrix workspace suite for mobile workspaces.
  • Software-as-a-service (SaaS) : Podio, a cloud-based collaboration service, and OpenVoice for audio conferencing are SaaS offering by Citrix.
Features of Citrix
  • Any device , any time : Users have simple and secure access to resources regardless of location or device
  • Single instance management : Application and server images are stored, maintained and updated once in the datacenter and delivered on-demand.
  • High end security features : Like encrypted delivery, multi-factor authentication, built-in password management and activity auditing, etc. provide secure cloud infrastructure for delivering resources.
  • Scalability : XenApp has provided its efficiency to support more than 70,000 users, scale beyond 1,000 servers in a single implementation and ensure 99.999 per cent application availability. It also provides intelligent load and capacity management.