You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xapi_vm_migrate: Fix reservations not being cleared on halted VMs (#6648)
Cross-pool migrations set `scheduled_to_be_resident_on` to the
destination host, reserving memory and vGPUs. If the VM is still halted
when migration is finished, the field is not cleared on the destination,
preserving the reservations even though they're not necessarily going to
be used anytime soon.
Call `force_state_reset_keep_current_operations` in
`pool_migrate_complete` on the destination to clear the reservations
among other things at the end of the migration.
This fixes an issue when VMs migrated across pools in a halted state
would take up memory in xapi's view (but not in RRD's view), which is
not intuitive and could prevent further migrations from claiming enough
free memory on the host.
---
I've tested this manually, confirming that migrating halted and running
VMs works as designed, with the `scheduled_to_be_resident_on` field
cleared at the end of the migration (in the first case it's because of
the fix, in the second one it's because the VM is actually started on
the host)
0 commit comments