VM capacity and snapshots
How much capacity can a host provide?
VM sizing means choosing virtual processor, memory, storage and network capacities for a workload. A host has finite physical resources; the virtualization system shares them among guests and needs some capacity for its own operation. Adding up assigned resources is a useful starting point, but it does not measure real performance.
For this lesson use an invented host with 8 physical cores and 32 GiB RAM. Reserve 2 core-equivalents and 4 GiB RAM for host work in a conservative planning model. The resulting planning budgets are 6 core-equivalents and 28 GiB RAM. This is a simplified model, not an actual scheduler configuration or vendor limit.
Example: size two bookstore VMs
| Guest | Assigned vCPUs | Assigned RAM | Maximum virtual disk size |
|---|---|---|---|
| Web | 2 | 6 GiB | 40 GiB |
| Inventory | 4 | 12 GiB | 80 GiB |
| Total | 6 | 18 GiB | 120 GiB |
Under a teaching policy of no CPU or memory overcommit, the CPU budget has no unallocated slots and memory has 10 GiB available. The 120 GiB virtual disk total is a logical maximum, not necessarily the space currently occupied on physical storage. Storage provisioning and metadata overhead must be checked separately. GiB means 2^30 bytes; do not silently substitute decimal GB.
If inventory needs 16 GiB rather than 12, the new memory total is 22 GiB and 6 GiB remain. Whether performance improves depends on the real bottleneck.
CPU scheduling, memory and noisy neighbors
Overcommit means assigning more virtual resources than the corresponding physical or policy budget. In the example, changing the web VM to 4 vCPUs makes the total 8, giving an assigned-to-budget ratio of 8/6, about 1.33. This is not a prediction of CPU utilization. If both guests demand full CPU simultaneously they compete for execution time. Observe scheduling delay, guest demand and host utilization before increasing vCPU counts.
Memory overcommit is different from CPU time sharing. Some platforms reclaim unused guest memory, share identical pages or swap memory to storage. These mechanisms have platform and workload restrictions, and may slow guests or cause allocation failures under pressure. For example, assigning 16 GiB to each guest totals 32 GiB against a 28 GiB budget, a 4 GiB excess. Do not apply a CPU ratio as a safe memory policy.
A noisy neighbor is another workload whose resource demand degrades your workload on shared infrastructure. CPU, storage latency, network throughput and memory bandwidth can all be contested. Check real metrics and workload requirements; a larger VM may not fix a shared bottleneck.
Virtual disks, templates and snapshots
A thick-provisioned disk generally reserves storage according to the selected allocation policy, while a thin-provisioned disk can consume physical space as data is written. Exact allocation and accounting vary by storage backend. If the two guests currently occupy 20 GiB and 35 GiB, their combined data allocation in our simplified model is 55 GiB. Against a 100 GiB data budget there are 45 GiB free today, but the guests could grow to 120 GiB total, exceeding it by 20 GiB. Plan for growth, snapshots and overhead.
A template is a reusable baseline for creating new VMs; it is not automatically a copy of the latest business data. A snapshot or checkpoint records selected state at a point in time. Depending on the implementation it may capture disk blocks, memory and configuration, or only a storage volume. Microsoft Hyper-V standard checkpoints and production checkpoints have different semantics; Amazon EBS snapshots are volume-level backups, not complete running VM memory images.
A local dependent snapshot might be lost with its parent storage. Some cloud snapshots are stored separately and can form part of a backup system. Ask what is captured, whether writes are coordinated, whether copies survive the failures you care about, and whether a restore actually works. Crash-consistent data may require recovery like after an abrupt power loss; application-consistent captures coordinate with the application to establish a recoverable state. Neither label by itself proves your business application can be restored.
Migration and recovery decisions
Cold migration stops a VM before moving its required state. Live migration aims to move a running VM with limited interruption, but depends on compatible CPUs, host software, network and storage, permissions and available destination resources. It is not guaranteed to be interruption-free or supported across arbitrary clouds. Moving a guest does not automatically make its storage or network dependencies redundant.
Imagine the source host needs planned maintenance. A destination has a free budget of 4 core-equivalents and 16 GiB RAM. The inventory VM with 4 vCPUs and 12 GiB fits that simplified capacity check, leaving 4 GiB RAM. It is only a candidate: verify compatibility, disk reachability, network configuration and migration support before making a change. For an unexpected host failure, recovery may instead mean restoring the VM and its data elsewhere.
For the bookstore, retain application configuration and business data backups with independent failure protection and restricted access, define acceptable data loss and downtime, and test a restore in an isolated environment. Do not replace current live data just to test a snapshot.
Try it: plan before allocating
Use pencil and paper or a calculator. A new fictional host has 12 cores and 48 GiB RAM. Reserve 2 core-equivalents and 8 GiB RAM. VM A needs 4 vCPUs and 12 GiB; VM B needs 6 vCPUs and 24 GiB. Under the no-overcommit model, find remaining CPU and memory. Could a third VM requiring 2 vCPUs and 4 GiB fit without overcommit? Explain which resource stops it.
Check: 10 core-equivalents and 40 GiB are available to guests; A and B use 10 and 36, leaving 0 and 4. The third VM fits memory but exceeds CPU policy by 2. A snapshot of VM B stored on the same disk pool does not by itself protect it from pool loss. No provisioning or software installation is needed.
Common mistake: treating a capacity fit as proof of performance, or a successful snapshot as proof of recovery. Confirm actual performance under load and test an isolated restore before relying on either claim. Next: containers and cloud-native foundations.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
VM capacity and snapshots — knowledge check
Choose the best answer for each fictional scenario.
A host has 32 GiB RAM; reserve 4 GiB. Guests request 6 and 12 GiB. How much budget remains?
Eight assigned vCPUs share a six-core-equivalent budget. What does 8/6 describe?
A snapshot depends on the same storage pool as the original disk. What risk remains?
A destination has 4 core-equivalents and 16 GiB free. A VM needs 4 vCPUs and 12 GiB. What can we conclude?
A thin disk has a 120 GiB combined maximum, 55 GiB currently allocated and a 100 GiB budget. What is the potential excess at maximum?