While information technology continues to evolve rapidly, virtualization remains a cornerstone of modern computing, enabling businesses to maximise resource utilisation, enhance flexibility, and reduce the total cost of ownership (TCO). It is a key building block of the cloud computing paradigm, and millions of organisations use it daily worldwide. All existing cloud platforms, such as AWS, Azure, Google or OpenStack, use virtualization underneath. While it is evident that other cutting-edge technologies, like containers, are ruling the game these days, virtualization remains a relevant technology for almost every enterprise.
In this blog, we will delve into the concept of virtualization and discuss the benefits it brings to organisations all over the world. We will also help you get some hands-on experience with virtualization using a friendly cloud platform.
Virtualization under the hood
At its core, virtualization is the abstraction of computing resources from the hardware layer, allowing multiple virtual environments to run simultaneously on a single physical machine (the host) while ensuring full resource separation. These virtual environments, known as virtual machines (VMs) or guests, act as self-contained entities with their own operating systems, kernels and applications.
In simple terms, virtualization enables you to create a virtual copy of your physical entities. This includes servers, desktops, mobile phones and various types of network devices, such as firewalls, routers and gateways.
The hypervisor is one of the key components of virtualization technology. It is a software layer that sits between the hardware and the VMs, managing resource allocation, scheduling, and communication. Among various hypervisors available, Ubuntu KVM (Kernel-based Virtual Machine) stands out for cost-effectiveness, providing robust virtualization capabilities to infrastructure engineers. Its native integration with the Linux kernel ensures sufficient performance while ensuring interoperability with various guest operating systems.
The benefits of virtualization
Virtualization brings numerous benefits to organisations of any size, making it a preferred technology for decision-makers seeking infrastructure optimisation. In short, the benefits of virtualization can be summarised as follows:
- Cost reduction – One of the primary advantages of virtualization is the ability to consolidate multiple workloads into a single physical host. This reduces hardware costs, data centre space requirements, and energy consumption, leading to cost savings.
- Resource isolation – VMs are isolated from each other and the host system, providing enhanced security and stability. This isolation prevents software conflicts and ensures that issues in one VM do not affect others.
- Hardware abstraction layer – In most of the cases VMs don’t have direct access to host devices and can only consume those resources through virtualized device drivers. This brings an additional layer of security by making it harder for rogue guest processes to break out and get control of the hypervisor.
- Flexibility and scalability – VMs can be easily provisioned, modified, and deleted, allowing for rapid scalability and adaptability to changing workloads. This agility is crucial in dynamic environments like development and CI/CD.
- Snapshotting and cloning – Virtualization allows users to take snapshots of their VMs anytime, enabling quick backups and easy recovery in case of system failures. Cloning VMs further simplifies the templating process, serving the purpose of creating identical instances.
Virtualization vs containerization
With the rise of containerization technologies like Kubernetes, it is essential to understand how virtualization and containerization differ and how both coexist harmoniously to serve different purposes.
Virtualization focuses on running multiple VMs on a host machine, each with its dedicated OS, kernel and virtual hardware. This approach ensures complete isolation between VMs, making it suitable for applications with different requirements and strict security obligations.
On the other hand, containerization abstracts the OS-level, allowing multiple containers to share the same host OS kernel while maintaining their independent runtime environments. Containers are lightweight, start quickly, and consume fewer resources than VMs, making them ideal for microservices and modern cloud-native applications.
While containers excel in certain scenarios, virtualization remains relevant for other use cases. Those include:
- Legacy applications – Virtualization enables running legacy monolithic applications that can’t be re-architected based on cloud-native principles without making a significant investment.
- Mixed workloads – When a mix of legacy and modern applications coexist, VMs efficiently manage these diverse workloads.
- Resource-intensive workloads – Resource-intensive applications, such as data analytics and high-performance computing, may benefit from the resource isolation provided by VMs.
Get started with virtualization on Sunbeam
Now that you’ve got some basic understanding of virtualization principles, it is the highest time to try it out. The benefits of virtualization 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. While OpenStack is the world’s most popular open source cloud platform, Sunbeam is the simplest possible way to get started with OpenStack.
Start by grabbing a fresh physical or virtual machine (yes, you can do nested virtualization) 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
Bootstrap the cloud
In order to bootstrap the cloud, execute the following command:
$ sunbeam cluster bootstrap --accept-defaults
This command takes a while to finish. Be patient.
Configure the cloud
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.
Launch a VM
In order to launch your first VM, execute the following command:
$ sunbeam launch ubuntu --name test
Access instance with `ssh -i /home/ubuntu/.config/openstack/sunbeam email@example.com`
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 firstname.lastname@example.org
That’s it. You’re connected to the VM. You can use regular shell commands to execute various tasks.
11:08:36 up 2 min, 1 users, load average: 0.05, 0.05, 0.01
Take the next step
Virtualization continues to be a vital technology these days, offering unparalleled flexibility, resource efficiency, and full isolation for diverse types of workloads. Together with the right set of technologies, including KVM hypervisor, OpenStack and Sunbeam, Ubuntu serves as a cost-effective, production-grade aggregation platform, empowering businesses to harness the true potential of virtualization in their infrastructure without any hassle.
If you’re looking to unlock new horizons with easy-to-use virtualization tools :
- Visit our website to read more about Sunbeam and OpenStack.
- Learn virtualization through a series of tutorials for beginners.
- Install Sunbeam on your workstation in five simple steps.
- Watch our webinar and build your own cloud in under an hour.
- Get in touch with Canonical for commercial support on Ubuntu.