Server Virtualization is the partitioning of a physical server into a number of small virtual servers, each running its own operating system. These operating systems are known as guest operating systems. These are running on another operating system known as the host operating system. Each guest running in this manner is unaware of any other guests running on the same host. Different virtualization techniques are employed to achieve this transparency.
Types of Server virtualization :
1. Hypervisor –
A Hypervisor or VMM(virtual machine monitor) is a layer that exists between the operating system and hardware. It provides the necessary services and features for the smooth running of multiple operating systems.
It identifies traps, responds to privileged CPU instructions, and handles queuing, dispatching, and returning the hardware requests. A host operating system also runs on top of the hypervisor to administer and manage the virtual machines.
2. Para Virtualization –
It is based on Hypervisor. Much of the emulation and trapping overhead in software implemented virtualization is handled in this model. The guest operating system is modified and recompiled before installation into the virtual machine.
Due to the modification in the Guest operating system, performance is enhanced as the modified guest operating system communicates directly with the hypervisor and emulation overhead is removed.
Example: Xen primarily uses Paravirtualization, where a customized Linux environment is used to support the administrative environment known as domain 0.
- Enhanced Performance
- No emulation overhead
- Requires modification to a guest operating system
3. Full Virtualization –
It is very much similar to Paravirtualization. It can emulate the underlying hardware when necessary. The hypervisor traps the machine operations used by the operating system to perform I/O or modify the system status. After trapping, these operations are emulated in software and the status codes are returned very much consistent with what the real hardware would deliver. This is why an unmodified operating system is able to run on top of the hypervisor.
Example: VMWare ESX server uses this method. A customized Linux version known as Service Console is used as the administrative operating system. It is not as fast as Paravirtualization.
- No modification to the Guest operating system is required.
- Slower due to emulation
- Installation of the new device driver is difficult.
4. Hardware-Assisted Virtualization –
It is similar to Full Virtualization and Paravirtualization in terms of operation except that it requires hardware support. Much of the hypervisor overhead due to trapping and emulating I/O operations and status instructions executed within a guest OS is dealt with by relying on the hardware extensions of the x86 architecture.
Unmodified OS can be run as the hardware support for virtualization would be used to handle hardware access requests, privileged and protected operations, and to communicate with the virtual machine.
Examples: AMD – V Pacifica and Intel VT Vanderpool provide hardware support for virtualization.
- No modification to a guest operating system is required.
- Very less hypervisor overhead
- Hardware support Required
5. Kernel level Virtualization –
Instead of using a hypervisor, it runs a separate version of the Linux kernel and sees the associated virtual machine as a user-space process on the physical host. This makes it easy to run multiple virtual machines on a single host. A device driver is used for communication between the main Linux kernel and the virtual machine.
Processor support is required for virtualization ( Intel VT or AMD – v). A slightly modified QEMU process is used as the display and execution containers for the virtual machines. In many ways, kernel-level virtualization is a specialized form of server virtualization.
Examples: User – Mode Linux( UML ) and Kernel Virtual Machine( KVM )
- No special administrative software is required.
- Very less overhead
- Hardware Support Required
6. System Level or OS Virtualization –
Runs multiple but logically distinct environments on a single instance of the operating system kernel. Also called shared kernel approach as all virtual machines share a common kernel of host operating system. Based on the change root concept “chroot”.
chroot starts during bootup. The kernel uses root filesystems to load drivers and perform other early-stage system initialization tasks. It then switches to another root filesystem using chroot command to mount an on-disk file system as its final root filesystem and continue system initialization and configuration within that file system.
The chroot mechanism of system-level virtualization is an extension of this concept. It enables the system to start virtual servers with their own set of processes that execute relative to their own filesystem root directories.
The main difference between system-level and server virtualization is whether different operating systems can be run on different virtual systems. If all virtual servers must share the same copy of the operating system it is system-level virtualization and if different servers can have different operating systems ( including different versions of a single operating system) it is server virtualization.
Examples: FreeVPS, Linux Vserver, and OpenVZ are some examples.
- Significantly lightweight than complete machines(including a kernel)
- Can host many more virtual servers
- Enhanced Security and isolation
- Virtualizing an operating system usually has little to no overhead.
- Live migration is possible with OS Virtualization.
- It can also leverage dynamic container load balancing between nodes and clusters.
- On OS virtualization, the file-level copy-on-write (CoW) method is possible, making it easier to back up data, more space-efficient, and easier to cache than block-level copy-on-write schemes.
- Kernel or driver problems can take down all virtual servers.
Types of Server Virtualization
Unlock the Power of Placement Preparation!
Feeling lost in OS, DBMS, CN, SQL, and DSA chaos? Our Complete Interview Preparation
Course is the ultimate guide to conquer placements. Trusted by over 100,000+ geeks, this course is your roadmap to interview triumph.
Ready to dive in? Explore our Free Demo Content and join our Complete Interview Preparation