Power outage, nobody is on site, UPS is about to give up. UPS sends signal to the host to shut down and the host initiates soft shut down procedure. How can I make so that the host first shuts down all VMs gracefully, then stops all Opennebula services (I think this one happens automatically) and after that shuts down itself.
Now the opposite scenario: I power on the host, it starts all Opennebula services (this one happens automatically), and finally it powers on all VMs that were shut down in the first scenario.
The action you should execute is a poweroff or a suspend. VMs in poweroff/suspend are shutdown, but the disks are left in the host. These VMs are ready to be resumed in a moment when the host is back.
A stop/undeploy will move the disks back to the system DS, and this takes more time.