redhat:virtualization-redhat:kvm-suspend-restore-vm-on-reboot

To suspend a VM on host shutdown you will need to configure the following file

# vim /etc/sysconfig/libvirt-guests

Set the following options (which are located throughout the configuration file).

ON_BOOT=start
...
ON_SHUTDOWN=suspend
...

You might also want to use START_DELAY=5, that the virtual machines start up with a little staggering rather than concurrently.

The libvirt-guests service also needs to be enabled and started.

# systemctl enable libvirt-guests --now

You will now be able to reboot the host machine to install updates etc. and the virtual machines will be suspended and restored rather than shutdown interrupting their jobs.

  • redhat/virtualization-redhat/kvm-suspend-restore-vm-on-reboot.txt
  • Last modified: 2020/09/02 12:40
  • by michael