Add 'save': the closing step for any change
save = snapshot --update + start, and falls back to a first-time snapshot when no baseline exists yet. On the qemu platform it folds the working overlays into the base images and brings the lab back up; on proxmox it re-templates. Documented as the rule it is: every deliberate change to the lab ends with save, so reset always returns to the state you meant to freeze.
This commit is contained in:
@@ -193,6 +193,8 @@ backend_snapshot() {
|
||||
ok "$(printf '%-6s frozen as template %s' "$name" "$tpl")"
|
||||
}
|
||||
|
||||
backend_has_baseline() { pve_exists "$(pve_template_vmid "$1")"; }
|
||||
|
||||
backend_reset() {
|
||||
local name=$1 vmid tpl
|
||||
vmid=$(pve_vmid "$name")
|
||||
|
||||
@@ -214,6 +214,8 @@ backend_snapshot() {
|
||||
ok "$(printf '%-6s baseline frozen (%s)' "$name" "$(du -h "$base" | cut -f1)")"
|
||||
}
|
||||
|
||||
backend_has_baseline() { [[ -f $(qemu_base "$1") ]]; }
|
||||
|
||||
backend_reset() {
|
||||
local name=$1
|
||||
local base overlay
|
||||
|
||||
Reference in New Issue
Block a user