Migrate action is not available for state RUNNING

Hi all,

I am trying to reboot my OpenNebula cluster. I am using onehost flush $nodename for live-migrating all the running VMs off the node to be rebooted. However, one of my VMs refuse to migrate, with the following error message visible in Sunstone:

Scheduler Error
Mon May 19 09:07:34 2025: Cannot dispatch VM to any Host. Possible reasons: Not enough capacity in Host or System DS, dispatch limit reached, or limit of free leases reached. 

From the command line, the error message is different, and somewhat confusing:

# onevm migrate --live $vmid $nodeid
[one.vm.migrate] Migrate action is not available for state RUNNING

The same error message is also in sched.log:

Mon May 19 09:09:51 2025 [Z0][VM][E]: Error deploying virtual machine XXXX to HID: 62. Reason: [one.vm.migrate] Migrate action is not available for state RUNNING
Mon May 19 09:09:51 2025 [Z0][VM][E]: Error deploying virtual machine XXXX to HID: 61. Reason: [one.vm.migrate] Migrate action is not available for state RUNNING

I tried to shutdown OpenNebula processes and run onedb fsck just in case there was some kind of inconsistency in the database, but even after that the VM cannot be live-migrated away from the host to be rebooted, with the same error message.

This is ONe 6.10.0 CE on AlmaLinux 9 hosts.

How can I tell ONe to migrate this VM? Thanks for any hint,

-Yenya

The code at one/src/rm/RequestManagerVirtualMachine.cc at master · OpenNebula/one · GitHub that generates this error string has three conditions, so you should see what condition is triggering the message.

Hint: RUNNING is an LCM_STATE. The vm->state_str() function returns the LCM_STATE status when the VM’s STATE==ACTIVE.

Hope this helps,
Anton Todorov