Chapter 4
Virtualization and Cloud Computing
The One Computer That Pretends to Be Many
Picture a small business on a Monday morning. In the back room sits a single physical server — one box, one motherboard, one set of RAM sticks. But when the IT technician opens her management console, she sees four servers: a file server, a print server, a web server for the company intranet, and a test machine running a completely different operating system. Four machines, one box. Nobody plugged in three extra computers overnight. What happened is virtualization — and it is one of the most heavily tested ideas on the Core 1 exam, precisely because it shows up everywhere in real IT work.
Virtualization is the technique of creating virtual versions of physical hardware. A layer of software fools guest operating systems into believing each one has its own dedicated CPU, memory, disk, and network card, when in reality they are all sharing one physical machine. The exam expects you to know not just the vocabulary but the reasoning: why an organization would virtualize, what can go wrong, and how virtual resources map to physical ones.
> EXAM TIP: CompTIA loves scenario questions here. They will describe a situation — "a developer needs to test software on three different operating systems but has one laptop" — and ask for the best solution. The answer is almost always some form of virtualization. When you see "multiple operating systems, one physical machine," think virtualization immediately.
---
Hypervisors: The Software That Makes It Possible
At the heart of every virtualized system sits the hypervisor (also called a virtual machine monitor, or VMM). The hypervisor is the software layer that creates, runs, and manages virtual machines. It takes requests from each guest operating system — "give me some CPU time," "write this to disk" — and translates them into operations on the real physical hardware. Without a hypervisor, there is no virtualization.
There are two types, and confusing them is one of the most common exam mistakes.
Type 1 Hypervisors: Bare Metal
A Type 1 hypervisor installs directly on the physical hardware. There is no host operating system underneath it. When the server powers on, the hypervisor boots first, takes control of all the hardware, and then starts carving it up into virtual machines.
Think of it this way: a Type 1 hypervisor is the operating system of the physical machine, except its job is not to run applications — its job is to run other operating systems.
Common examples you should know:
- VMware ESXi (now Broadcom) — the dominant enterprise choice
- Microsoft Hyper-V (when installed as a bare-metal role)
- Citrix Hypervisor (formerly XenServer)
- KVM (Kernel-based Virtual Machine, built into Linux)
Type 1 hypervisors are used in data centers and production server environments because they are fast and efficient. With no host OS consuming resources in the middle, nearly all the hardware's power goes to the virtual machines. They also tend to be more secure, since there is a smaller attack surface — no bloated desktop OS sitting underneath waiting to be compromised.
Type 2 Hypervisors: Hosted
A Type 2 hypervisor installs on top of an existing host operating system, like any other application. You install Windows or macOS on your laptop, then install the hypervisor software, then create virtual machines inside it.
Examples:
- VMware Workstation Pro
- Oracle VirtualBox (free — a favorite for students and labs)
- Parallels Desktop (macOS)
- QEMU (often paired with KVM)
Type 2 hypervisors are perfect for desktops, labs, testing, and learning. A developer who needs to test an application on Windows, Linux, and an older version of Windows can run all three as VMs on one laptop. The trade-off is performance: every hardware request from a guest VM must pass through the hypervisor and the host operating system before reaching the physical hardware. That extra layer costs speed.
> EXAM TIP: The single most tested distinction in this chapter is Type 1 vs. Type 2. Memorize this sentence: "Type 1 runs on bare metal; Type 2 runs on a host OS." CompTIA will describe a scenario and ask which type fits. Data center consolidating physical servers? Type 1. Technician testing software on a laptop? Type 2. If the question mentions "no underlying operating system" or "installed directly on hardware," the answer is Type 1 — every time.
Type 1 vs. Type 2 at a Glance
| Feature | Type 1 (Bare Metal) | Type 2 (Hosted) |
|---|---|---|
| Installed on | Physical hardware directly | A host operating system |
| Examples | VMware ESXi, Hyper-V, KVM, Citrix Hypervisor | VirtualBox, VMware Workstation, Parallels |
| Performance | Higher (no middleman OS) | Lower (requests pass through host OS) |
| Typical use | Data centers, production servers | Desktops, labs, testing, training |
| Security | Smaller attack surface | Larger attack surface (host OS included) |
| Cost/complexity | Enterprise-grade, more complex | Often free or cheap, easy to set up |
---
Virtual Machines: Guests on Shared Hardware
A virtual machine (VM) is a software-based emulation of a physical computer. Each VM gets its own virtual CPU, virtual RAM, virtual disk, and virtual network adapter, and runs its own complete operating system — called the guest OS. The physical machine underneath is called the host.
Here is the part that trips people up: the guest OS genuinely believes it is running on real hardware. A Windows VM has no idea it is sharing a CPU with three Linux VMs. The hypervisor maintains this illusion by intercepting privileged hardware instructions and deciding, moment by moment, which VM gets access to the real resources.
A Story: The Saturday Migration
A technician named Marcus manages a small company's infrastructure: five aging physical servers, each running one application, each using maybe 15% of its capacity. The hardware is out of warranty, the server room is hot and loud, and the electric bill is painful.
Marcus buys one powerful new server, installs a Type 1 hypervisor, and converts each physical server into a virtual machine — a process called physical-to-virtual (P2V) migration. Now one box does the work of five. Power consumption drops, the room cools down, and when he needs a sixth server for a new project, he does not order hardware — he clicks "New VM" and has one running in ten minutes.
This scenario captures every major benefit of virtualization, and CompTIA tests all of them:
- Server consolidation — fewer physical machines doing the same work
- Cost savings — less hardware, less power, less cooling, less rack space
- Rapid provisioning — new servers in minutes, not weeks
- Isolation — if one VM crashes or is compromised, the others are unaffected
- Snapshots — the ability to save a VM's exact state and roll back if something breaks
> EXAM TIP: "A company wants to reduce the number of physical servers while keeping all applications running" — the answer is virtualization/server consolidation. "A technician wants to test a patch and be able to undo it instantly" — the answer is a VM snapshot. Snapshots are one of the most practical exam topics: know that a snapshot captures a VM's state at a point in time and lets you revert.
Resource Allocation: Slicing the Pie
The hypervisor divides physical resources among VMs, and the technician controls how the pie is sliced. The key resources are:
- vCPU (virtual CPU) — Each VM is assigned a number of virtual processors. These map to time-slices on the physical CPU cores. A common beginner mistake is overprovisioning vCPUs — giving a VM 8 vCPUs when the host only has 8 physical cores total, then wondering why everything is slow. The hypervisor must schedule all those virtual CPUs onto real cores, and too many vCPUs can actually hurt performance due to scheduling overhead (called "CPU ready time" in VMware terms).
- RAM — Memory allocated to a VM. Unlike disk space, RAM cannot be oversubscribed too aggressively, because every VM genuinely needs its memory right now. Some hypervisors support memory ballooning or overcommitment, where unused memory from idle VMs is temporarily reassigned — but push it too far and the host starts swapping to disk, which is catastrophically slow.
- Virtual disks — Files on the host's storage that act as hard drives for the guest. Two provisioning styles matter for the exam:
- Thick provisioning: the full disk size is reserved up front. A 100 GB thick-provisioned disk consumes 100 GB immediately, even if the guest has only written 10 GB. Predictable, but wasteful.
- Thin provisioning: disk space is allocated on demand. That 100 GB disk starts near zero and grows as the guest writes data. Efficient, but risky — if the physical storage fills up, every thin-provisioned VM on it can crash simultaneously.
- Virtual network adapters — Each VM gets virtual NICs that connect to virtual switches (more on those below).
> EXAM TIP: Thick vs. thin provisioning is a favorite exam trap. Remember: thick = allocated now, thin = allocated later. A question might ask: "An administrator needs to guarantee disk space for a critical database VM and prevent other VMs from consuming it." That is thick provisioning. "An administrator wants to maximize storage efficiency for 50 mostly-empty test VMs" — thin provisioning. Also know the risk of thin: storage overcommitment leading to outages.
Worked Example: Sizing a Virtual Host
A company wants to virtualize four application servers onto one physical host. Each application needs 4 vCPUs and 16 GB of RAM.
- Total vCPU demand: 4 VMs × 4 vCPUs = 16 vCPUs
- Total RAM demand: 4 × 16 GB = 64 GB
The physical host has 2 processors with 8 cores each (16 physical cores) and 128 GB of RAM, plus hypervisor overhead of roughly 4 GB.
- CPU: 16 vCPUs on 16 physical cores is a 1:1 ratio — comfortable. (A modest overcommit like 2:1 or 3:1 is common in practice, but 1:1 leaves headroom.)
- RAM: 64 GB for VMs + 4 GB hypervisor overhead = 68 GB of 128 GB used — about 53%. Healthy headroom for growth or a fifth VM.
The exam will not ask you to do complex math here, but it will test whether you understand that physical resources are finite and shared. A question like "what happens if the total RAM assigned to VMs exceeds the host's physical RAM?" expects you to know the answer: performance degradation, swapping, and potential VM crashes.
---
Virtual Networking: Switches Made of Software
Virtual machines need to talk to each other and to the outside world, so hypervisors provide virtual switches (vSwitches) — software that functions like a physical network switch.
A vSwitch connects the virtual NICs of VMs together, exactly as a physical switch connects physical computers. VMs on the same vSwitch and the same VLAN can communicate as if they were plugged into the same hardware. The vSwitch then typically connects up to a physical NIC on the host, giving VMs a path to the physical network and the internet. That physical NIC is shared — it is the single on-ramp for all VM traffic leaving the host.
Key concepts:
- Virtual switch (vSwitch) — software switch connecting VMs; operates at Layer 2 like a physical switch.
- Port groups — configuration templates applied to groups of VM connections on a vSwitch (VLAN assignment, security policies). Think of them as "profiles" for virtual switch ports.
- VMkernel / management network — the hypervisor's own network connection, used for management traffic, separate from VM data traffic. Best practice keeps management traffic isolated.
- VLAN tagging — vSwitches support 802.1Q VLANs, so VMs on different VLANs stay isolated even while sharing one physical NIC.
> EXAM TIP: If a question describes VMs that cannot communicate with the physical network but can talk to each other, the problem is almost always the uplink — the connection between the vSwitch and the physical NIC. If VMs cannot talk to each other either, suspect the vSwitch configuration or VLAN mismatch. CompTIA loves "isolate the layer" troubleshooting: VM-to-VM works but external fails = uplink/NIC issue.
---
Virtual Storage: Where the Disks Really Live
A VM's "hard drive" is typically a single large file on the host's storage (like a .vmdk in VMware or .vhdx in Hyper-V). But in enterprise environments, that file usually does not sit on the host's local disks — it lives on shared storage accessible over the network. This matters enormously, because shared storage is what makes advanced features possible:
- Shared storage (SAN or NAS) holds VM disk files where multiple hypervisor hosts can reach them.
- Live migration (vMotion in VMware, Live Migration in Hyper-V) — moving a running VM from one physical host to another with zero downtime. This is only possible because the VM's disk file sits on shared storage; the new host just picks up the same file. Without shared storage, you would have to shut the VM down, copy a huge disk file, and restart it.
- High availability (HA) — if a physical host dies, the hypervisor cluster automatically restarts its VMs on surviving hosts, again using the shared disk files. The VM comes back up in minutes instead of waiting for hardware repair.
- Distributed resource scheduling — the cluster automatically balances VMs across hosts based on load.
> EXAM TIP: Connect the dots: shared storage → live migration → high availability. If a question asks "what is required to move a running VM between hosts with no downtime?", the answer involves shared storage (the VM's files must be accessible to both hosts). If it asks for the benefit of shared storage in virtualization, the answers are live migration and HA/fault tolerance. These three concepts travel as a pack on the exam.
---
Cloud Computing: Virtualization at Someone Else's Data Center
If virtualization is "one computer pretending to be many," cloud computing is "renting someone else's virtualized computers over the internet." The cloud provider owns massive data centers full of virtualized infrastructure, and you rent slices of it — paying only for what you use, scaling up or down on demand.
The exam organizes cloud knowledge into three areas: service models (what you rent), deployment models (who shares it), and characteristics (how it behaves). You need all three cold.
Service Models: IaaS, PaaS, SaaS
The classic exam question gives you a scenario and asks which service model it describes. The trick is asking: what is the customer responsible for managing?
- IaaS — Infrastructure as a Service. You rent raw infrastructure: virtual machines, storage, networks. YOU install the operating system, patch it, install applications, and manage everything above the hardware. The provider handles only the physical facility and virtualization layer. Example: renting an EC2 virtual machine from AWS and installing your own Windows Server on it. Maximum control, maximum responsibility.
- PaaS — Platform as a Service. You rent a ready-made platform for building and running applications. The provider manages the OS, patching, and runtime environment; you just deploy your code. Example: pushing a web app to Microsoft Azure App Service or Heroku without ever touching a server OS. Less control than IaaS, far less maintenance.
- SaaS — Software as a Service. You rent finished software, accessed through a browser. You manage nothing technical at all — just your data and user accounts. Example: Gmail, Microsoft 365, Salesforce, Dropbox. Zero infrastructure responsibility.
A memory aid: as you move from IaaS → PaaS → SaaS, your responsibility shrinks and the provider's grows. IaaS = "I manage the OS up." PaaS = "I manage just my app." SaaS = "I just use it."
> EXAM TIP: This is arguably the single most tested cloud topic. Drill it with scenarios: "A company wants to deploy a custom application without managing servers or operating systems" → PaaS. "An IT team needs full control over the OS and wants to install custom security agents" → IaaS. "Users need email without any IT maintenance" → SaaS. The trap answers will mix these up — read carefully for who manages the OS. If the customer manages the OS, it is IaaS, not PaaS.
Service Models Compared
| IaaS | PaaS | SaaS | |
|---|---|---|---|
| You get | Virtual hardware | Development platform | Finished application |
| You manage | OS, apps, data | Your code and data | Just your data/settings |
| Provider manages | Physical + virtualization | Everything except your code | Everything |
| Examples | AWS EC2, Azure VMs | Azure App Service, Heroku, Google App Engine | Gmail, Microsoft 365, Salesforce |
| Control level | Highest | Medium | Lowest |
Deployment Models: Who Shares the Cloud?
Separate from what you rent is who else is on the infrastructure:
- Public cloud — services offered over the public internet, shared among many customers (multi-tenant). AWS, Azure, and Google Cloud are public clouds. Cheapest and most scalable, but you share underlying hardware with strangers (isolated by the hypervisor).
- Private cloud — infrastructure dedicated to a single organization, hosted on-premises or by a provider. Maximum control and security, highest cost. Banks and governments love private clouds.
- Hybrid cloud — a mix of public and private, with data and applications moving between them. A company might keep sensitive customer data in its private cloud while bursting web traffic to the public cloud during busy seasons.
- Community cloud — shared among several organizations with common concerns (for example, a group of hospitals sharing a HIPAA-compliant cloud).
> EXAM TIP: "A hospital needs cloud services but cannot share infrastructure with other companies due to regulations" → private cloud. "A retailer uses its own data center normally but rents public cloud capacity during holiday traffic spikes" → hybrid cloud (this specific pattern even has a name: cloud bursting). Do not confuse hybrid (public + private) with community (shared among similar organizations).
Cloud Characteristics: How the Cloud Behaves
CompTIA expects you to know the defining traits of cloud computing — the reasons it differs from buying your own servers:
- On-demand self-service — provision resources yourself, instantly, without calling the provider. Need a server? Click a button; it exists in minutes.
- Broad network access — available over the network from anywhere, on any device (laptop, phone, tablet).
- Resource pooling — the provider's resources serve many customers, dynamically assigned as needed. You do not know (or care) which physical server runs your VM.
- Rapid elasticity — scale out (add capacity) and scale in (remove it) quickly, often automatically. This is the cloud's superpower.
- Measured service (metering) — usage is metered and billed, like a utility. Pay for what you consume — per hour of VM time, per gigabyte stored, per gigabyte transferred.
Two terms get confused constantly, so let us nail them down:
- Scalability is the ability to handle increased load by adding resources. (Can the system grow?)
- Elasticity is scalability done automatically and quickly in both directions — resources expand under load and shrink back when demand drops, so you stop paying for idle capacity. (Does it grow AND shrink on its own?)
Think of a concert venue. Scalability is "we can add 5,000 more seats if needed." Elasticity is "seats automatically appear when the crowd arrives and vanish when they leave, and we only pay for seats while occupied."
> EXAM TIP: Elasticity vs. scalability is a classic trap. Scalability = can grow. Elasticity = grows AND shrinks automatically. If a question mentions automatic provisioning and deprovisioning, or "pay only for what you use during peak times," the answer is elasticity. If it just says "handle more users," that is scalability. Also memorize metered/measured service — any question about pay-per-use billing points here.
---
Client-Side Virtualization: Everyday Uses
Not all virtualization lives in data centers. Client-side virtualization runs on end-user devices, and the exam wants you to recognize its practical purposes:
- Application virtualization — running an application in an isolated container so it does not conflict with the host system. Example: running an old 32-bit business app on a modern 64-bit OS without installation conflicts.
- Testing and development — developers spin up VMs to test software on multiple OS versions without buying hardware for each.
- Legacy software support — a company depends on software that only runs on Windows 7. Rather than keeping ancient PCs alive, they run Windows 7 in a VM on modern hardware.
- Training and labs — students learning networking or security can build entire virtual labs (multiple VMs, virtual switches, virtual routers) on one laptop. This is how most people study for certifications.
- Sandboxing / malware analysis — security analysts detonate suspicious files inside an isolated VM. If it is malware, only the disposable VM is infected — take a snapshot first, revert after.
- Cross-platform access — a Mac user running Windows software (or vice versa) through a Type 2 hypervisor like Parallels or VirtualBox.
> EXAM TIP: "A technician needs to run an application designed for an older operating system on a new computer" — the exam answer is virtualization (a VM running the legacy OS), not compatibility mode, when virtualization is among the choices. "A security analyst wants to examine malware safely" — sandbox/VM isolation. These use-case questions are straightforward if you have seen each scenario once.
---
Worked Scenario: Putting It All Together
A regional clinic with 40 employees needs to modernize. Their situation:
- Patient records live on a 9-year-old server under someone's desk
- The billing application only runs on Windows Server 2012
- Doctors want to access schedules from their phones
- The budget cannot cover a full server room rebuild
A consultant proposes:
- One new physical server with a Type 1 hypervisor (Hyper-V) — server consolidation, lower cost than five new boxes.
- Three VMs: a file/print server, the billing app on a legacy Windows Server 2012 VM (legacy support — no new licenses, no retraining), and a domain controller.
- Thin-provisioned disks for the file server (storage efficiency — records grow gradually), thick-provisioned for the database VM (guaranteed space for critical data).
- Nightly VM snapshots before updates (instant rollback if a patch breaks billing).
- Microsoft 365 (SaaS) for email and scheduling — doctors get phone access with zero server maintenance, and the clinic stops running its own Exchange server.
- Encrypted cloud backup (IaaS storage) for the patient database — offsite protection against fire or theft.
Every major concept from this chapter appears in one realistic design: hypervisor types, consolidation, thick/thin provisioning, snapshots, legacy support, SaaS, and cloud storage. When you can walk through a scenario like this and justify each choice, you are ready for the exam's scenario questions.
---
Chapter Summary
- A hypervisor creates and manages virtual machines. Type 1 runs directly on hardware (ESXi, Hyper-V, KVM) for data centers; Type 2 runs on a host OS (VirtualBox, Workstation, Parallels) for desktops and labs.
- VMs share physical CPU, RAM, disk, and network through the hypervisor. Overprovisioning vCPUs or RAM hurts performance.
- Thick provisioning reserves disk space up front (predictable); thin provisioning allocates on demand (efficient but risks overcommitment).
- Snapshots capture a VM's state for instant rollback — essential for testing and patching.
- Virtual switches connect VMs at Layer 2; the uplink to the physical NIC is the usual suspect when VMs cannot reach the outside network.
- Shared storage enables live migration (zero-downtime moves) and high availability (automatic restart on another host).
- Cloud service models: IaaS (you manage the OS), PaaS (you manage just your code), SaaS (you just use the app). Responsibility shrinks from IaaS → SaaS.
- Cloud deployment models: public (shared, cheapest), private (dedicated, most control), hybrid (both, with cloud bursting), community (shared by similar organizations).
- Cloud characteristics: on-demand self-service, broad network access, resource pooling, rapid elasticity (auto scale up AND down), measured service (pay per use). Elasticity ≠ scalability.
- Client-side virtualization uses: legacy software, testing, training labs, malware sandboxing, cross-platform access.
---
End-of-Chapter Test
1. A data center administrator needs to install a hypervisor directly onto physical server hardware with no underlying operating system. Which hypervisor type is required?
- A. Type 2
- B. Type 1
- C. Hosted
- D. Container-based
2. A developer wants to test an application on three different operating systems using a single laptop. Which solution best meets this need?
- A. Type 1 hypervisor on bare metal
- B. Private cloud deployment
- C. Type 2 hypervisor with three guest VMs
- D. Thick-provisioned SAN storage
3. An administrator must guarantee that a critical database VM always has its full 200 GB of disk space available, even if other VMs need storage. Which provisioning method should be used?
- A. Thin provisioning
- B. Thick provisioning
- C. Memory ballooning
- D. Dynamic overcommitment
4. A technician wants to apply a risky patch to a VM and be able to instantly undo the change if something breaks. What should the technician create first?
- A. A port group
- B. A snapshot
- C. A vSwitch uplink
- D. A thin-provisioned disk
5. A company wants to deploy a custom web application without managing any servers or operating systems. Which cloud service model is the best fit?
- A. IaaS
- B. PaaS
- C. SaaS
- D. Private cloud
6. Virtual machines on a host can communicate with each other but cannot reach the internet or the physical LAN. What is the most likely cause?
- A. The guest operating systems are corrupted
- B. Thick provisioning exhausted the disk
- C. The vSwitch uplink to the physical NIC has failed
- D. The hypervisor is Type 2 instead of Type 1
7. Which cloud characteristic automatically adds resources during peak demand and removes them when demand falls, so the customer pays only for what is used?
- A. Scalability
- B. Resource pooling
- C. Rapid elasticity
- D. Broad network access
8. A hospital must use cloud services but regulations prohibit sharing underlying infrastructure with other organizations. Which deployment model is required?
- A. Public cloud
- B. Hybrid cloud
- C. Community cloud
- D. Private cloud
9. What is the primary requirement for migrating a running VM from one physical host to another with zero downtime?
- A. Both hosts must run Type 2 hypervisors
- B. The VM's disk files must reside on shared storage accessible to both hosts
- C. The VM must use thin-provisioned disks
- D. The guest OS must be rebooted first
10. A security analyst needs to examine a suspicious email attachment without risking the corporate network. What is the safest approach?
- A. Open it on the analyst's primary workstation
- B. Forward it to the help desk for review
- C. Detonate it inside an isolated VM sandbox, then revert to a clean snapshot
- D. Upload it to a public cloud file share
---
Answer Key
1. B — "Directly onto hardware with no underlying OS" is the textbook definition of a Type 1 (bare-metal) hypervisor. (Type 2 is "hosted" — choice C is just another name for Type 2, a classic distractor.)
2. C — One laptop running multiple operating systems for testing is the textbook Type 2 use case. A Type 1 hypervisor (A) would require wiping the laptop's OS.
3. B — Thick provisioning reserves the full 200 GB immediately, guaranteeing it cannot be consumed by other VMs. Thin provisioning (A) is the efficiency choice, not the guarantee choice.
4. B — A snapshot captures the VM's exact state and allows instant rollback. This is the standard answer for any "test something risky and undo it" scenario.
5. B — PaaS: the provider manages servers and operating systems; the customer deploys only code. IaaS (A) would require managing the OS; SaaS (C) provides finished software, not a platform for custom apps.
6. C — VM-to-VM communication works, so the vSwitch is fine; only external connectivity fails, which points to the uplink between the vSwitch and the physical NIC.
7. C — Rapid elasticity: automatic scaling in both directions with usage-based cost. Scalability (A) is only the ability to grow, without the automatic shrink-back.
8. D — Private cloud: infrastructure dedicated to one organization. Public (A) is shared; hybrid (B) includes public resources; community (C) is shared among multiple organizations.
9. B — Live migration requires the VM's disk files on shared storage so the destination host can access them immediately. This is why shared storage, live migration, and high availability are tested together.
10. C — An isolated VM sandbox contains the malware; reverting to a snapshot afterward guarantees a clean state. Never open suspicious files on a production workstation (A).