You are trying to live migrate VM using the command but it goes into an error state:
# nova --os-compute-api-version 2.67 live-migration --force <instance UUID> compute0#
Message
Failed to retrieve allocations for consumer <instance id>: Expected to find allocations for source node resource provider <resource provider UUID>. Retry the operation without forcing a destination host.
Code
500
# openstack --debug resource provider allocation show <resource provider UUID>
RESP: [200] Connection: Keep-Alive Content-Length: 19 Content-Type: application/json Date: Mon, 25 Jul 2022 07:10:53 GMT Keep-Alive: timeout=5, max=100 Server: Apache openstack-api-version: placement 1.0 vary: openstack-api-version x-openstack-request-id: req-########-####-####-####-############
RESP BODY: {"allocations": {}}
GET call to placement for https://192.168.46.35:8778/allocations/<insance UUID> used request id req-########-####-####-####-############
7.x
You can run these commands with --dry-run
to not commit any changes.
nova-manage placement heal_allocations
inside nova-osapi pod:
[root@nova-api-osapi-#### /]# nova-manage placement heal_allocations --instance <instance UUID>
nova-osapi
pod: [root@nova-api-osapi-#### /]# nova-manage placement heal_allocations
Note: If there are too many instances to fix, user can specify --max-count
option to limit the max count to fix each attempt.