What is virtualization?
Tags: programming, career, cloud, computerscience
Published: 2021-10-15 20:46:38

We’re only a couple of months away from the new year, which means it’s time to start looking ahead to the tech trends that will dominate the software industry in 2022. As the new year approaches, we want to help you get familiar with upcoming trends so you can be prepared and start taking your skills to the next level. Today, we’ll discuss *virtualization*. If you’re looking to get into the cloud space, it’s important to get on top of this trend! We’ll discuss what virtualization is, why it’s important, how it works, and much more.

Let’s get started!

**We’ll cover**:
* [What is virtualization?](#whatisvirtualization)
* [Virtual machines and hypervisors](#vmhypervisor)
* [How does virtualization work?](#howvirtualizationworks)
* [Different types of virtualization](#typesofvirtualization)
* [Wrapping up and next steps](#nextsteps)

<a name="whatisvirtualization"></a>

## What is virtualization?

Virtualization is a fundamental aspect of cloud computing. Virtualization technology allows us to **use the features of a physical machine across multiple virtual environments**, or virtual machines (VMs). Virtualization software creates an abstraction layer over computer hardware. The hardware elements of a physical computer, such as memory, storage, and processors, can then be partitioned into different VMs. VMs operate just like regular computers, and each VM has its own operating system. 

Cloud providers take advantage of the powerful features of virtualization to best serve their customers. You can buy the computing resources that you need when you need them, and you can scale them when your workload increases or decreases. There are a lot of **different virtualization tools** and software on the market from big tech companies such as Microsoft, IBM, Red Hat, Intel, AWS, and VMware. There are open-source offerings, along with public, private, or hybrid cloud services available, so we can choose the tools that best fit our needs. 

### Benefits of virtualization

Some of the main benefits of virtualization include:

* **Security**: We can use virtual firewalls to secure data and isolate our apps so they’re protected from various threats. Virtualization enables automated provisioning, which allows for more security and visibility across physical or virtual applications.

* **Reliability**: We can rely on our virtual environments to efficiently handle disaster recovery operations and perform any necessary backups or retrieval operations.

* **Cost savings**: Virtualization software is less expensive and requires less hardware to run. 

* **Testing**: With virtualization, our environment is split into various VMs. We can replicate those VMs to perform any necessary testing without affecting the actual production environment. 

* **Efficiency**: Since we have fewer physical servers, we don’t have to spend as much time maintaining physical machines. We can perform any operations we need to within our virtual environment, which boosts productivity.

* **Scalability**: With virtualization, it’s easy to scale our virtual cloud environment. We can automate scaling as needed to accommodate for growth to ensure that the appropriate resources are available.

* **Disaster recovery and downtime**: We can replicate VMs in case of a disaster, which enhances resiliency and reduces downtime.
<br>

<a name="vmhypervisor"></a>
## Virtual machines and hypervisors

Virtual machines and hypervisors are two important concepts in virtualization. They both play a major role in how virtualization works. Let’s discuss what virtual machines and hypervisors are, and then we’ll dive deeper into how virtualization works.

### Virtual machines

A virtual machine is a virtual environment that acts as a **virtual computer system**. It has its own memory, network interface, storage, operating system, and CPU. Instead of using physical hardware to manage, run, and deploy programs and applications, it uses virtual hardware. To create a virtualized environment, we have a physical *host* machine, and we can run multiple virtual *guest* machines on the host machine. Since each VM has its own operating system, the guest machines function separately from each other even though they run on the same host machine. VMs are very portable, and they allow us to easily scale our applications to distribute heavy workloads.

### Hypervisors

A hypervisor, or virtual machine monitor (VMM), is a **software we can use to create and run VMs**. Hypervisors use physical resources to allow us to virtually use and share system resources to support multiple guest VMs. When we use a hypervisor, we can run different operating systems side by side and still share the same virtualized hardware resources. They allow us to separate physical resources from virtual environments. There are two main types of hypervisors: **bare metal** and **hosted**.

Bare metal hypervisors are installed **directly on the physical server** where the operating system is normally installed. They act as lightweight operating systems, and they’re mainly used in virtual server situations. Hosted hypervisors **run on top of the operating system** of the host machine. They run as a software layer on top of an operating system just like other programs.
<br>

<a name="howvirtualizationworks"></a>

## How does virtualization work?

As we discussed in the previous section, we use hypervisors to **separate physical resources for our virtual environments**. We can use a bare-metal hypervisor or a hosted hypervisor depending on our needs. Our hypervisor can either sit on top of an operating system or be installed right onto hardware. After setting up hypervisors, we can use them to divide resources across our virtual environments. Then, we can access and use these resources on our guest VMs.
<br>

<a name="typesofvirtualization"></a>

## Different types of virtualization

There are multiple types of virtualization that allow us to execute various tasks. Let’s take a look at some of the different types:

### Desktop virtualization

With desktop virtualization, we can **deploy simulated desktop environments** to multiple physical machines simultaneously. This means that we can execute updates and configurations on all of our virtual desktops at the same time. There are two types of desktop virtualization: local desktop virtualization and virtual desktop infrastructure (VDI).

**Local desktop virtualization** creates a virtual desktop environment and operating system that is separate from the user’s device. This means that we can access our desktop environment from any other device. A **virtual desktop infrastructure (VDI)** allows us to host multiple desktop environments on a single server. This means that we can access various operating systems from a single device without having to install multiple operating systems.

### Network virtualization

Network virtualization simplifies network management because it allows us to **abstract our hardware elements** into software and manipulate them without affecting any underlying physical hardware. We can use network virtualization to create things like virtual networks, firewalls, and load balancing features.

### Data virtualization

Data virtualization tools allow us to **consolidate all of our data** into one source. It also allows our applications to access data from various sources, with different formats, in multiple locations, whether that’s in the cloud or in on-premises systems. Data virtualization enables us to successfully manage, deliver, and integrate data in real-time. 

### Operating system virtualization

Operating system virtualization allows us to **separate applications from the operating system**. Our system hardware runs multiple instances of various operating systems at the same time, which allows us to run applications with different operating systems on a single computer. It’s also a great way to run Linux and Windows environments side-by-side if needed. 

### Application virtualization

Application virtualization allows us to **set up remote applications on a server** and then send them to a user’s device. With application virtualization, we can access applications from devices other than the one on which the application is installed. We can run our application software without it being directly installed on the operating system of our device. 

> **Other types of virtualization include**: 
> * Server virtualization
> * Storage virtualization
> * CPU virtualization
> * GPU virtualization
> * Linux virtualization
> * Cloud virtualization
> * Data center virtualization
<br>

<a name="nextsteps"></a>

## Wrapping up and next steps

Congrats on taking your first steps with virtualization! Virtualization is a fundamental concept in the cloud computing world, and it continues to grow in popularity. Virtualization software allows us to efficiently use and divide physical computer hardware across multiple virtual environments, so we can get the resources we need when we need them. We’ve only scratched the surface on this fundamental cloud computing concept. There’s still so much more to learn about operating systems and virtualization, including:

* Process API
* Direct execution
* Address translation

To get started learning these concepts and more, check out Educative’s course [**Operating Systems: Virtualization, Concurrency & Persistence**](https://www.educative.io/courses/operating-systems-virtualization-concurrency-persistence). In this course, you’ll cover the three main concepts of operating systems: virtualization, concurrency, and persistence. You’ll also get hands-on practice with I/O devices and file systems. By the end, you’ll have mastered everything you need to know about operating systems, and you’ll be ready to take on this tech trend in 2022.

*Happy learning!*
<br>

### Continue learning about cloud concepts
* [Roadmap to cloud jobs: How and why to become a cloud engineer](https://www.educative.io/blog/roadmap-to-cloud-engineer-jobs)
* [What is cloud-native? What to know for your interview](https://www.educative.io/blog/cloud-native-interview)
* [What is the cloud? Beginner's guide to cloud computing concepts](https://www.educative.io/blog/beginners-guide-cloud-computation)