You are done with a container. You stop it. A week later it is running again, or your phone goes off at 3am about a host being down that you turned off yourself. Stopping a guest is one command. Retiring one is three switches, and the order matters.
Stopped and kept is the right default for something you might want back. The disk stays, the backups stay, and you can read the logs later.
If you are certain you want it gone, destroy it and skip most of this. A guest that does not exist cannot restart itself and cannot page you.
Silence monitoring first. Then stop it. Do not do it the other way around or you page yourself during your own maintenance.
Schedule a downtime for the host. In Checkmk that is one API call, and it takes effect immediately with no activate-changes cycle:
curl -s -X POST \
-H "Authorization: Bearer $USER $SECRET" \
-H "Content-Type: application/json" \
"http://$SERVER/$SITE/check_mk/api/1.0/domain-types/downtime/collections/host" \
-d '{"downtime_type":"host",
"host_name":"oldbox",
"start_time":"2026-01-01T00:00:00Z",
"end_time":"2027-01-01T00:00:00Z",
"comment":"Retired on purpose. Expected DOWN, not an incident."}'
A host downtime covers that host's services too, so you do not need one per check.
Write the reason in the comment. Future you will find this host in a downtime list with no idea why.
Set it with command pct set <VMID> --onboot 0 for a container, or
qm set <VMID> --onboot 0 for a VM.
Miss this and the guest is back the next time the host reboots. Which will not be today, so you will have completely forgotten by then.
Check what it was first with command pct config <VMID> | grep onboot. Plenty of guests
were built with onboot: 1 and nobody remembers setting it.
If you run something that restarts guests that should be running, it will undo everything above.
A well built watchdog uses onboot: 1 as its opt-in test. If yours does, step 2 already
excluded this guest and you are finished. Prove it rather than assume it:
grep -qE '^onboot: *1' <(pct config <VMID>) \
&& echo "WOULD BE RESTARTED" \
|| echo "excluded"
If your watchdog uses its own allow list instead, edit that list. The rule is the same either way. Exclude the one guest, never disable the watchdog.
pct shutdown <VMID> --timeout 60 || pct stop <VMID>
pct status <VMID>
Try the graceful shutdown first and fall back to the hard stop. A container with nothing left running shuts down in a second or two.
A stopped guest still backs up. vzdump handles it, and the backup is arguably more useful now
than it was before, because it is the only copy of a thing nobody is maintaining.
Removing it from the backup job is how a retired guest becomes an unrecoverable one the day you decide you wanted it after all.
Put one line somewhere permanent. What it was, when you retired it, and why.
A stopped guest with no explanation gets restarted by whoever finds it next, including you.
pct status <VMID> # stopped
pct config <VMID> | grep onboot # onboot: 0
ls /etc/<watchdog>/hold # should NOT exist
Then look at your monitoring and confirm the host shows in downtime rather than critical.
Every layer you add to keep things running is a layer that fights you when you want something stopped. Autostart, watchdogs, HA and alerting are all doing their job when they drag a retired guest back up or page you about it. Turning a service off is not one action. It is one action per layer that has an opinion about whether it should be on.