Sub topic 6
Virtualization Fundamentals: Host, Guest, and Virtual Machine
Prerequisites and scope
This chapter assumes you know the basic PC hardware terms CPU, RAM, storage, and network adapter. It also assumes you have used an operating system such as Windows or Linux and know what an IP address and a LAN are.
Virtualization is the base for the rest of the client-side material on the A+ Core 1 exam. Later chapters cover hypervisor types, CPU and BIOS/UEFI settings, resource sizing, network modes, and security. This chapter defines the vocabulary and the working model they all build on.
What virtualization is
Virtualization is the use of software to create a simulated computer, with its own virtual CPU, memory, disk, and network adapter, that runs on top of a real computer. The simulated computer is called a virtual machine (VM). The software inside it behaves as if it were running on dedicated hardware.
The key idea is abstraction. A program called a hypervisor sits between the physical hardware and the VMs. It divides the physical resources and presents each VM with its own set of virtual devices. The VM's operating system talks to those virtual devices, and the hypervisor translates the requests into real hardware activity.
Virtualization is not the same as cloud computing, although the two are closely linked. Cloud providers use virtualization to share their hardware among many customers. You can also use virtualization on a single desktop PC with no cloud involved. The exam tests both.
Host, guest, and virtual machine
Three terms appear in nearly every virtualization question.
| Term | Meaning | Example |
|---|---|---|
| Host | The physical computer, and the software that runs directly on it, that provides resources to VMs | A laptop with 16 GB of RAM running Windows 11 |
| Guest | The operating system and applications running inside a VM | Ubuntu Linux running inside a VM on that laptop |
| Virtual machine | The virtual computer itself: the set of virtual hardware plus the files that define and store it | A VM configured with 2 vCPUs, 4 GB RAM, and a 40 GB virtual disk |
People often use "guest" and "VM" loosely as if they were the same thing. For the exam, think of the VM as the virtual hardware and the guest as the operating system installed on it. When a question says "the guest OS," it means the operating system inside the VM. When it says "the host OS," it means the operating system on the physical machine, if there is one.
A single host can run several guests at the same time. The guests can run different operating systems. A Windows host can run Linux guests, and a Linux host can run Windows guests.
What a VM is made of
A VM has two parts: virtual hardware and files.
Virtual hardware
The hypervisor presents each VM with a set of virtual components:
- Virtual CPUs (vCPUs). These are slices of processor time from the host's CPU cores. A VM does not own a physical core. The hypervisor schedules vCPUs onto real cores.
- Virtual RAM. The hypervisor reserves part of host memory for the VM. The guest sees it as its total RAM.
- Virtual disk. This is usually one large file on the host's storage. The guest sees it as a normal hard drive and formats it with its own file system.
- Virtual network adapter. The guest sees a normal network card. The hypervisor connects it to a virtual switch, which connects to the real network in a mode you choose. Those modes are covered in a later chapter.
- Virtual display, keyboard, mouse, and optical drive. These let you use the VM from the host's screen and input devices. An installation ISO file can act as a virtual DVD.
Files on the host
Because a VM is software, the host stores it as files. A typical VM includes a virtual disk file, a configuration file listing the virtual hardware, and often a file holding saved state. This has practical consequences:
- You can copy a VM to another host by copying its files.
- You can back up a VM by copying its files.
- You can delete a VM by deleting its files.
A snapshot is a saved point-in-time state of a VM, including its disk contents and sometimes its memory. You can take a snapshot before risky work, such as installing unknown software, and revert to it if something breaks. A snapshot is not a full backup. It usually depends on the original virtual disk, so losing that disk loses the snapshot as well.
How the hypervisor shares hardware
The hypervisor decides which VM gets which resources and when. Two behaviors matter for the exam.
CPU sharing. If a host has 4 cores and you run three VMs with 2 vCPUs each, the hypervisor schedules the vCPUs across the real cores. The VMs can share cores because they are rarely all busy at once. If every VM works hard at the same moment, each one slows down.
Memory allocation. RAM is less flexible than CPU time. The memory you give to running VMs, plus what the host OS needs, must fit in physical RAM. If you assign too much, the host starts using disk as memory (paging), and everything becomes very slow.
Storage works similarly. Virtual disks can be created at a fixed size or can grow as the guest writes data. A growing disk saves space at first, but it can fill the host drive unexpectedly.
Isolation
Each VM is isolated from the others and from the host. A guest cannot normally see another guest's memory or files. If a guest crashes, the others and the host usually keep running. If malware infects a guest, it is normally confined to that VM.
This isolation is the reason VMs are used for testing and for running untrusted software. It is a strong boundary but not a perfect one. A later chapter covers how VMs can still be attacked, for example through shared folders, shared clipboards, or a network connection that is too open.
Benefits and costs
Virtualization is popular because it solves several practical problems.
| Benefit | Why it matters |
|---|---|
| Better hardware use | One powerful host runs many workloads instead of leaving many small machines mostly idle |
| Isolation | A faulty or infected guest does not take down the host |
| Fast recovery | Snapshots and file copies make rollback and backup easy |
| Flexibility | You can run several operating systems on one PC without repartitioning disks |
| Easy testing | You can create, change, and delete VMs without touching real hardware |
The costs are also worth knowing:
- Guests share the host's resources, so each VM is usually slower than the same OS on bare metal.
- The host needs enough RAM, CPU, and disk space to run the VMs and itself.
- Some tasks, such as demanding 3D graphics or access to specialized hardware, work poorly or not at all in a VM.
- Every guest OS must be licensed and patched like a real machine.
Checking whether your host can virtualize
Running modern VMs efficiently needs hardware virtualization support in the CPU, and it must be enabled in BIOS/UEFI. Intel calls its feature VT-x and AMD calls its feature AMD-V. The next chapters cover this in detail. Here are quick checks you can run.
On Linux, the first command shows the CPU's virtualization technology. The second counts the logical CPUs whose flags include vmx (Intel) or svm (AMD). A nonzero count means the CPU supports hardware virtualization.
lscpu | grep -i virtualization
grep -E -c '(vmx|svm)' /proc/cpuinfoOn Windows, systeminfo reports the Hyper-V requirements section. It shows whether virtualization is enabled in firmware and whether the host can run Hyper-V.
systeminfo | findstr /i "Hyper-V"Run from an elevated PowerShell prompt on a supported Windows edition, the next command turns on the Hyper-V feature. The feature then requires a restart.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -AllCommon errors and misunderstandings
- Confusing host and guest. The host is the real machine. The guest is inside the VM. When a question describes an OS "running in a VM," that OS is the guest.
- Assuming a VM needs its own physical hardware. It does not. It uses a share of the host's hardware.
- Treating a snapshot as a backup. A snapshot helps with quick rollback. It does not protect you if the host disk fails.
- Over-assigning RAM. Giving every VM most of the host's memory makes the host and all guests slow.
- Forgetting licensing. A Windows guest needs a valid license like any other Windows installation.
- Mixing up virtualization and cloud. Virtualization is the technology. Cloud computing is a service delivery model that often uses it.
Worked example
A technician has a laptop with 16 GB of RAM, an 8-core CPU, and 500 GB of free storage. A customer needs to test an old accounting program that only runs on an older version of Windows. The technician does not want to risk the customer's real system.
- The technician confirms the CPU supports virtualization and that it is enabled in BIOS/UEFI.
- The technician installs a hypervisor on the laptop. The laptop is the host.
- The technician creates a VM with 2 vCPUs, 4 GB of RAM, and a 60 GB virtual disk.
- The technician installs the older Windows version from an ISO file. That OS is the guest.
- The technician takes a snapshot of the clean installation.
- The technician installs the accounting program, tests it, and reverts to the snapshot if anything goes wrong.
The host keeps 12 GB of RAM for itself while the VM runs. The old program never touches the real Windows installation.
Exercise
A technician runs Ubuntu inside a VM on a laptop that runs Windows 11. Which is the host and which is the guest? Name two resources the hypervisor must divide between them.
Show answer
The laptop, with its Windows 11 operating system, is the host. The Ubuntu operating system inside the VM is the guest. The hypervisor divides resources such as CPU time (vCPUs), RAM, disk space, and network access.
Exercise
A VM fails to start with an error saying hardware virtualization is unavailable. A Linux check on the same CPU shows a nonzero count of vmx flags. What is the most likely cause, and where do you fix it?
Show answer
The CPU supports virtualization, but the feature is probably disabled in BIOS/UEFI. Enter firmware setup and enable the setting, which may be called Intel Virtualization Technology, VT-x, SVM Mode, or AMD-V.
Exercise
A technician takes a snapshot of a VM and then the host's hard drive fails. Can the technician recover the VM from the snapshot? Explain.
Show answer
No. A snapshot usually depends on the original virtual disk files stored on the same host drive, so it is not a backup. The technician should keep copies of the VM files on separate storage.