Add doctor health check and Kali setup script
doctor verifies bridge, per-VM SMB/WinRM, DNS SRV records, the site and the leaked credential in one pass — the instructor's first move when something looks wrong. Start order now boots dc01 first and waits for WinRM: a member that wins the race loses its machine-account channel (NO_LOGON_SERVERS on every logon).
This commit is contained in:
+20
-3
@@ -86,18 +86,35 @@ _wait_for_boot() {
|
||||
info " next: ./lab.sh status"
|
||||
}
|
||||
|
||||
cmd_up() {
|
||||
# Start the DC first and wait for it: a member that boots before the DC
|
||||
# loses its machine-account channel and fails to authenticate (NO_LOGON_SERVERS).
|
||||
_start_lab() {
|
||||
local name
|
||||
step "start"
|
||||
|
||||
if vm_index dc01 >/dev/null 2>&1; then
|
||||
if backend_running dc01; then
|
||||
info " dc01 already running"
|
||||
else
|
||||
backend_launch dc01 run || { fail "dc01 did not start"; return 1; }
|
||||
fi
|
||||
_wait_winrm "$LAB_DC_IP" 240 || warn "dc01 did not answer WinRM in time"
|
||||
fi
|
||||
|
||||
for name in "${VM_NAMES[@]}"; do
|
||||
[[ $name == dc01 ]] && continue
|
||||
if backend_running "$name"; then
|
||||
info " $name already running"
|
||||
else
|
||||
backend_launch "$name" run || fail "$name did not start"
|
||||
backend_launch "$name" run || { fail "$name did not start"; return 1; }
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
cmd_up() {
|
||||
step "start"
|
||||
_start_lab
|
||||
}
|
||||
|
||||
cmd_down() {
|
||||
local name
|
||||
step "stop"
|
||||
|
||||
Reference in New Issue
Block a user