On Fri, Mar 13, 2026 at 06:01:56 -0000, Roy Orbitson via Devel wrote:
Ahh, that is excellent. I didn't find that, and the version I'm working with pre-dates that feature.
If I'm correct in thinking this does not cover the case where `on_poweroff` is set to restart, which cannot be altered on a running VM, so the await can never see an inactive state... then a cold reboot option could still be worthwhile.
You can also temporarily override the poweroff action via: virsh set-lifecycle-action --live DOM --action destroy That doesn't influence the next-boot config.
Otherwise, I guess one must run something like:
virsh destroy <domain> --graceful && virsh await <domain> --condition domain-inactive && virsh start <domain>
'virsh destroy' even with the --graceful flag will not wait for OS shutdown. It will just avoid sending SIGKILL if the previous SIGTERM is ignored by (a stuck) qemu. A normal 'virsh destroy' does use SIGTERM too, just follows up with SIGKILL if it's taking too long. Thus using await in the above scenario makes little sense because the return code from virsh destroy will tell you if qemu quit or not.