What I Learned About Virtualization & Hypervisors
Virtualization means instead of using multiple physical servers to run different services like for emails one server, for database another server when we use one single physical server with different operating systems on it to run different services is called virtualization.
This virtualization is done by using a software called hypervisor. This will allow one server to run multiple virtual machines and allocate and share the system resources like storage space, RAM, and CPUs.
Types of Hypervisors
Hypervisors are of two types: Type 1 and Type 2.
Type 1 Hypervisors: Installed on bare metal (devices without existing software or operating systems). Examples include VMware ESXi, Citrix XenServer, and Microsoft Hyper-V.
Type 2 Hypervisors: Installed on systems with an existing operating system. Examples include Oracle VM VirtualBox, Microsoft Virtual PC, and VMware Workstation.
For Type 1 hypervisors, you need to install the hardware first (motherboard, RAM, CPUs, and storage drives) before installing the hypervisor directly on the bare metal server. No operating system is installed on this server. Once the hypervisor is in place, we create virtual machines (VMs), allocating hardware resources and loading operating systems onto these VMs. These virtual machines are replicas of physical computers, allowing us to deploy applications later. Type 1 hypervisors are primarily used at the enterprise level and act as an operating system themselves.
Type 2 hypervisors are commonly used on personal computers, allowing users to test different operating systems or projects. For example, I can install Oracle VirtualBox on my Windows laptop and run a Linux operating system alongside it.
The Role of Hypervisors
When running a hypervisor, we have a host, the actual physical server running the hypervisor software. This host runs different virtual machines, which exist only in the memory of the hypervisor. In cloud computing, providers run hypervisor software on physical servers, granting companies access to build their virtual machines. Companies won’t know which data center or machine hosts their VMs.
Features of Hypervisors
A notable feature is live migration. If there's an issue with the host server, we can move virtual machines to another host without turning them off. The migration time depends on bandwidth and VM size, and this process is managed by an administrator.
Another useful feature is snapshots or checkpoints, allowing us to capture the VM's current state before making changes. If new changes aren't suitable, we can revert to the previous state using these snapshots. However, they consume more storage than the VM itself, and if the VM's drive is damaged, the snapshots are lost. Traditional backups are more reliable than snapshots.
Benefits of Virtualization
Virtualization is cost-effective, enabling portable VMs that can be transferred between servers, maximizing computing resource use. It also provides backup and recovery options, routing traffic to backup servers if one goes down. Hypervisors automatically adjust resources for VMs.
Virtualization of the Desktop
This utilizes Virtual Desktop Infrastructure (VDI). When a user logs in, the server sends a copy of the VM to the user’s machine. The user’s laptop acts as a terminal. Since the desktop environment runs on a remote server, files should be saved on a network drive, as they won’t be saved upon logging off.
Key Virtualization Concepts
Virtual CPU: Part of the physical CPU allocated to run VMs.
Virtual Network: It is a similar copy of the physical network but is software-designed. It lets the virtual machines communicate with each other. In this, there can be two types of communication: Two virtual machines hosted on one machine communicating with each other. One of the virtual machines trying to communicate with the outside world (the internet). In the second scenario, VM1 will place the traffic on the physical network and then communicate with the internet. In the first scenario, where two virtual machines hosted on the same machine need to talk, older hypervisors used to send traffic through the physical network, with the adapter sending it to the switch, which then sent it to the other virtual machine. This long process has been improved in newer hypervisors by installing a virtual switch that exists only in the memory of the computer. Now, instead of the traffic going through the physical network, VM1’s traffic will be sent to the virtual switch, which will route it to VM2.
Virtual Storage: Combines all physical storage units (SSD, hard drives) into a single unit.
Virtual Graphics: Virtualization of the physical GUI, allowing multiple VMs to share a single physical GUI.
Virtual Memory: A memory management technique that moves less frequently accessed files to a separate storage space (like page files), enabling large applications to run without exhausting memory.
Common Issues in Virtualization and Troubleshooting
Access Denied Errors: These may occur when connecting to VMs if the hypervisor lacks the proper permissions for the VM files and folders.
Time Accuracy Issues: Ensuring the VM clock is accurate is crucial.
Antivirus Impact: Antivirus scanning large VM files can slow performance, so optimizing settings is essential.
Graphics and Resource Configuration: Proper GPU settings and ensuring adequate CPU and memory for VMs are important.
Unique Identifiers: Each VM must have a unique name, IP address, and MAC address.
Firewall Settings: Proper software firewalls on both host and guest machines can prevent network performance issues.
Subscribe to my newsletter
Read articles from Sharon Jonallagadda directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Sharon Jonallagadda
Sharon Jonallagadda
Pursuing my Master’s in IT. Documenting my journey as I work towards securing an internship and a full-time role. Sharing the knowledge and experiences I gain along the way.