Build the lab servers, snapshot them, and prove a revert really reverts

short · 60 min

Task

Build the two virtual servers the rest of this course runs on, connect them to an isolated network, take a named baseline snapshot of each, deliberately damage one, and revert it. The point is not the installation. It is proving that a revert returns the machine to its baseline, because an untested snapshot is the same kind of assumption as an untested backup, and every later lab relies on it.

Steps

  1. Create both VMs with 2 GB of memory and one or two virtual CPUs each, install the operating systems, and apply updates while temporarily attached to a network that can reach the update servers. Then move both to the isolated network.
  2. Give them static addresses on the isolated network, for example 192.168.56.10 for lin-srv and 192.168.56.20 for win-srv. Record each machine in lab/bench/servers.csv with header name,os,version,address,memory_gb,vcpus.
  3. From lin-srv, ping win-srv, and from win-srv ping lin-srv (allow ICMP in the Windows firewall if needed). Save the lin-srv output to lab/bench/ping.txt.
  4. Shut both machines down cleanly and take a snapshot of each named clean-baseline. Record them in lab/bench/snapshots.csv with header vm,name,taken,powered_off,why.
  5. Start lin-srv and damage it: create /root/marker.txt containing today's date, and remove a package the system does not need. Record exactly what you changed in lab/bench/damage.txt.
  6. Revert lin-srv to clean-baseline, start it, and check for the marker and the package. Record the result in lab/bench/revert.txt as two lines: marker present: yes|no and package present: yes|no.

Verify

These checks run in a POSIX shell: Terminal on macOS or Linux, and on Windows Git Bash (it comes with Git for Windows) or WSL. A stock Windows PowerShell or Command Prompt has no awk or grep, so there the first line fails.

awk -F, 'NR>1 && NF>=6 {n++} END {print n" server(s) recorded"}' lab/bench/servers.csv
grep -Ec ' 0% packet loss' lab/bench/ping.txt
awk -F, 'NR>1 && $2=="clean-baseline" {n++} END {print n" baseline snapshot(s)"}' lab/bench/snapshots.csv
grep -c 'marker present: no' lab/bench/revert.txt
grep -c 'package present: yes' lab/bench/revert.txt

Two servers, a ping with no loss, two baseline snapshots, and a revert that removed the marker and brought the package back. If the marker survived, you did not revert -- you probably took a second snapshot -- and every later lab would run on a machine that keeps its own damage.

Notes

Name snapshots for what they are. clean-baseline and before-raid-lab are worth something in three weeks; snapshot1 is not. Delete lab-specific snapshots once a lab is finished, and keep the baseline: a long chain of snapshots slows the VM down, which the hypervisor lesson explains.

This is an independent study companion for CompTIA Server+ SK0-005 and is not produced by or endorsed by CompTIA.