Sub topic 10
Sizing Host Resources for Virtual Machines
This chapter assumes you know what a host, guest, and hypervisor are, and that you have seen the CPU and BIOS/UEFI virtualization settings from the previous chapter. Here you will work out how much CPU, RAM, storage, and network capacity a PC needs to run virtual machines (VMs) well. You will also see the common mistakes that make a VM slow or stop it from starting.
The Core Rule: Guests Share the Host's Hardware
A VM has no hardware of its own. Every virtual CPU, every gigabyte of guest RAM, and every virtual disk is carved out of the host's physical parts. The host operating system (or the Type 1 hypervisor) also needs resources to keep running.
The planning rule is simple:
- Host needs + the sum of all running guests' needs must fit inside the physical hardware.
- If the total is too high, the host starts to swap memory to disk, the guests stall, and everything feels slow.
Only running VMs consume CPU and RAM. A powered-off VM uses only disk space. This is why you can keep many VMs defined but run only a few at once.
CPU Requirements
Three CPU points matter for the exam.
- Hardware virtualization support. The CPU must offer Intel VT-x or AMD-V, and the feature must be enabled in BIOS/UEFI. Without it, many hypervisors refuse to start 64-bit guests or run very slowly.
- Core count. Each guest is given one or more virtual CPUs (vCPUs). A vCPU is a share of time on a physical core or thread. A multi-core CPU lets several guests run at the same time without constantly waiting for each other.
- Overcommitment. A host can assign more vCPUs in total than it has physical cores, because guests are rarely busy at the same moment. This works for light workloads. It causes slowdowns when many guests are busy together.
A practical starting point for a client PC is a quad-core CPU or better. Give each guest one or two vCPUs. Never give a single guest more vCPUs than the host has logical processors.
You can check what the host offers on Linux:
lscpu | grep -E 'Model name|^CPU\(s\)|Virtualization'On Windows, Task Manager shows the same facts on the Performance tab, under CPU. It lists cores, logical processors, and whether virtualization is enabled.
RAM Requirements
RAM is the resource that most often limits how many VMs you can run. Unlike CPU time, RAM is not easily shared. When a guest starts, the hypervisor reserves the memory you assigned to it. Most hypervisors will not start a VM if that memory is not available.
To size RAM, add up the following:
- The host OS and its background services.
- The hypervisor's own overhead.
- The assigned memory for every guest you plan to run at the same time.
A worked example: a Windows 11 host needs about 4 GB for itself. You want to run two guests, a Windows 11 guest with 4 GB and a Linux guest with 2 GB.
| Item | RAM |
|---|---|
| Host OS | 4 GB |
| Windows 11 guest | 4 GB |
| Linux guest | 2 GB |
| Total needed | 10 GB |
A host with 8 GB cannot run this comfortably. A host with 16 GB can, and has room for another guest. The usual advice is to leave at least half of the host's RAM for the host when you are sizing a small workstation, and to treat 16 GB as a sensible minimum for regular VM work.
Some hypervisors support dynamic memory, where a guest's RAM grows and shrinks with demand within set limits. This helps density but makes performance less predictable.
Storage Requirements
A VM's disk is usually a single large file on the host, called a virtual disk image. Common formats include VHD and VHDX (Hyper-V), VMDK (VMware), and VDI (VirtualBox). The guest sees this file as a normal hard drive.
There are two main ways to allocate it:
| Type | Behavior | Trade-off |
|---|---|---|
| Fixed (thick) | Takes the full size on the host immediately | Predictable and slightly faster, but uses space even when empty |
| Dynamic (thin) | Starts small and grows as the guest writes data | Saves space, but can fill the host drive unexpectedly |
Plan storage for the following:
- The virtual disk of each guest. A modern Windows guest commonly needs 50 GB or more.
- Snapshots. A snapshot saves a guest's state at a point in time and stores later changes separately. Many snapshots can use a lot of space and slow the guest.
- Installation ISO files and saved states.
Storage type matters as well. A solid-state drive (SSD) makes guests boot and respond much faster than a spinning hard disk drive (HDD), because several guests may read and write at once. If you run many guests, an SSD is one of the best upgrades you can make.
Network Requirements
Guests share the host's physical network adapter. A normal Gigabit Ethernet or Wi-Fi connection is enough for most client-side labs. The hypervisor presents each guest with a virtual network adapter and connects it to the real network using the mode you choose, such as NAT or bridged. Those modes are covered in their own chapter.
Two sizing points apply here:
- Heavy traffic from several guests, such as large downloads, competes for the same physical link.
- A bridged guest may need its own IP address from the LAN, so check that the network has addresses available.
Matching Hardware to a Use Case
The right size depends on what the guests do. These are typical values, not fixed rules.
| Use case | vCPUs per guest | RAM per guest | Disk per guest |
|---|---|---|---|
| Light Linux test machine | 1 | 1 to 2 GB | 20 GB |
| Windows client for software testing | 2 | 4 GB | 60 GB |
| Developer workstation guest | 2 to 4 | 8 GB | 100 GB |
A host that runs two or three of the middle type needs roughly 16 GB of RAM, a quad-core CPU, and an SSD with a few hundred gigabytes free.
Checking Capacity Before You Build
Always check what the host has before creating a guest. On Windows, you can read installed memory and processor count from PowerShell:
Get-CimInstance Win32_ComputerSystem | Select-Object TotalPhysicalMemory, NumberOfLogicalProcessors
Get-PSDrive -PSProvider FileSystem | Select-Object Name, FreeThe first command shows total RAM in bytes and the logical processor count. The second shows free space on each drive. Compare those numbers against your plan before you create the virtual disk.
On Linux, the equivalent checks are:
free -h
nproc
df -hCommon Errors and How to Read Them
| Symptom | Likely cause | Fix |
|---|---|---|
| VM will not start, memory error | Not enough free host RAM for the assigned amount | Lower guest RAM or shut down other VMs |
| 64-bit guest option missing or VM fails to boot | VT-x or AMD-V disabled in BIOS/UEFI, or unsupported CPU | Enable virtualization in firmware |
| Host slow while VMs run | RAM or CPU overcommitted | Reduce guest count or resources |
| Host drive full unexpectedly | Dynamic disks or snapshots grew | Delete old snapshots, move or compact disks |
| Guest disk very slow | VM stored on an HDD, or many guests on one disk | Move to an SSD |
Exam Tips
Questions in this area usually describe a technician who must run VMs on a particular PC. Look for the limiting resource. If the stem mentions a hypervisor that will not start a VM, check firmware settings and RAM first. If it mentions slow performance with several guests, think RAM, then SSD, then CPU cores. Remember that the host must keep enough resources for itself.
Exercise
A technician has a workstation with 8 GB of RAM and a quad-core CPU. The host OS needs about 3 GB. She wants to run two guests at once, each with 4 GB of RAM. The second guest fails to start. Why, and what is the most direct fix?
Show answer
The host needs 3 GB and the two guests need 8 GB, so the total is 11 GB, which exceeds the 8 GB installed. The hypervisor cannot reserve memory for the second guest. The most direct fix is to add RAM, for example to 16 GB. Reducing each guest to 2 GB so the total is 7 GB would also work, but only if the guests can run well on that amount.
Exercise
A VM stored on a dynamically allocated virtual disk is configured for 100 GB. The host drive has 40 GB free. Why might this cause trouble later, and which allocation type avoids a surprise failure?
Show answer
A dynamic disk starts small and grows as the guest writes data, so the host drive can fill up before the guest reaches 100 GB, causing errors in the guest and host. A fixed (thick) disk reserves the full size at creation, so a lack of space shows up immediately instead of later. In this case the 100 GB fixed disk could not be created on 40 GB of free space, so the technician would need more storage or a smaller disk.