From 7f615333b6bc3f793f7aedfb186fddec67dae4cc Mon Sep 17 00:00:00 2001 From: Simone Date: Mon, 8 Jun 2026 21:26:07 +0200 Subject: [PATCH] =?UTF-8?q?docs(runbook):=20add=20guest=20IP=20discovery?= =?UTF-8?q?=20to=20=C2=A72?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document `vmrun getGuestIPAddress` (run as ci-runner) for templates and clones as the prerequisite for `validate guest`, with the AGENTS.md #1 "Error: on stdout" gotcha. Update the validate-guest Linux example to the live template IP. --- docs/RUNBOOK-PhaseC.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/RUNBOOK-PhaseC.md b/docs/RUNBOOK-PhaseC.md index f44dd23..23bc20f 100644 --- a/docs/RUNBOOK-PhaseC.md +++ b/docs/RUNBOOK-PhaseC.md @@ -91,13 +91,33 @@ ci validate host ; echo "exit=$?" Checks vmrun, template snapshots, keyring, `/var/lib/ci` permissions, `act-runner` unit. Exit `0` + all `[OK ]`; a `[FAIL]` line names the broken check. +### Find a running guest's IP (needed for `validate guest`) +`vmrun getGuestIPAddress` reads the IP from VMware Tools — the VM must be +**powered on** and Tools running. Run it as `ci-runner` (the VMs are started by +that user, so its `vmrun` inventory is the one that sees them): +```bash +# Linux template +sudo -u ci-runner vmrun getGuestIPAddress /var/lib/ci/templates/LinuxBuild2404/LinuxBuild2404.vmx +# Windows template +sudo -u ci-runner vmrun getGuestIPAddress /var/lib/ci/templates/WinBuild2025/WinBuild2025.vmx +# A build clone (glob the job dir) +sudo -u ci-runner vmrun getGuestIPAddress /var/lib/ci/build-vms/Clone_*/Clone_*.vmx + +# List which VMs are powered on first +sudo -u ci-runner vmrun list +``` +> **Gotcha (AGENTS.md #1):** `getGuestIPAddress` can exit `0` and print +> `Error: The VMware Tools are not running...` on stdout when Tools are down. +> A line starting with `Error:` means *no IP yet* — wait for boot, don't parse it. + ### `validate guest` — diagnose a running guest's transport ```bash -ci validate guest --host 192.168.79.200 --ssh --guest-os linux # SSH -ci validate guest --host 192.168.79.201 --winrm --guest-os windows # WinRM +ci validate guest --host 192.168.79.128 --ssh --guest-os linux # SSH (Linux) +ci validate guest --host 192.168.79.201 --winrm --guest-os windows # WinRM (Windows) ``` Connects + runs a trivial command, printing the explicit cause on failure -(connect vs auth vs command). The guest must already be booted. +(connect vs auth vs command). The guest must already be booted — get its IP +with `getGuestIPAddress` above. ### `monitor disk` — free-space alert ```bash