Lab Environment Setup

Follow this guide to prepare Rocky Linux 9 in a virtual machine on your laptop. Once complete, you can reset the environment quickly using snapshots before each lab.

Virtualization Requirements

These labs are designed for lightweight virtualization on laptops. Pick the platform that matches your host OS and follow the recommended settings.

UTM (macOS, Apple Silicon & Intel)

  • Recommended: 2 vCPU, 4 GB RAM, 40 GB storage (expand if you plan to keep multiple snapshots).
  • Set CPU to "Apple Virtualization" for Apple Silicon or "QEMU" for Intel.
  • Use VirtIO for disk and network adapters; enable "Shared Network (NAT)".

VirtualBox (Windows, Linux, macOS)

  • 2 vCPU, 4 GB RAM, 40 GB storage.
  • Attach the Rocky Linux ISO to an IDE or SATA optical drive.
  • Set network adapter to NAT or Bridged—NAT is sufficient for labs.

VMware Fusion / Workstation

  • Use the CentOS/RHEL preset when available.
  • Enable accelerated 3D graphics if you plan to use GUI tools (optional).
  • Network adapter can remain on NAT; bridged is optional for direct LAN access.

Download Rocky Linux 9

Use the official Rocky Linux 9 DVD ISO. Verify the checksum before attaching the image to your VM.

During installation, accept automatic partitioning, create a primary user with administrative privileges, and ensure NetworkManager is enabled (default on Rocky).

Post-Install Preparation

After the first boot, log in and complete the baseline configuration below.

sudo dnf update -y
sudo dnf install -y vim git tmux
sudo systemctl status NetworkManager
sestatus

Confirm that SELinux is enforcing and note the hostname for later labs. Feel free to install additional tools (e.g., htop, net-tools) based on your workflow.

Network Baseline

Labs assume NetworkManager and nmcli are available. Keep the VM on NAT unless you have a reason to expose it to your LAN.

  • Verify connectivity with ping (e.g., ping -c3 1.1.1.1 and ping -c3 rocky-linux.org).
  • Check adapter status with nmcli device status.
  • Document your VM’s IP; later labs rely on it for testing routes and DNS.

Snapshot Strategy

Virtual machine snapshots keep lab work reversible. Use them generously.

  • Take an initial snapshot after completing the base install and updates.
  • Create a snapshot before starting each lab. Name it with the lab identifier (e.g., "RHCSA Lab 02 Start").
  • If a lab goes sideways, revert to the prior snapshot instead of reinstalling.