Introduction to Virtual Machines and Virtualization

Welcome to Part 1 of a series of blogs where I will be giving an overview of virtualization and virtual machines. Part 2 will cover containerization and containers. In Part 3, I will be comparing virtual machines and containers.

Virtualization and Virtual Machines are important concepts in I.T. With virtualization comes the ability to access nearly limitless computing resources. In fact, virtualization is the foundation of cloud computing.

What Is Virtualization?

Virtualization is the process of creating a virtual or software-based version of a computer. It simulates hardware functionality and creates a virtual computer system. You can create virtual resources such as a server, operating system, network or even storage. This allows you to run multiple operating systems simultaneously on a single machine.

How Does Virtualization Work

Virtualization is made possible through software called hypervisors. Hypervisors can sit on top of an operating system or they can be installed directly onto hardware, or "bare metal." Hypervisors take the physical resources and divide them up so that virtual environments can use them.

There are two types of hypervisors:

  • Type 1 hypervisor, also called a native or bare metal hypervisor, runs directly on the physical host machine. Examples of Type 1 hypervisors include Microsoft Hyper-V and VMware ESXi.

  • Type 2 hypervisor, also referred to as a hosted hypervisor, is installed on top of the host machine's operating system. Examples of Type 2 hypervisors include VMware Workstation and Oracle VirtualBox.

The job of a hypervisor is to dynamically allocate computing resources to each virtual machine that's running on top of it as needed.

What Is A Virtual Machine?

When a different operating system is operating on top of the primary operating system through virtualization, it is referred to as a virtual machine. A virtual machine, (VM for short), behaves like an actual computer. It's basically a simulation of a real, physical computer, meaning that is has its own CPU, memory, network and storage. You have your actual computer, which is considered the “host” for a VM, and then on top of that host, you have a hypervisor.

VMs are isolated from the rest of the system, therefore anything that is running inside a VM won’t interfere with anything else that is running on the host hardware.

Benefits of Virtual Machines

  • Multiple operating systems can exist at the same time, on the same machine, each isolated from each other

  • Security. If a virtual machine is somehow compromised, the threat will be limited to that particular VM, which can then be deleted or rolled back to a recent snapshot.

  • Lower hardware costs since you can run multiple OS environments on a single piece of hardware. Fewer machines also means you lower your power consumption.

  • Portability since it is possible to move VM's from one physical server to another.

In the next blog post we will explore containerization and containers.