Prove the provider cannot see inside the guest
Task
Demonstrate the gap between platform metrics and in-guest metrics by consuming memory and disk inside a VM and observing what each view reports. This is the measurement gap that causes real right-sizing mistakes.
Steps
- Start the guest with a fixed memory allocation. Record what the HYPERVISOR reports for its memory, and what
free -mreports INSIDE it, inlab/agent.csv. - Inside the guest, allocate and touch a large block of memory so the guest's used figure climbs substantially. Record both views again.
- Fill a filesystem inside the guest to over 90%. Record what the hypervisor reports for the virtual disk and what
df -hreports inside. - Install a monitoring agent in the guest that exports memory and disk usage, and confirm the exported figures match the in-guest view.
- Write in
lab/agent.mdthe two metrics that require an agent, and the sizing mistake that follows from omitting them.
Verify
awk -F, 'NR>1 && NF>=3 {n++} END {print n" paired observation(s)"}' lab/agent.csv
grep -Eci 'memory' lab/agent.md
grep -Eci 'disk|filesystem' lab/agent.md
grep -Eci 'agent' lab/agent.md
At least three paired observations where the two views DIFFER. If they always agree, the guest's memory was never actually touched -- allocation alone is not enough, the pages must be written.
This is an independent study companion for CompTIA Cloud+ CV0-004 and is not produced by or endorsed by CompTIA.