Clarification on Windows VM Showing Fake Running State After Poweroff in OpenNebula

HI,

I am encountering an issue with a Windows virtual machine managed by OpenNebula (Nebula platform).

After performing either a hard or soft power off, the VM correctly transitions to the POWEROFF state. However, after approximately 2 minutes, the VM unexpectedly transitions back to RUNNING state in the OpenNebula UI, although it is actually powered off. This state persists for around 10 minutes, after which the VM status automatically corrects itself back to POWEROFF.

Here are the relevant log entries from /var/log/one/245598.log:

Thu May  1 09:06:12 2025 [Z0][VM][I]: New state is POWEROFF
Thu May  1 09:09:55 2025 [Z0][VMM][I]: VM found again by the drivers
Thu May  1 09:09:55 2025 [Z0][VM][I]: New state is ACTIVE
Thu May  1 09:09:55 2025 [Z0][VM][I]: New LCM state is RUNNING
Thu May  1 09:17:55 2025 [Z0][LCM][I]: VM running but monitor state is POWEROFF
Thu May  1 09:17:55 2025 [Z0][VM][I]: New state is POWEROFF

As observed, OpenNebula marks the VM as RUNNING even though:

  • The VM is not present in virsh list on the host (i.e., it’s actually stopped).
  • The monitoring later detects it as POWEROFF and updates the state correctly after ~10 minutes.

Query:

Could you please clarify why OpenNebula shows the VM in a “fake running” state for several minutes after shutdown? Is this behavior related to the probe interval or caching mechanism in the monitoring drivers?

Any suggestions to reduce this delay or prevent the temporary false state would be greatly appreciated.