This chapter covers virtualization concepts and hypervisors, a core topic in CompTIA A+ 220-1101 exam domain 4.1 (Virtualization Cloud). You'll learn the fundamental principles of virtualization, the types of hypervisors, and how virtual machines work. Expect 3–5 exam questions on this topic, focusing on hypervisor types, resource allocation, and virtualization benefits. Mastery of these concepts is essential for understanding cloud computing and modern IT infrastructure.
Jump to a section
Think of a physical server as a single-family house with its own plumbing, electrical system, and foundation. In the house, you can only have one family living there at a time because all the resources (water, electricity, space) are dedicated to that family. Now consider an apartment building. The building has one physical foundation, one main water line, and one electrical connection to the grid. But inside, the building is divided into separate apartments, each with its own kitchen, bathroom, and living space. The building's super (the hypervisor) manages the allocation of resources: it ensures that when Apartment 2A turns on their microwave, the electrical panel doesn't trip for the whole building. Each apartment has its own lock and key (virtual machine isolation), and the residents (operating systems) think they have the entire building to themselves. If a resident in 2A causes a flood (a crash), the super can shut off water to that apartment without affecting the others. The hypervisor is the super who decides how much of the building's total water pressure, electrical capacity, and space each apartment gets, and can even move a tenant to a different building (live migration) without them noticing. This analogy directly maps to how a hypervisor abstracts physical hardware (CPU, memory, storage, network) into virtual resources for each VM, while maintaining isolation and efficient resource sharing.
What is Virtualization and Why Does It Exist?
Virtualization is the process of creating a software-based (virtual) representation of a physical resource, such as a server, storage device, or network. The primary goal is to abstract the physical hardware so that multiple operating systems and applications can run on a single physical machine, sharing its resources efficiently. Before virtualization, each physical server typically ran a single operating system and application, leading to low utilization (often 5-15% of CPU capacity). Virtualization allows consolidation, reducing hardware costs, power consumption, and physical space. It also enables rapid provisioning, disaster recovery, and isolation between workloads.
How Virtualization Works Internally
At the heart of virtualization is the hypervisor (also called a Virtual Machine Monitor, VMM). The hypervisor is a software layer that sits between the physical hardware and the virtual machines (VMs). It manages access to the underlying hardware resources: CPU, memory, storage, and network. Each VM contains a guest operating system and its applications, and the hypervisor provides each VM with a set of virtual hardware components (virtual CPU, virtual memory, virtual disk, virtual network interface). The guest OS believes it is running on real hardware, but all its instructions are actually processed by the hypervisor, which translates them to the physical hardware.
There are two main types of hypervisors: Type 1 (bare-metal) and Type 2 (hosted).
Type 1 Hypervisor (Bare-Metal): Installs directly on the physical hardware, with no underlying operating system. It acts as a lightweight operating system itself, managing VMs directly. Examples: VMware vSphere/ESXi, Microsoft Hyper-V (when installed as a role on Windows Server, but can also be bare-metal), Citrix XenServer, KVM (Linux kernel-based). Type 1 hypervisors are used in data centers and enterprise environments because they offer high performance, low overhead, and direct access to hardware.
Type 2 Hypervisor (Hosted): Runs on top of a host operating system (e.g., Windows, macOS, Linux). The host OS manages the physical hardware, and the hypervisor runs as an application. Examples: Oracle VirtualBox, VMware Workstation, VMware Fusion, Parallels Desktop. Type 2 hypervisors are common for desktop virtualization, development/testing, and lab environments. They have more overhead because hardware access goes through the host OS, but they are easier to set up and use.
Key Components and Their Roles
Hypervisor: The core software that creates, runs, and manages VMs. It allocates resources, handles VM isolation, and provides virtual hardware.
Virtual Machine (VM): A software computer that runs an operating system and applications. Each VM has its own virtual CPU, memory, storage, and network interface.
Guest OS: The operating system running inside a VM. It can be any OS that the hypervisor supports (e.g., Windows, Linux, macOS).
Host (for Type 2): The physical machine running the host OS on which the hypervisor runs.
Virtual Hardware: Emulated components presented to the guest OS.
Virtual Switch (vSwitch): A software switch that connects VMs to each other and to the physical network. It can be configured with VLANs, port groups, and policies.
Virtual Disk: A file (or set of files) on the host storage that represents the VM's hard drive. Common formats: VMDK (VMware), VHD/VHDX (Hyper-V), VDI (VirtualBox), QCOW2 (KVM).
Snapshot: A point-in-time copy of a VM's state, including disk and memory. Used for backup before updates.
Live Migration: Moving a running VM from one physical host to another with minimal downtime (e.g., VMware vMotion, Hyper-V Live Migration).
Resource Allocation and Overcommitment
CPU Virtualization: The hypervisor schedules virtual CPUs (vCPUs) on physical CPU cores. Each VM is assigned a certain number of vCPUs. The hypervisor uses time-sharing to give each vCPU access to physical cores. Overcommitment occurs when the total number of vCPUs across all VMs exceeds the number of physical cores. For example, a host with 16 cores might run VMs with a total of 32 vCPUs. The hypervisor manages this by scheduling, but heavy overcommitment can lead to performance degradation. The exact ratio depends on workload; typical production ratios are 4:1 to 8:1 for general workloads.
Memory Virtualization: The hypervisor maps virtual machine memory to physical memory. Each VM has a configured amount of memory (e.g., 4 GB). The hypervisor uses memory ballooning (a driver inside the guest OS that reclaims unused memory) and transparent page sharing (deduplication of identical memory pages) to optimize usage. Overcommitment of memory is more risky than CPU; if the host runs out of physical memory, it may use swap (disk), causing severe performance issues. Production environments often avoid memory overcommitment or use it conservatively.
Storage Virtualization: Virtual disks are stored as files on a storage system (local disk, SAN, NAS). The hypervisor provides a virtual storage controller (e.g., SCSI, SATA, NVMe) to the VM. Thin provisioning allows the virtual disk file to start small and grow as data is written, up to a maximum size. Thick provisioning allocates all space upfront. Snapshots create a delta file that tracks changes since the snapshot point; they can cause performance loss if left for long periods.
Network Virtualization: Each VM has one or more virtual NICs (vNICs) connected to a virtual switch. The vSwitch can be configured with VLANs, bandwidth limits, and security policies. The hypervisor manages MAC addresses for vNICs. For external connectivity, the vSwitch is connected to a physical NIC via a uplink. Advanced features include SR-IOV (Single Root I/O Virtualization), which allows a VM to directly access a physical NIC for near-native performance.
Hypervisor Features and Management
VM Templates: Pre-configured VMs used to quickly deploy new VMs.
Cloning: Creating an identical copy of a VM.
Checkpoints/Snapshots: Save state for rollback.
High Availability (HA): If a host fails, VMs are automatically restarted on another host.
Fault Tolerance (FT): Creates a secondary VM that mirrors the primary with no data loss (VMware FT, Hyper-V Replica).
Resource Pools: Grouping VMs to share resources with reservations, limits, and shares.
DRS (Distributed Resource Scheduler): Automatically balances VMs across hosts based on resource usage.
Virtualization vs. Containerization
Virtualization runs multiple OS instances on one host, each with its own kernel. Containers share the host OS kernel but isolate applications at the process level. Containers are lighter and start faster, but are less isolated than VMs. The CompTIA A+ exam focuses on VMs, but you should know that containers are a different technology (e.g., Docker).
Interaction with Cloud Computing
Virtualization is the foundation of cloud computing. Cloud providers (IaaS) use Type 1 hypervisors to offer virtual machines to customers. The exam objective 4.1 covers cloud concepts like IaaS, PaaS, SaaS, and deployment models (public, private, hybrid). Virtualization enables multi-tenancy, elasticity, and self-service provisioning in the cloud.
Configuration and Verification Commands
For Type 2 hypervisors like VirtualBox, you can use the command line:
VBoxManage list vms
VBoxManage startvm "VM Name" --type headless
VBoxManage controlvm "VM Name" poweroffFor VMware Workstation:
vmrun start "C:\path\to\vm.vmx"
vmrun list
vmrun stop "C:\path\to\vm.vmx" softFor Hyper-V (PowerShell):
Get-VM
Start-VM -Name "VMName"
Stop-VM -Name "VMName"For ESXi (CLI via SSH):
esxcli vm process list
vim-cmd vmsvc/getallvms
vim-cmd vmsvc/power.on <vmid>Common Pitfalls and Exam Traps
Confusing Type 1 and Type 2: Remember Type 1 runs directly on hardware (no host OS), Type 2 runs on an OS. VMware ESXi is Type 1; VMware Workstation is Type 2. Hyper-V can be both: as a role on Windows Server (Type 2) or as a standalone hypervisor (Type 1 if Windows Server is installed with the Hyper-V role and no other roles, but technically it's still Type 2 because it relies on Windows kernel). The exam considers Hyper-V as Type 1 when installed on Windows Server with the Hyper-V role, because it's a hypervisor that runs directly on hardware (the Windows OS is essentially the hypervisor's management partition).
Memory Overcommitment: A common wrong answer: "Virtual machines can use more memory than the host has without performance impact." Reality: Overcommitment can cause swapping and severe performance issues.
Snapshots and Performance: Snapshots are not backups; they are for short-term rollback. Leaving snapshots for weeks degrades performance because the delta file grows and I/O overhead increases.
Virtual Switch vs. Physical Switch: A virtual switch is software-based; it does not have physical ports. It can connect VMs to each other and to physical NICs.
Live Migration Requirements: Both hosts must have access to shared storage (or use storage vMotion) and compatible CPU features (or use Enhanced vMotion Compatibility).
Exam-Specific Numbers and Values
Minimum memory for a VM: Typically 512 MB for lightweight OS, but exam may ask about requirements for specific OS (e.g., Windows 10 requires 2 GB).
Virtual disk types: Thick (fixed size) vs. Thin (grows as needed).
Hypervisor types: Type 1 (bare metal) and Type 2 (hosted).
Common hypervisors: VMware vSphere/ESXi, Microsoft Hyper-V, Oracle VirtualBox, Citrix XenServer, KVM.
Maximum number of VMs per host: Depends on hardware; exam may not ask for specific number but understand limits.
Snapshot: A delta file that records changes since the snapshot.
Live migration: vMotion (VMware), Live Migration (Hyper-V).
Install Hypervisor on Hardware
For a Type 1 hypervisor like VMware ESXi, you install the hypervisor directly on the physical server from bootable media (USB or CD). The installation process formats the local disks with a VMFS (Virtual Machine File System) partition. The hypervisor takes control of all hardware resources: CPU, memory, storage controllers, and network adapters. It installs a minimal management interface (DCUI – Direct Console User Interface) for initial configuration. After installation, you configure the management network (IP address, subnet mask, gateway) so that you can connect via vSphere Client or web interface. The hypervisor now acts as a lightweight operating system that will host virtual machines.
Create a Virtual Machine
Using a management tool (e.g., vSphere Client, Hyper-V Manager, VirtualBox GUI), you create a new VM. You specify the VM name, choose the guest OS type (e.g., Windows 10 64-bit), and allocate virtual hardware: number of vCPUs (e.g., 2), amount of memory (e.g., 4 GB), virtual disk size (e.g., 60 GB, thin provisioned), and network connections (e.g., which virtual switch to connect to). The hypervisor creates a set of files: a configuration file (.vmx for VMware), a virtual disk file (.vmdk), a log file, and others. The VM is now registered with the hypervisor but not powered on.
Install Guest Operating System
You attach an installation ISO file (or physical media) to the VM's virtual CD/DVD drive. Power on the VM; it boots from the ISO and begins the OS installation process. The guest OS sees virtual hardware: a virtual BIOS, virtual disk, virtual NIC, etc. It installs drivers for these virtual devices (often provided by the hypervisor's integration tools, like VMware Tools or Hyper-V Integration Services). After installation, the guest OS runs as if on physical hardware. The hypervisor translates all guest OS requests to physical hardware. You can now install applications inside the guest OS.
Configure Resource Allocation
You can adjust resource settings after creation. For example, you can set CPU affinity (pinning a vCPU to a specific physical core), memory reservations (guarantee a minimum amount of memory), and limits (maximum resource usage). You can also enable memory ballooning, which allows the hypervisor to reclaim memory from idle VMs. For network, you can set bandwidth limits or quality of service (QoS) policies on the virtual switch. These settings ensure that critical VMs get the resources they need and that no single VM can starve others. Misconfiguring these can lead to performance issues.
Take Snapshot for Backup
Before making changes to the VM (e.g., installing updates, changing configuration), you take a snapshot. The hypervisor creates a delta disk file (e.g., -delta.vmdk) that records all writes to the virtual disk from that point forward. The original virtual disk file becomes read-only. Memory state can also be saved if you choose. If something goes wrong, you can revert to the snapshot, which discards the delta file. Snapshots are not meant for long-term backups because they degrade performance and consume disk space. After a few days, you should commit (delete) the snapshot to merge changes into the base disk.
In a typical enterprise data center, virtualization is used to consolidate workloads. For example, a company might have 20 physical servers running different applications (web server, database, file server, etc.) each at 10% CPU utilization. By virtualizing, they can run those 20 workloads on 2-3 physical hosts running VMware ESXi, achieving 70-80% utilization. The hypervisor provides HA (High Availability) so that if a host fails, VMs are automatically restarted on another host. Storage is often shared via SAN (Fibre Channel or iSCSI) or NAS (NFS) to enable live migration. For instance, a DBA might need to move a database VM to a host with more memory for a maintenance window; using vMotion, the VM moves with no downtime.
Another scenario: A development team uses Type 2 hypervisors like VirtualBox on their laptops to create isolated environments for testing software. Each developer runs multiple VMs with different OS versions (Windows, Linux) to test compatibility. They use snapshots to quickly revert to a clean state after testing. However, they must be careful not to overcommit memory on their laptops, as running 4 VMs with 2 GB each on a laptop with 8 GB RAM will cause swapping and sluggish performance.
A common problem: An administrator creates a VM with thin-provisioned virtual disks and takes multiple snapshots without monitoring disk space. The datastore runs out of space, causing all VMs on that datastore to pause or crash. The solution is to set alarms on datastore usage and regularly consolidate snapshots. Another issue: Overcommitting CPU without monitoring can lead to CPU ready time (time a VM is ready to run but waiting for a physical CPU), degrading performance. The admin must use performance monitoring tools (e.g., vCenter performance charts) to detect and adjust allocations.
In cloud environments like AWS or Azure, the underlying hypervisor is abstracted from the customer. The customer provisions VMs (EC2 instances) without knowing the hypervisor type, but the cloud provider uses Type 1 hypervisors (e.g., Xen, KVM) to manage multi-tenancy. The customer can choose instance types with different vCPU and memory ratios, similar to configuring a VM on-premises.
The 220-1101 exam tests virtualization under Objective 4.1 (Virtualization Cloud). You need to know:
The difference between Type 1 and Type 2 hypervisors.
How to allocate resources (CPU, memory, storage, network) to VMs.
Benefits of virtualization (hardware independence, resource pooling, isolation, disaster recovery).
Common virtualization concepts: snapshots, templates, live migration.
The role of hypervisors in cloud computing.
Common Wrong Answers: 1. "A Type 2 hypervisor runs directly on hardware." – This is false; Type 1 runs directly on hardware. Type 2 runs on a host OS. Candidates mix them up. 2. "Snapshots are a reliable backup method for long-term retention." – Wrong; snapshots are for short-term rollback, not backups. They degrade performance and are not a substitute for proper backups. 3. "A VM can use more memory than the host has without issues." – Wrong; memory overcommitment can cause swapping and severe performance degradation. The host must have enough physical memory to avoid swapping. 4. "Virtual switches are physical devices." – Wrong; virtual switches are software-based and run within the hypervisor.
Specific Numbers and Terms: - Hypervisor types: Type 1 (bare metal) and Type 2 (hosted). - Examples: VMware ESXi (Type 1), Microsoft Hyper-V (Type 1), Oracle VirtualBox (Type 2), VMware Workstation (Type 2). - Virtual disk formats: VMDK, VHD, VHDX, VDI. - Live migration: vMotion (VMware), Live Migration (Hyper-V). - Snapshot: delta file that tracks changes. - Thin vs. thick provisioning.
Edge Cases: - Hyper-V can be considered Type 1 when installed on Windows Server with the Hyper-V role, because the hypervisor runs directly on hardware with the parent partition providing management. However, some sources classify it as Type 1 because it has direct hardware access. The exam likely treats it as Type 1. - KVM (Kernel-based Virtual Machine) is a Type 1 hypervisor because it is built into the Linux kernel and runs directly on hardware. - Containers are not VMs; they share the host OS kernel. The exam may ask to differentiate between VMs and containers.
Eliminating Wrong Answers: If a question asks about a hypervisor that runs on top of an operating system, the answer is Type 2. If it mentions running multiple OS instances on a single physical server, it's virtualization. If it mentions isolating applications without separate OS instances, it's containers. For resource allocation, remember that CPU and memory can be overcommitted but with potential performance impact; storage thin provisioning saves space but can lead to overcommitment issues.
Virtualization abstracts physical hardware to run multiple VMs on one server, improving utilization and reducing costs.
There are two hypervisor types: Type 1 (bare-metal) runs directly on hardware; Type 2 (hosted) runs on a host OS.
Common Type 1 hypervisors: VMware ESXi, Microsoft Hyper-V, KVM, XenServer. Common Type 2: Oracle VirtualBox, VMware Workstation.
Snapshots are for short-term rollback, not backups; they degrade performance if kept too long.
Live migration (vMotion) allows moving running VMs between hosts with minimal downtime, requiring shared storage.
Resource overcommitment (CPU, memory) can cause performance issues; monitor CPU ready time and memory swapping.
Virtual switches are software-based; they connect VMs and provide VLAN/traffic shaping but lack physical switch features.
These come up on the exam all the time. Here's how to tell them apart.
Type 1 Hypervisor (Bare-Metal)
Installs directly on physical hardware, no host OS needed.
Higher performance and lower overhead.
Used in enterprise data centers and cloud providers.
Examples: VMware ESXi, Microsoft Hyper-V, KVM, XenServer.
Requires dedicated hardware and more complex management.
Type 2 Hypervisor (Hosted)
Runs on top of an existing operating system (Windows, macOS, Linux).
Higher overhead due to host OS layer.
Common for desktop virtualization, testing, and development.
Examples: Oracle VirtualBox, VMware Workstation, Parallels Desktop.
Easier to set up and manage on personal computers.
Virtual Machines (VMs)
Each VM includes a full guest OS with its own kernel.
Higher resource usage (RAM, disk) due to OS overhead.
Strong isolation between VMs (separate kernels).
Slower startup time (minutes).
Can run different OS types on same host.
Containers (e.g., Docker)
Containers share the host OS kernel; no guest OS.
Lightweight, lower resource usage.
Less isolation (kernel shared); vulnerable to host kernel exploits.
Fast startup (seconds).
All containers must use same OS type (e.g., all Linux).
Mistake
Virtual machines are slower than physical machines because of virtualization overhead.
Correct
Modern hypervisors with hardware-assisted virtualization (Intel VT-x/AMD-V) achieve near-native performance. Overhead is typically less than 5% for CPU-intensive workloads. The performance difference is negligible for most applications, especially with proper resource allocation.
Mistake
A Type 2 hypervisor is always slower than a Type 1 hypervisor.
Correct
Type 2 hypervisors have more overhead because they go through the host OS, but for desktop use (development, testing), the difference is often unnoticeable. Type 1 is preferred for production servers because of better performance and scalability.
Mistake
You can take a snapshot and keep it forever without any issues.
Correct
Snapshots create delta files that grow over time, consuming disk space and degrading I/O performance. Snapshots should be used for short-term rollback (a few days) and then committed. Long-term snapshots can cause datastore to fill up and VMs to become slow or unresponsive.
Mistake
Virtual switches are just like physical switches and have the same features.
Correct
Virtual switches are software-based and lack physical ports. They provide basic switching features (VLAN, port groups, traffic shaping) but do not have features like STP, LACP (usually), or routing. They operate at Layer 2. They are managed by the hypervisor, not via console cables.
Mistake
Live migration requires identical CPU models on both hosts.
Correct
While identical CPUs are recommended, technologies like Enhanced vMotion Compatibility (EVC) allow migration between different CPU generations by masking CPU features. However, the hosts must be from the same vendor family (Intel to Intel, AMD to AMD). Cross-vendor migration is not supported.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Type 1 hypervisors run directly on the physical hardware (bare metal) without an underlying OS, offering higher performance and scalability, used in data centers (e.g., VMware ESXi). Type 2 hypervisors run on top of a host OS (e.g., Windows, macOS), easier to set up but with more overhead, used for development/testing (e.g., VirtualBox). The exam expects you to distinguish them and know examples.
Yes, you can overcommit vCPUs. For example, a host with 8 cores can run VMs with a total of 32 vCPUs. The hypervisor schedules vCPUs on cores using time-sharing. However, excessive overcommitment leads to CPU ready time and performance degradation. Typical ratios are 4:1 to 8:1 for general workloads.
A snapshot captures the state of a VM at a point in time, including disk and optionally memory. It creates a delta file that records changes. Snapshots are used for short-term rollback before applying updates or risky changes. They are not backups because they depend on the original disk; if the base disk is lost, the snapshot is useless. Also, long-term snapshots degrade performance and consume disk space.
VMware vMotion migrates a running VM from one ESXi host to another with no downtime. The VM's memory state is copied over the network to the destination host while the VM continues to run. The hypervisor tracks memory pages that change during transfer (dirty pages) and copies them iteratively. Once the majority is copied, the VM is briefly paused, final state is transferred, and the VM resumes on the new host. Both hosts need shared storage (or storage vMotion) and compatible CPUs.
Thin provisioning allocates virtual disk space on demand; the virtual disk file starts small and grows as data is written, up to a maximum size. Thick provisioning allocates the entire disk space upfront (e.g., 100 GB immediately reserved on the datastore). Thin saves storage space but risks overcommitment if many VMs grow simultaneously. Thick ensures performance and avoids overcommitment but wastes space if unused.
Hyper-V is considered a Type 1 hypervisor when installed on Windows Server with the Hyper-V role. Although Windows Server is present, the hypervisor runs directly on hardware, and the parent partition (Windows) is a special VM that manages other VMs. The exam treats Hyper-V as Type 1. However, it can also run on Windows 10 (Client Hyper-V) which is also Type 1 but with limited features.
A virtual switch (vSwitch) is a software-based switch within the hypervisor that connects virtual NICs of VMs to each other and to the physical network via uplinks. It can be configured with VLANs, port groups, bandwidth limits, and security policies. It operates at Layer 2 and does not have physical ports. It enables VMs on the same host to communicate without leaving the host.
You've just covered Virtualization Concepts and Hypervisors — now see how well it sticks with free 220-1101 practice questions. Full explanations included, no account needed.
Done with this chapter?