Return to

KVM: graceful shutdown of VMs using Arch / Manjaro?


Can’t have KVM/QEMU gracefully shutdown VMs when initiating a host reboot with Arch Linux or Manjaro. No problem with Debian based distros!!
Any ideas why?


Welp… It is Arch so you probably have to do an DIY solution… :wink:
Look at virsh command line tools.
You could make an systemd service unit that will ensure guests are shutdown with following:
~# virsh destroy --graceful <guest-domain>

And in the .service unit file:

ExecStop=/bin/bash -c "virsh destroy --graceful "

Above systemd unit does nothing at start but via implicit the ExecStop= command is ran thus soft poweroff:ing the guest. (on host shutdown that is)
I’m not sure if does arch provide similar or better solution already…