What are hypervisors?
When I started dealing with IT as a young student, enterprise services and applications were running on bare-metal systems. This creates a dilemma of running multiple services and applications on a single system with one operating system or deploying a hardware server for each application. Both approaches have considerable disadvantages in either security and stability or cost-efficiency and management efforts. Virtualization revolutionized computing systems, and hypervisor is a main component of virtualization. A hypervisor is software which creates an environment for running different operating system instances (or virtual machines) by virtualizing and emulating hardware. It allows the deployment of multiple isolated systems on a single hardware, which increases stability, security, and cuts costs. So, instead of having a separate hardware server for each application (like Active Directory, File Server, CRM software, Webserver, etc.), it is possible to deploy a hypervisor on one or a couple of servers and run all the above-mentioned services in virtual machines.
All hypervisors are divided into two types, called Type-1 and Type-2.
Type 1 Hypervisor: Advantages and Disadvantages
Type-1 hypervisor runs directly on hardware and doesn’t require any operating system. The classic examples of Type-1 are VMware ESXi, Citrix Hypervisor, ProxMox, XEN, XCP-ng. Such hypervisors are mostly used in business environments to virtualize company services. A Type-1 hypervisor is an operating system (in most cases modified *NIX) with built-in virtualization tools. It is designed to run and manage virtual machines and doesn’t allow running any other application directly on it (otherwise as a “normal” operating system). The hardware on which a hypervisor is installed does not need a monitor for video output, because all management operations are done over an embedded web interface. Microsoft Hyper-V is often listed as a Type-1 hypervisor, which is true, but other applications besides VMs can run on it. That’s why some people call Hyper-V Type 1.5 or hybrid. The same applies to KVM, which is a part of full-functional Linux.
- Best performance because the software is designed for bare-metal virtualization.
- High security, as no other applications are running on the hypervisor directly.
- High stability, as no other services or applications interfere with hardware. Fewer patches and updates are required.
- Additional features, like clustering, resource balancing, etc.
- Most Type 1 hypervisors have feature-rich web-interface, which means it can be managed from any web-browser.
- Type 1 hypervisors are more complicated to deploy and manage than Type 2
- Some hypervisors require hardware components from an approved hardware compatibility list.
- Most Type 1 hypervisors cannot be managed directly with monitor and keyboard. So, external devices (like laptop, desktop, mobile phone) with html browser is required for management.
- Only one Type-1 hypervisor can be deployed on single hardware.
Type 2 Hypervisor: Advantages and Disadvantages
Type-2 hypervisor runs on top of supported operating systems and uses the OS’s drivers to communicate with the hardware. Oracle Virtual Box, QEMU and VMware Workstation are examples of Type-2 hypervisors. Actually, the hypervisor of Type-2 runs inside OS as other applications and shares resources with them. Type-2 hypervisors are intended to run on a single computer and don’t support clustering or some other features (virtual storage organization, multiuser access, and management, etc.) except virtualization. Type-2 hypervisors are mostly used on personal computers and workstations for additional operating system environments. For example, an employee uses virtualization on a personal laptop to run a VM with corporate applications and network access.
- Hardware-agnostic, modern Type-2 hypervisors can run on any hardware, which is supported by the host OS.
- Easy to install and manage. It is installed as a normal application.
- Other applications and multiple Type-2 hypervisors may run parallel on top of OS.
- Lower performance than with Type-1, because of resource sharing with other applications and using hardware resources via the host OS.
- Less secure and stable. Crash of any other application may crash host OS.
- Poor on additional features.
Type 1 vs. Type 2 hypervisors
Despite both Type-1 and Type-2 hypervisors serving the same purposes – providing virtualized environments, there are differences in how they act and what purposes each type is suited for. The comparison below highlights their main differences.
|Type 1||Type 2|
|Deployment||Directly installed on hardware||Installed on operation system as an application|
|Hardware compatibility||Many vendors provide with hardware compatibility list||Hardware-agnostic|
|Setup||Some technical knowledge is required.||Easy, same way as other application for host OS|
|Management||Mostly via web interface||Management Console as application on host OS|
|Performance||All resources are devoted to virtualization. Hypervisor has direct access to hardware.||Slower performance because of additional host OS layer. Hypervisor doesn’t have direct access to hardware.|
|Security||Hypervisor and all VMs are fully isolated. No additional applications are installed on hypervisor what lowers security risk||Guest OS is isolated from Host OS. Other applications may have vulnerabilities, what increase security risks.|
|Stability||Only hypervisor failure can crash guest VMs||Hypervisor and OS failure or even application failure may crash VMs|
|Multipurpose usage of hardware||Hardware is used only for virtualization||Other applications may run on host OS besides the hypervisor.|
|Additional features||Clustering, embedded software-defined storage, built-in disaster recovery capabilities, central management of multiple hypervisors, role-based access etc.||No other features besides virtualization.|
Free vs. Paid
Most vendors have both paid and free versions of hypervisors independent of the type. So, we have paid Windows Server with Hyper-V role and free Microsoft Hyper-V server in Type 1 family; free VMware Player and paid VMware Workstation in Type 2 family. Free versions have limited functionality, but may be used for basic virtualization, where there is no demand for extended features. Products such as ProxMox (Type 1) and Oracle Virtual Box (Type 2) are completely free without any limitations, but certainly comes without support (or paid support). KVM is open-source and free, but Linux distributive where it runs might be paid or have paid support.
To wrap things up, your use case scenario should be the primary factor to consider when choosing the appropriate hypervisor. So, for large-scale apps demanding high performance and security, Type-1 Hypervisor is the best choice. On the other hand, consider using a Type-2 Hypervisor if you are just experimenting or working with a few VMs on your workstation. This is due to their simple setup and management. Therefore, the main goal is to choose the best hypervisor type that matches your needs.