Re-baseline support, WS01 SMB, docs refresh
snapshot --update commits the working overlay into the base so deliberate changes survive reset. The eval image ships with File and Printer Sharing disabled; the bootstrap enables it, otherwise the workstation is invisible to an SMB scan. README and instructor runbook now document the real command set.
This commit is contained in:
@@ -242,3 +242,26 @@ backend_reset() {
|
||||
qemu-img create -q -f qcow2 -F qcow2 -b "../base/${name}-base.qcow2" "$overlay"
|
||||
ok "$(printf '%-6s reverted' "$name")"
|
||||
}
|
||||
|
||||
# Fold the current overlay into the base, then start a fresh overlay.
|
||||
# Used after a deliberate change to the lab, so `reset` keeps the change.
|
||||
backend_commit() {
|
||||
local name=$1
|
||||
local base overlay
|
||||
base=$(qemu_base "$name")
|
||||
overlay=$(qemu_overlay "$name")
|
||||
|
||||
if backend_running "$name"; then
|
||||
fail "$name is still running"
|
||||
return 1
|
||||
fi
|
||||
if [[ ! -f $base || ! -f $overlay ]]; then
|
||||
fail "$name has no base/overlay pair"
|
||||
return 1
|
||||
fi
|
||||
|
||||
qemu-img commit -q "$overlay" || { fail "commit failed for $name"; return 1; }
|
||||
rm -f "$overlay"
|
||||
qemu-img create -q -f qcow2 -F qcow2 -b "../base/${name}-base.qcow2" "$overlay"
|
||||
ok "$(printf '%-6s overlay committed into the baseline' "$name")"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user