A simple definition of virtualization is the ability to run multiple operating systems (OS) on one physical system. There are multiple ways of doing this (type-1 and type-2 hypervisors [we will learn about these]).
A more complex definition of virtualization would be using software that (a hypervisor) that mimics hardware functionality. The ability to mimic hardware functionality provides the ability to run multiple OSs on a single physical system.
There are many reasons that we might want to run a virtual machine. But, before we can in to these details we need to first learn about what a hypervisor is.
A hypervisor is software that provides the ability to create and run virtual machines (VMs). A hypervisor provides the ability to run multiple OSs on a single system. The hypervisor provides the ability to share the physic systems resources (memory, processing power, disk space, etc.) with each VM.
A type 1 hypervisor you will hear often referred to as a 'bare-metal hypervisor'. This is due to the fact that a type 1 hypervisor is installed directly on top of a physical server. A type 1 hypervisor does not require an OS or any software to be installed. A type 1 hypervisor is itself a very basic OS, which provides the ability to run VMs. An enterprise environment will typical use type 1 hypervisors.
Examples of type 1 hypervisors:
KVM (Kernel-Based Virtual Machine)
Red Hat Enterprise Virtualization (RHEV)
Citrix XenServer
Proxmox
Microsoft Hyper-V
VMware vSphere/ESXi
SmartOS
A type 2 hypervisor is also referred to as a hosted hypervisor. This is due to a type 2 hypervisor is installed on an operating system. A type 2 hypervisor is a piece of software that your OS runs and this supports the running of VMs.
Examples of type 2 hypervisors:
VMware Workstation
VMware Fusion
Oracle Virtual Box
At first you might wonder why would you want to virtualize an entire OS? It seems to be complex and not needed as you could just run a server for each service you required. Let us image that you needed to run the following services for your company:
An external webserver
An internal webserver
Network Area Storage (NAS) system
Email Server
DNS Server
DHCP Server
I know that some of these items you could purchase a server appliance to perform these duties, but you are a small start up company and are looking to save costs by implementing your own services using Linux as much as possible. Each server would not need to be the same hardware, so you could customize each server as needed for its usage. For example, a DNS Server and DHCP Server would not need a lot of storage, but a NAS system you'd want to have large amount of storage. To keep things simple let us say that each server you purchase is $5,000. I did a quick server customization on Dell.com to see what we could get in our price range. Here are the basic hardware specs:
Intel Xeon Silver 4310 12 Cores/24 Threads
32 Gigs of Memory
2 TB SATA Hard drive
You require 6 servers for a total of $30,000. With the 6 servers you'd also require more electricity usage (air conditioning, electricity to run each server, battery backup for power outages, maintenance contracts, etc.). An article written in 2013 from ZDNet states that a server on average costs about $732. If we calculate inflation since 2013 to 2022 this is about $931. For each year we run these servers that is an additional cost of $5586 for electricity only!
Let us look at the cost of running each of these services as a VM on a single server. Let us purchase a server for about $20,000 (this is already $10,000 in savings). Again, I specked something out at Dell.com. Here are the basic hardware specs:
Two Intel Xeon Silver 4316 20 Core/40 Threads
256 gigs of Memory
Two 3.84 TB SSD SATA (storage)
One 480 GG SSD SATA (for OS installation)
This server has more storage, a ton more processing power, and a lot more memory. You would easily be able to run the 6 services you need on this one server. This would require a bit more electricity to run, but we would not approach the $5586 amount. Also, we would not need to run the AC as much as this is only a single server and we would only need to have enough battery back up for one server instead of six. Also, the maintenance contracts would be for only one server and not six. As you can see this would be a great deal of savings. This is a major benefit of learning about virtualization is that we can save money.
Another major benefit is that the footprint to house one server is a lot smaller than the need to house six. If your company grows reducing the physical space can also help reduce cost (you won't need as much building space, so you can rent a small buildering saving money).
Having both reduced costs for hardware, energy and space are three great reasons to learn about virtualization. Also, this is the way the industry has moved. Google, Amazon, Apple, Microsoft, Oracle and more all use virtualization technology!
Enough about servers already, why might you want to run a VM on a desktop? That doesn't seem like something that makes much sense! There are several reasons you might wish to run a VM on your desktop (or laptop):
You wish to test out a new OS.
Test a new piece of software.
Determine how an upgrade could effect a production system.
Conduct Research.
Expand the capabilities of your home computer by running multiple OSs.
Enhance your skillset for job growth and be a life long learner.
Let us look at each of these items individually:
You are currently running Windows 10 and want to determine how different Windows 11 is. You don't have a spare computer that you could use to install Windows 11 on, but you know that you can install Windows 11 as a VM. You can take the time to install Windows 11 as a VM and learn how it differs from Windows 10 and what software you use might need to be upgraded.
Your company uses MS Access 2016 and realizes this software is extremely out of date. They want to upgrade to the latest version of MS Access, but want to make sure that the update version (MS Access 2019) is compatible with their current desktop OS installations and other database software. To test this you could create a VM that mirrors the current desktop OS installation with the upgraded MS Access 2019 software. You could then thoroughly test to make sure the upgraded version of MS Access does not cause any unintended situations.
You have a VM running on a type 1 hypervisor and you need to determine if an OS update might cause any issues. You could perform this upgrade on your type 2 hypervisor and performs tests to make sure the upgrade is able to be completed successful and does not cause any unexpected issues.
You are a security consultant and a company has hired you to test their network security. You will probably want to run VMs while conducting research or looking for exploits within their network.
You have an iMac at home that runs MacOS. Though, you realize that some times you need a Windows only application, so to overcome this you install Windows 10 as a VM and install the Windows only application within the VM.
You want to move up the career ladder at your company. and to do this you need to enhance your skill set and obtain some certifications. You learn, study and obtain the require certifications with the help of VMs.
Another reason to learn about virtualization technology is that in other courses I teach I use a lot of VMs (ICS 231, ICS 281 and ICS 282) and having this knowledge will help you be successful in those courses too!