In the realm of virtualisation and cloud computing, the hypervisor is a critical component that enables the seamless operation of multiple virtual machines (VMs) on a single host. While virtualisation is a technology, the hypervisor is its actual implementation. In this beginner’s guide, we will explore the fundamentals of hypervisors, their types, and how they differ from container runtimes. We will also review some of the leading hypervisors available today.
A hypervisor is a software or hardware component that enables the creation and management of virtual machines. It abstracts the underlying physical resources, such as processors, memory and devices, and allows multiple VMs (guests) to run simultaneously on a single physical machine (the host) while ensuring full resource separation. Each VM operates as a self-contained entity with its own operating system, kernel and applications. Hypervisors play a crucial role in maximising hardware utilisation. They improve an organisations’ flexibility, and reduce data centre costs
There are two primary types of hypervisors that are commonly used these days:
While both hypervisors and container runtimes facilitate the creation of virtual entities, they serve different purposes, and their way of working differs slightly underneath.
As explained earlier, hypervisors virtualise hardware resources, allowing multiple VMs to run independently on a single server. Each VM includes its own complete operating system (OS), making it possible to run diverse workloads on the same hardware and host OS. This isolation provided by the hypervisor ensures a high level of security but comes with a slight performance overhead. Traditional VMs are ideal for legacy, monolithic applications that haven’t been re-architected yet or are not planned to be, as well as various types of resource-intensive workloads, such as data analytics.
Containers, on the other hand, operate at the application level only, enabling the packaging and isolation of individual applications and their dependencies. Container runtimes, like Docker and containerd, share the kernel of the host and don’t virtualise the underlying hardware. Containers are ideal for deploying modern cloud-native applications based on the microservice architecture, enabling scalability and rapid deployment.
Several hypervisors have garnered widespread adoption in the tech industry. Some of the leading options include:
Now that you’ve got some basic understanding of what a hypervisor is, it is time to try it out. Hypervisors can best be experienced in conjunction with a robust cloud platform. Therefore, in the following steps, we’ll walk you through the necessary steps to install OpenStack Sunbeam on your Ubuntu machine with minimal effort. OpenStack is the world’s most popular open source cloud platform, and Sunbeam is the simplest possible way to get started with OpenStack. Sunbeam uses the KVM hypervisor underneath.
Start by grabbing a fresh physical or virtual machine (yes, you can do nested virtualisation) with 4+ core amd64 CPU, 16 GB of RAM, 50 GB of storage and the latest Ubuntu Server LTS installed. Then follow the instructions below:
In order to install OpenStack, execute the following command:
$ sudo snap install openstack
In order to install all necessary dependencies, execute the following command:
$ sunbeam prepare-node-script | bash -x && newgrp snap_daemon
In order to bootstrap the cloud, execute the following command:
$ sunbeam cluster bootstrap --accept-defaults
This command takes a while to finish. Be patient.
In order to configure the cloud with default options, execute the following command:
$ sunbeam configure --accept-defaults --openrc demo-openrc
For more advanced scenarios, refer to guided installation instructions.
In order to launch your first VM, execute the following command:
$ sunbeam launch ubuntu --name test
Sample output:
Access instance with `ssh -i /home/ubuntu/.config/openstack/sunbeam ubuntu@10.20.20.16`
At this point, the VM should be accessible over the SSH protocol. In order to connect to it, execute the command from the output:
$ ssh -i /home/ubuntu/.config/openstack/sunbeam ubuntu@10.20.20.16
That’s it. You’re connected to the VM. You can use regular shell commands to execute various tasks.
$ uptime
11:08:36 up 2 min, 1 users, load average: 0.05, 0.05, 0.01
Hypervisors are an essential component of virtualisation technology, enabling efficient utilisation of hardware resources and facilitating the management of guest VMs. Out of various hypervisors available out there, the KVM hypervisor stands out for its cost-effectiveness and unparalleled performance. To truly harness the potential of virtualisation in your infrastructure without hassle, use extensions like OpenStack and Sunbeam.
Canonical is continuously hiring new talent. Being a remote- first company, Canonical’s new joiners receive…
What is patching automation? With increasing numbers of vulnerabilities, there is a growing risk of…
Wouldn’t it be wonderful to wake up one day with a desire to explore AI…
Ubuntu and Ubuntu Pro supports Microsoft’s Azure Cobalt 100 Virtual Machines (VMs), powered by their…
Welcome to the Ubuntu Weekly Newsletter, Issue 870 for the week of December 8 –…
Canonical is pleased to announce security patching and support for Valkey through the Ubuntu Pro…