How to save the state of VMs when the host is shut down?

If the shutdown node:

  1. Try to migrate to other hosts
  2. If it was not possible to migrate to another host, then execute virch save DOMAIN FileName.save

This necessity is due to the fact that the cluster is used only from 3 nodes. However, they are all in the same rack. In the event of a power outage, the UPS will give the OS command to shut down (you can configure your own additional script).
As a result, no VM will be able to migrate anywhere.
In this case, it is necessary to save the state, and not to complete the work (not everyone supports ACPI), an analogue of the [virsh save] command. So that when the node is turned on, this VM is loaded from the saved state.


Versions of the related components and OS (frontend, hypervisors, VMs): OpenNebula 6.0.0.2, QEMU/KVM, Win/Linux

Thanks in advance to anyone who can help with advice.

Hi @sys-admin.su,

This looks like a feature request, it’s better to open this in the GitHub repository so the development team can be aware of it. The forum is still a great place for question and discussions :slight_smile:

I was hoping to see an answer that would just tell me how to do it :slight_smile: