I have noticed a problem when I perform host reboot:
after rebooting the host, the VMs that previously were RUNNING are still detected as running and only after a while (some minutes) their state get automatically changed to POWEROFF.
This gives me some troubles because I would like to have VMs getting suspended or properly shutdown during host shutdown (since I only have one host) and automatically restarted when the host is up again.
I have checked this post but it does not work since it never happens that the VM has STATE = ACTIVE and LCM_STATE = UNKNOWN . Somebody else reported the same issue but without any solution.
This is what I see on the VM log:
Sun Dec 6 18:54:08 2020 [Z0][VM][I]: New LCM state is RUNNING Sun Dec 6 18:59:09 2020 [Z0][LCM][I]: VM running but monitor state is POWEROFF Sun Dec 6 18:59:09 2020 [Z0][VM][I]: New LCM state is SHUTDOWN_POWEROFF Sun Dec 6 18:59:09 2020 [Z0][VM][I]: New state is POWEROFF Sun Dec 6 18:59:09 2020 [Z0][VM][I]: New LCM state is LCM_INIT
At 18:54:08 I have started the VM and I have then immediately rebooted the host. One minute later the host was up again but it took 4 minutes to detect the poweroff status. During another attempt it took more than 10 minutes to detect this.
I am running OpenNebula 126.96.36.199-1.ce on Ubuntu 20.04.
Summarizing: I would like to properly shutdown and restart VMs during host reboot but I can’t because of this weird behaviour.
Thank you in advance for your help.