Plans¶
A plan is the YAML file that names the backups to restore, the probes that check each guest, and the node's limits.
A first plan¶
certistack init writes a plan like this one. Change source_vmid,
frameworks and the probe (check the VM's service); change network only if the node uses 192.0.2.0/24.
# SPDX-License-Identifier: AGPL-3.0-or-later
# Copyright (C) 2024-2026 Clift Cloud LLC
#
# The smallest useful CertiStack plan: boot the latest PBS backup of one VM in
# an isolated sandbox and check that its SSH listener answers. Copy this file,
# change the values marked CHANGE, and run `certistack validate` on the copy.
#
# Addresses use the RFC 5737 documentation range 192.0.2.0/24, which nearly
# every node leaves unused. The range must not overlap any network the PVE
# node uses (`ip -4 route` on the node lists them): while a run lasts the node
# routes the whole range into the sandbox, so a range the node also has an
# address or route in would take that real traffic into it.
#
# Editor completion and checks: run
# "certistack schema > certistack-plan.schema.json" next to this file, then make
# "# yaml-language-server: $schema=./certistack-plan.schema.json" its first line.
version: "v1"
plan_id: "minimal-single-vm"
name: "Minimal single-VM recovery check"
use_backup_config: true
compliance:
# CHANGE: the framework labels the report records (DORA, SOC2, HIPAA,
# ISO27001, CIS_V8; labels, not certifications), or NONE if you have no
# standard to name; NONE stands alone. At least one is required.
frameworks: [NONE]
# CHANGE: the retention period in days, 1 to 36500 (2555 is seven years). It
# is recorded in each report; CertiStack deletes nothing.
# Required: a plan without it, or with 0, does not validate.
retention_days: 90
admission_control:
max_host_ram_percent: 85.0
max_host_iowait_percent: 12.0
defer_retry_interval_sec: 30
max_defer_retries: 10
network:
mode: "simple"
zone_id: "csSbMin1"
vnet_id: "csVnMin1"
ip_range: "192.0.2.0/24"
probe_ip: "192.0.2.1"
storage:
# CHANGE: file-based PVE storage with "images" content for the disposable COW
# overlays; stock Proxmox VE attaches only disks that belong to a storage.
overlay_storage: "certistack-scratch"
tiers:
- level: 1
name: "Single VM"
vms:
# vmid is the temporary sandbox VM; it must not already exist on the node.
- vmid: 9100
# CHANGE: the protected VM whose latest PBS backup is being tested.
source_vmid: 100
name: "recovery-check-vm100"
source_pbs:
storage_id: "pbs"
snapshot: "latest"
probes:
# The guest receives 192.0.2.10 through COW-only network recovery;
# the source VM and its backup are never modified.
- type: "tcp"
target_ip: "192.0.2.10"
port: 22
timeout_sec: 60
description: "SSH listener answers inside the sandbox"
certistack validate checks a plan without credentials; certistack plan shows what a run would do.
Editor completion and checks¶
Save the schema and name it on the plan's first line, for editors with a YAML language server. Print it again after an upgrade.
The keys¶
- An unknown key is refused, naming the key you probably meant. A rejected key fails validation.
- A plan is read literally:
${VAR}is not expanded. - Durations are whole seconds, at most
604800(7 days). IDs and names take quoted text:name: "2026". - Credentials never go in a plan; they go in the environment file.
Top level¶
| Key | What it does |
|---|---|
version |
Required. v1; certistack/v1 is an alias |
plan_id |
Required. 1 to 128 letters, digits, _ and -; names the report folder |
name |
Required. The plan's title in reports |
environment |
A free-text label for the report |
use_backup_config |
Default false. Take disks and hardware from the backup |
compliance |
Required |
admission_control |
Required. admission is an alias |
network |
Required |
storage |
Optional |
tiers |
Required. At least one tier |
compliance¶
| Key | What it does |
|---|---|
frameworks |
Required. Report labels, not certifications: NONE (alone), DORA, DORA-Article-12, SOC2, SOC2-Type2-CC7.4, HIPAA, HIPAA-164.308-A7, ISO27001, ISO27001-A8.13, ISO27001-A.12.3, ISO27001-A12.3 or CIS_V8. Write [NONE], not NONE |
retention_days |
Required. 1 to 36500 days. Recorded only; nothing is deleted |
rto_target_seconds |
Above 0: the most seconds from the start of a run to its last passing probe. Set it from a measured run |
sign_key_path |
The Enterprise Edition's signing key; Community ignores it |
admission_control¶
A run over either limit waits defer_retry_interval_sec and checks again, up to max_defer_retries times (init
writes 30 and 10: 5 minutes), then fails before it creates anything. A plan whose VMs need more than
max_host_ram_percent of the node's whole memory can never be admitted: plan and run refuse it at once
(Issue 3).
| Key | What it does |
|---|---|
max_host_ram_percent |
Required. Above 0, at most 100: the most memory in use, counting the run's reservation |
max_host_iowait_percent |
Required. Above 0, at most 100: the most CPU I/O wait. max_host_io_wait_percent is an alias |
defer_retry_interval_sec |
Required. 1 to 604800 |
max_defer_retries |
Required. 1 to 10000 |
max_concurrent_boots |
Default 0 (no limit), up to 64: VMs booting at once. Use 1 or 2 when the overlay storage shares the cluster database's disk |
boot_settle_sec |
Default 180, up to 3600: how long a started VM counts as booting. Needs max_concurrent_boots |
The run reserves each VM's memory plus 256 MiB.
network¶
| Key | What it does |
|---|---|
mode |
Required. simple (one node) or vxlan (a zone across cluster nodes) |
lifecycle |
Default ephemeral: each run creates and removes the zone and VNet. preprovisioned: your own sandbox |
zone_id |
Required. A letter, then 1 to 7 letters or digits (csZone01) |
vnet_id |
Required. Same form; differs from zone_id when ephemeral |
tag |
vxlan only, required: the VNI, 1 to 16777215, unused by other VNets |
peers |
vxlan only, required: comma-separated peer IP addresses, none inside ip_range |
ip_range |
Required. The sandbox subnet as an IPv4 network address (192.0.2.0/24). subnet_cidr is an alias |
probe_ip |
Required. The node's address in the sandbox: a free host address in ip_range |
gateway |
Rejected: must be empty |
ipam |
Rejected |
mtu |
Rejected |
Choose the sandbox range¶
ip_range must be a network where the node has no address and no route: during a run the node routes the whole range
into the sandbox. ip -4 route on the node lists its networks. plan, check, doctor and run refuse a range that
holds the PVE API, the PBS server, a node network, gateway or DNS server, your SSH client or a vxlan peer
(Issues 8 to 13).
Use a pre-provisioned sandbox¶
With lifecycle: preprovisioned you create the zone and VNet once; runs then make no SDN change and, on a cluster,
no network reload on every node.
- The VNet has no gateway, no SNAT and no uplink, and serves CertiStack alone: a run refuses it while another guest has a network device on it. Two runs never share it at once.
- The token needs
VM.Auditon/vmswith propagation;setup rbac --zonelimits it to the zone. - PVE turns IPv4 forwarding on at each network reload, and a run refuses a VNet that forwards. Keep it off on every
node that may run a test, for example with an
/etc/network/if-up.d/hook that writes0to/proc/sys/net/ipv4/conf/<vnet>/forwarding.
storage¶
| Key | What it does |
|---|---|
overlay_storage |
Required on stock Proxmox VE. A file-based PVE storage (dir, nfs, cifs, cephfs, btrfs or glusterfs) for the overlays, active, with images content and 5 GiB free |
max_copy_gib |
Default 0 (no cap): the most copy_before_boot writes in one run |
pbs_namespace |
The PBS namespace of every VM's backups |
scratch_dir |
A private node directory for work files, and for the overlays when no overlay_storage is set. Not / or /tmp |
pbs_repository |
Discouraged; use the environment file. Lets a VM leave out source_pbs |
pbs_fingerprint |
Discouraged; use the environment file. The PBS certificate fingerprint |
Flags and the environment override these keys (which setting wins).
tiers¶
Tiers boot in ascending level, each after every probe of the one before passed, and stay up: put DNS and databases
first.
| Key | What it does |
|---|---|
level |
Required. 1 or more, unique in the plan. tier is an alias |
name |
Default Tier <level> |
startup_grace_period_sec |
Default 0: the wait between the start and the probes |
boot_timeout_sec |
Default 60: how long the PVE start task, then QEMU's running status, may each take |
soak_time_sec |
Default 0. Keep the tier up this long after its probes pass, repeating them every 30 seconds |
vms |
Required. At least one VM |
vms¶
| Key | What it does |
|---|---|
vmid |
Required. 100 to 999999999: the temporary sandbox VM, unique, absent from the node. target_vmid is an alias |
source_vmid |
The VM whose backup is tested. Required for snapshot: latest |
name |
Required. A DNS name of at most 63 characters |
source_pbs |
Which backup and disks. Required unless source_vmid is set |
probes |
Required. At least one wire probe, or a qga probe with require_qga: true |
network_recovery |
Guest network recovery settings |
copy_before_boot |
Default auto: copy the disks to the overlay storage before boot when they would not stay cached and there is room. always: copy or fail. never: boot from PBS |
require_quiesced_backup |
Default false. Fail unless the backup froze the file systems or the VM was off |
require_signed_backup |
Default false. Stop the whole run unless the key in CERTISTACK_PBS_KEYFILE verified the backup's signature |
mac |
The NIC's MAC: unique in the plan (clones often share one), not zero, broadcast or multicast |
nic_model |
A PVE NIC model, such as virtio or e1000 |
machine, ostype, bios, scsihw |
Proxmox VE's values, overriding the backup's; validate checks them |
hardware_overrides |
CPU and memory (below) |
What the sandbox VM gets¶
- The backup.
snapshot: "latest"picks the newest backup ofsource_vmid; the report records its path. To retest an older one, give its path (vm/100/2026-09-27T03:00:07Z). - Disks. With
use_backup_config: true, every disk in the backup; without it, those insource_pbs.drives(leave out Cloud-Init drives). - Hardware. With
use_backup_config, CPU, memory andnet0's MAC and model come from the backup; firmware, machine type, SCSI controller and OS type always do. A value the plan sets wins. Extra NICs, VLAN tags and passthrough devices are dropped. - Machine version. If the node's QEMU cannot run the backup's, set
machine:toq35orpc. - UEFI and TPM.
efidisk0andtpmstate0go onto the overlay storage, with their secrets. A backup job that selects all VMs during a test copies them into a new backup group: exclude the sandbox VM IDs (--exclude, or a pool-based selection).
hardware_overrides¶
A missing key or 0 takes the backup's value (with use_backup_config), else the default.
| Key | What it does |
|---|---|
cores |
Default 2; 1 to 256 |
sockets |
Default 1; 1 to 16 |
memory_mb |
Default 2048; 16 to 4194304 |
balloon_mb |
At most the VM's memory |
cpu_weight |
Default 50; 1 to 262144 (PVE's cpuunits) |
source_pbs¶
Left out, it means vm/<source_vmid>/latest, and drive-scsi0 without use_backup_config. With storage_id set,
give snapshot, and drives without use_backup_config.
| Key | What it does |
|---|---|
storage_id |
pbs, the only value |
snapshot |
latest, vm/<vmid>/latest or vm/<vmid>/<RFC 3339 time>, of source_vmid |
drives |
Each entry: a slot (such as scsi0 or virtio0) and the archive backed up from it |
drive |
Alias: one archive, in the slot its name gives (drive-virtio0 is virtio0) |
namespace |
Default storage.pbs_namespace. One run reads one namespace |
network_recovery¶
| Key | What it does |
|---|---|
mode |
Default auto; or ifcfg, networkmanager, netplan, systemd-networkd, ifupdown, or preserve (keep the guest's network, MAC and model) |
sandbox_ip |
net0's address in ip_range, unique in the plan. Not with preserve |
interface_name |
For a legacy profile tied to a name, such as ifcfg-eth0: the guest sees that name |
attach_all_nics |
Default false. Also attach net1 and up, with the guest's own settings. To probe one, set sandbox_ip to net0's address |
capture_diagnostics |
Default false. When a wire probe fails, record the guest's interfaces, routes, sockets and failed services |
Probes¶
Wire probes (tcp, http, dns, ldap, mssql, smb) reach the guest from the node over the sandbox network;
qga runs inside the guest. A VM is verified only when a wire probe or an unskipped qga probe passed within its
timeout_sec; qmp and screendump never verify.
| Key | What it does |
|---|---|
type |
Required. A type below. Aliases: tcp_handshake, http_get, qga_ping, qmp_status |
timeout_sec |
Default 10 |
retries |
Default 0 (keep trying until the timeout), up to 10 |
description |
Shown in the report |
target_ip |
The guest's address: inside ip_range, not probe_ip, one VM's only |
port |
1 to 65535 |
url |
http(s)://<address>[:port]/path, instead of target_ip, port, path and tls |
path |
Default / |
tls |
Use HTTPS |
expected_status |
200 to 599; redirects are not followed |
server_name |
The name the certificate must carry; on http also the SNI and Host header |
domain |
The name to resolve |
transport |
udp (default) or tcp |
record_type |
a (A or AAAA; default) or srv |
base_dn |
auto, or a DN to read |
naming_context |
A DN the directory must advertise; not with base_dn |
command |
One of the allowed commands |
expected_output |
Text the output must contain |
require_qga |
Default false. Fail instead of skip when the agent does not answer; set it for Windows |
tls_skip_verify, insecure_skip_verify |
Rejected: certificates are always verified |
Probe types¶
Wire probes need target_ip and port. A type refuses a key it does not read.
| Type | Also reads | Passes when |
|---|---|---|
tcp |
A TCP handshake completes | |
http |
url, path, tls, server_name, expected_status |
A GET returns expected_status (required); HTTPS certificates verify against the node's trust store |
dns |
path, domain, transport, record_type |
target_ip answers domain; without domain, any well-formed reply |
ldap |
base_dn, naming_context |
An anonymous bind without TLS returns base_dn or shows naming_context (use it for an Active Directory DC) |
mssql |
server_name |
SQL Server answers a TDS PRELOGIN. With server_name, TDS 8.0 strict encryption only |
smb |
The server answers an SMB2 NEGOTIATE |
|
qga |
command, expected_output, require_qga |
The command exits 0 with expected_output |
qmp |
QEMU reports running, even at a kernel panic |
|
screendump |
A screenshot was taken |
qga¶
Allowed commands: hostname, guest-get-host-name, ping, guest-ping, systemctl is-active <service> and
sc query <service> (passes only for 4 RUNNING). Name the unit that runs the service: on Debian and Ubuntu,
postgresql@16-main, not postgresql. Without require_qga: true, an agent silent for about 5 seconds makes the
probe SKIPPED, and a skip is never evidence.
Guest network recovery¶
Before a VM with wire probes boots, CertiStack writes a network profile into its overlay that gives the guest its
probe address. It needs guestfish on the node (setup installs it) and every disk the root file system
needs. When NetworkManager and networkd both match the NIC, set mode yourself. A LUKS or BitLocker volume, or a layout
recovery cannot rewrite safely, fails before boot: use preserve (the guest must unlock without a prompt), or leave
the encrypted disk out.
Windows and appliances¶
Windows guests and appliances such as pfSense or OPNsense fail with unsupported guest network layout. Set
network_recovery.mode: preserve, set ip_range to the guest's own subnet and each target_ip to its address, and
leave out sandbox_ip. The node that runs the test must have no address and no route in that subnet.
Examples¶
Each is a file in examples/. Copy one, then change
each value marked CHANGE and each address, port and unit name:
Three tiers¶
# SPDX-License-Identifier: AGPL-3.0-or-later
# Copyright (C) 2024-2026 Clift Cloud LLC
#
# A three-tier Linux application restored in dependency order: database, then
# application server, then web front end. A tier starts only after every VM and
# probe in the tier before it passed. Copy this file, change the values marked
# CHANGE, and run `certistack validate` on the copy.
#
# Addresses use the RFC 5737 documentation range 192.0.2.0/24, which nearly
# every node leaves unused. The range must not overlap any network the PVE
# node uses (`ip -4 route` on the node lists them): while a run lasts the node
# routes the whole range into the sandbox, so a range the node also has an
# address or route in would take that real traffic into it. Each guest
# receives the address its probes target through COW-only network recovery.
version: "v1"
plan_id: "three-tier-app"
name: "Three-tier application recovery check"
use_backup_config: true
compliance:
# CHANGE: the framework labels the report records (DORA, SOC2, HIPAA,
# ISO27001, CIS_V8; labels, not certifications), or NONE if you have no
# standard to name; NONE stands alone. At least one is required.
frameworks: ["DORA-Article-12"]
retention_days: 365
# Optional recovery-time objective. rto_target_seconds fails the run when the
# whole recovery, including the full integrity scan of every disk (about
# 100 MB/s on older CPUs, see Tested and supported), takes longer. Set it from a
# measured run.
rto_target_seconds: 3600
admission_control:
max_host_ram_percent: 85.0
max_host_iowait_percent: 12.0
defer_retry_interval_sec: 30
max_defer_retries: 10
network:
mode: "simple"
zone_id: "csSbApp1"
vnet_id: "csVnApp1"
ip_range: "192.0.2.0/24"
probe_ip: "192.0.2.1"
storage:
# CHANGE: file-based PVE storage with "images" content for the COW overlays.
overlay_storage: "certistack-scratch"
tiers:
- level: 1
name: "Database"
startup_grace_period_sec: 30
vms:
# vmid is the temporary sandbox VM; it must not already exist on the node.
- vmid: 9101
# CHANGE: the protected VM whose latest PBS backup is being tested.
source_vmid: 201
name: "recovery-check-db01"
source_pbs:
storage_id: "pbs"
snapshot: "latest"
# Uncomment to fail the VM unless its backup was taken with the guest
# agent freezing the file systems (or while powered off).
# require_quiesced_backup: true
probes:
- type: "tcp"
target_ip: "192.0.2.21"
port: 5432
timeout_sec: 120
description: "PostgreSQL accepts connections"
- type: "qga"
# CHANGE: the unit of the database cluster itself. On Debian and
# Ubuntu the bare "postgresql" unit is active with no database
# running, so name the cluster's (`pg_lsclusters` lists its
# version and name). On the RHEL family the unit is "postgresql".
command: "systemctl is-active postgresql@16-main"
expected_output: "active"
timeout_sec: 60
description: "PostgreSQL cluster unit is active inside the guest"
- level: 2
name: "Application"
startup_grace_period_sec: 30
vms:
- vmid: 9102
source_vmid: 202
name: "recovery-check-app01"
source_pbs:
storage_id: "pbs"
snapshot: "latest"
probes:
- type: "http"
target_ip: "192.0.2.22"
port: 8080
path: "/healthz"
expected_status: 200
timeout_sec: 120
description: "Application health endpoint returns 200"
- level: 3
name: "Web"
startup_grace_period_sec: 30
vms:
- vmid: 9103
source_vmid: 203
name: "recovery-check-web01"
source_pbs:
storage_id: "pbs"
snapshot: "latest"
probes:
- type: "http"
target_ip: "192.0.2.23"
port: 443
path: "/"
tls: true
# The certificate chain and this name are always verified; the
# recovered certificate must chain to a CA the node trusts.
server_name: "www.example.com"
expected_status: 200
timeout_sec: 120
description: "Site answers over verified HTTPS"
Windows domain¶
# SPDX-License-Identifier: AGPL-3.0-or-later
# Copyright (C) 2024-2026 Clift Cloud LLC
#
# A Windows domain restored in dependency order: a domain controller first,
# then a SQL Server and a file server together. Copy this file, change the
# values marked CHANGE, and run `certistack validate` on the copy.
#
# Windows guests cannot have their network adapted offline, so each VM sets
# `network_recovery.mode: preserve`: the guest keeps its own address on the
# isolated VNet. Set `network.ip_range` to the subnet the guests use in
# production and each probe's `target_ip` to that guest's own address. The
# rule: `ip_range` must be a network in which the PVE node that runs the test
# has no address and no route (`ip -4 route` on the node shows them), because
# the node routes the whole range into the sandbox while a run lasts. A guest
# that keeps its production address therefore needs a node with no leg in that
# subnet; where every node has one, `plan` refuses the range and the guest has
# to be re-addressed. The 192.0.2.0/24 addresses here are documentation
# placeholders. The guest also keeps the backup's net0 MAC address and NIC
# model; a plan is refused when two of its VMs' backups carry the same MAC (VMs
# cloned from each other do).
#
# A cold Windows boot from a backup is slow and its guest agent can take
# minutes to answer, so the probe budgets are generous. See the troubleshooting
# guide (Issue 27) before shortening them.
version: "v1"
plan_id: "windows-domain"
name: "Windows domain recovery check"
use_backup_config: true
compliance:
# CHANGE: the framework labels the report records (DORA, SOC2, HIPAA,
# ISO27001, CIS_V8; labels, not certifications), or NONE if you have no
# standard to name; NONE stands alone. At least one is required.
frameworks: ["DORA-Article-12"]
retention_days: 365
admission_control:
max_host_ram_percent: 85.0
max_host_iowait_percent: 12.0
defer_retry_interval_sec: 30
max_defer_retries: 10
network:
mode: "simple"
zone_id: "csSbWin1"
vnet_id: "csVnWin1"
# CHANGE: the subnet the guests use in production.
ip_range: "192.0.2.0/24"
# A free address in ip_range that no guest uses.
probe_ip: "192.0.2.250"
storage:
# CHANGE: file-based PVE storage with "images" content. A UEFI guest needs
# one, and Windows VMs are often UEFI.
overlay_storage: "certistack-scratch"
tiers:
- level: 1
name: "Domain controller"
startup_grace_period_sec: 60
vms:
- vmid: 9201
# CHANGE: the protected domain controller.
source_vmid: 301
name: "recovery-check-dc01"
source_pbs:
storage_id: "pbs"
snapshot: "latest"
network_recovery:
mode: "preserve"
probes:
- type: "ldap"
target_ip: "192.0.2.10"
port: 389
# Reads the Root DSE only; AD refuses anonymous directory searches.
naming_context: "DC=example,DC=com"
timeout_sec: 300
description: "Domain controller serves example.com"
- type: "dns"
target_ip: "192.0.2.10"
port: 53
domain: "_ldap._tcp.dc._msdcs.example.com"
record_type: "srv"
timeout_sec: 300
description: "DC locator records are served"
- type: "qga"
command: "sc query NTDS"
require_qga: true
timeout_sec: 300
description: "Active Directory Domain Services is running"
- level: 2
name: "Services"
startup_grace_period_sec: 60
vms:
- vmid: 9202
source_vmid: 302
name: "recovery-check-sql01"
source_pbs:
storage_id: "pbs"
snapshot: "latest"
network_recovery:
mode: "preserve"
probes:
- type: "mssql"
target_ip: "192.0.2.20"
port: 1433
timeout_sec: 300
description: "SQL Server answers its protocol"
- type: "qga"
command: "sc query MSSQLSERVER"
require_qga: true
timeout_sec: 300
description: "SQL Server service is running"
- vmid: 9203
source_vmid: 303
name: "recovery-check-fs01"
source_pbs:
storage_id: "pbs"
snapshot: "latest"
network_recovery:
mode: "preserve"
probes:
- type: "smb"
target_ip: "192.0.2.21"
port: 445
timeout_sec: 300
description: "File server answers SMB"