# RHCSA EX200 (RHEL 10) Practice Exam - free lab kit

20 original hands-on tasks with a checker. Exam console, score report and study plan:
https://rhcsa-practice-exam.pages.dev

Not real exam content. Built and tested on Rocky Linux 10.3 (RHEL-compatible, not RHEL).
Independent training; not affiliated with or endorsed by Red Hat.

## How you get in
The exam runs on two free VMs on your own computer:
- `server1` - the machine you are tested on. Its VM window is your exam console. Log in as the user you
  created when you installed it. The root password is unknown on purpose: Task 1 is getting it back.
- `repo.lab.example` (192.168.50.1) - serves packages, an NFS share, a Flatpak repo and time. Leave it running.

Needs an Intel or AMD computer with 8 GB RAM. Apple Silicon Macs are not supported yet.

## Build the lab with VirtualBox (Windows, Linux, Intel Mac)
1. Install VirtualBox and download the Rocky Linux 10 DVD ISO (x86_64) from rockylinux.org.
2. Create two VMs, `repo` and `server1`: Rocky Linux 10, 2 CPUs, 2 GB RAM, 20 GB disk.
   For server1, Settings > Storage: add a second, new 5 GB disk to the SATA controller (it becomes /dev/sdb).
3. For each VM, Settings > Network: Adapter 1 = Internal Network named `labnet` (becomes enp0s3),
   Adapter 2 = NAT (internet for the setup).
4. Install Rocky Linux on both (Minimal Install is fine). Create your own user and tick "Make this user administrator".
5. On repo:     curl -O https://rhcsa-practice-exam.pages.dev/kit/repo-setup.sh
                sudo bash repo-setup.sh          # about 10 minutes; ends with "repo.lab.example is ready."
6. On server1:  curl -O https://rhcsa-practice-exam.pages.dev/kit/server1-setup.sh -O https://rhcsa-practice-exam.pages.dev/kit/check.sh -O https://rhcsa-practice-exam.pages.dev/kit/rhcsa-exam
                sudo bash server1-setup.sh
   This also installs rhcsa-exam, the exam clock and grader.
7. Check the lab (repo VM running):  curl -O https://rhcsa-practice-exam.pages.dev/kit/lab-check.sh
                                     sudo bash lab-check.sh
   Anything marked FIX comes with the exact fix. When it says LAB READY, shut server1 down and take a
   snapshot called exam-start. Every attempt starts from that snapshot, like fresh systems on exam day.
8. Optional SSH: server1 Settings > Network > Adapter 2 > Port Forwarding, host 2222 -> guest 22,
   then `ssh -p 2222 youruser@127.0.0.1`. Task 1 still needs the VM window (it happens at boot).

On VirtualBox the spare disk is /dev/sdb: wherever a task says /dev/vdb, use /dev/sdb
(the web console has a switch that does this for you). The checker accepts either.

## Build the lab with KVM / virt-manager (Linux)
Same steps, with these differences:
- Create an Isolated virtual network `labnet` with DHCP off, and give each VM a second NIC on it.
- Add server1's spare disk as a 5 GiB VirtIO disk (it becomes /dev/vdb).
- Find the lab NIC name with `nmcli device` (for example enp7s0) and pass it to both scripts:
  sudo LABIF=enp7s0 bash repo-setup.sh      sudo LABIF=enp7s0 bash server1-setup.sh

## Take the exam (it runs like the real one)
1. Restore the exam-start snapshot. Start repo and server1, and log in on server1.
2. Open https://rhcsa-practice-exam.pages.dev, start the full exam, and at the same moment run on server1:
       sudo rhcsa-exam start            (sudo rhcsa-exam start --drill for a 45-minute drill)
   The 3-hour clock runs inside the lab: `rhcsa-exam status` shows the time left, and warnings appear
   at 30, 10, 5 and 1 minute.
3. When time is up, server1 ends the exam itself, reboots and grades your work, whether you are done or not.
   Finished early? `sudo rhcsa-exam end` (type END to confirm).
4. About two minutes after the reboot, the login screen shows your score out of 300 (210 to pass) and a
   Result code. `rhcsa-exam result` shows it again. Paste the code into the page for your score report,
   task-by-task review and study plan.
