OpenStack supports cancelling "queued" live-migration by "nova live-migration-abort", but state of canceled instance remains "MIGRATING".
# nova list +--------------------------------------+---------------------------------------+--------+------------+-------------+--------------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+---------------------------------------+--------+------------+-------------+--------------------------+ | 18da36b8-9d90-4f6b-91f8-92997f8b7849 | live_migration_abort_queued_iscsi_vm1 | ACTIVE | - | Running | net_kobe4=192.168.200.2 | ... | 712ef470-95d0-438b-9aac-8a7259f3c872 | live_migration_abort_queued_iscsi_vm5 | ACTIVE | - | Running | net_kobe4=192.168.200.5 | +--------------------------------------+---------------------------------------+--------+------------+-------------+--------------------------+ # nova live-migration live_migration_abort_queued_iscsi_vm1 osp14-cn-1.novalocal ... # nova live-migration live_migration_abort_queued_iscsi_vm5 osp14-cn-1.novalocal # nova migration-list --instance-uuid 712ef470-95d0-438b-9aac-8a7259f3c872 | grep -w 712ef470-95d0-438b-9aac-8a7259f3c872 | sort -k 2 -n | tail -n 1 | awk '{print $16}' queued # mig_id=$(nova migration-list --instance-uuid 712ef470-95d0-438b-9aac-8a7259f3c872 | grep -w 712ef470-95d0-438b-9aac-8a7259f3c872 | sort -k 2 -n | tail -n 1 | awk '{print $2}') # nova --os-compute-api-version 2.65 live-migration-abort 712ef470-95d0-438b-9aac-8a7259f3c872 $mig_id # nova migration-list +----+--------------------------------------+----------------------+----------------------+----------------------+----------------------+-----------+-----------+--------------------------------------+------------+------------+----------------------------+----------------------------+----------------+ | Id | UUID | Source Node | Dest Node | Source Compute | Dest Compute | Dest Host | Status | Instance UUID | Old Flavor | New Flavor | Created At | Updated At | Type | +----+--------------------------------------+----------------------+----------------------+----------------------+----------------------+-----------+-----------+--------------------------------------+------------+------------+----------------------------+----------------------------+----------------+ ... | 33 | f83cbcff-2a42-4259-a484-8ae621635a2a | osp14-cn-2.novalocal | osp14-cn-1.novalocal | osp14-cn-2.novalocal | osp14-cn-1.novalocal | - | cancelled | 712ef470-95d0-438b-9aac-8a7259f3c872 | 1 | 1 | 2019-07-05T07:06:45.000000 | 2019-07-05T07:06:53.000000 | live-migration | +----+--------------------------------------+----------------------+----------------------+----------------------+----------------------+-----------+-----------+--------------------------------------+------------+------------+----------------------------+----------------------------+----------------+ # nova list +--------------------------------------+---------------------------------------+-----------+------------+-------------+--------------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+---------------------------------------+-----------+------------+-------------+--------------------------+ | 18da36b8-9d90-4f6b-91f8-92997f8b7849 | live_migration_abort_queued_iscsi_vm1 | ACTIVE | - | Running | net_kobe4=192.168.200.2 | ... | 712ef470-95d0-438b-9aac-8a7259f3c872 | live_migration_abort_queued_iscsi_vm5 | MIGRATING | migrating | Running | net_kobe4=192.168.200.5 | +--------------------------------------+---------------------------------------+-----------+------------+-------------+--------------------------+
OpenStack supports cancelling "queued" live-migration by "nova live-migration- abort", but state of canceled instance remains "MIGRATING".
# nova list ------- ------- ------- ------- ------- --+---- ------- ------- ------- ------- ------- +------ --+---- ------- -+----- ------- -+----- ------- ------- ------- + ------- ------- ------- ------- ------- --+---- ------- ------- ------- ------- ------- +------ --+---- ------- -+----- ------- -+----- ------- ------- ------- + 9d90-4f6b- 91f8-92997f8b78 49 | live_migration_ abort_queued_ iscsi_vm1 | ACTIVE | - | Running | net_kobe4= 192.168. 200.2 | 95d0-438b- 9aac-8a7259f3c8 72 | live_migration_ abort_queued_ iscsi_vm5 | ACTIVE | - | Running | net_kobe4= 192.168. 200.5 | ------- ------- ------- ------- ------- --+---- ------- ------- ------- ------- ------- +------ --+---- ------- -+----- ------- -+----- ------- ------- ------- + abort_queued_ iscsi_vm1 osp14-cn- 1.novalocal abort_queued_ iscsi_vm5 osp14-cn- 1.novalocal 95d0-438b- 9aac-8a7259f3c8 72 | grep -w 712ef470- 95d0-438b- 9aac-8a7259f3c8 72 | sort -k 2 -n | tail -n 1 | awk '{print $16}' 95d0-438b- 9aac-8a7259f3c8 72 | grep -w 712ef470- 95d0-438b- 9aac-8a7259f3c8 72 | sort -k 2 -n | tail -n 1 | awk '{print $2}') api-version 2.65 live-migration- abort 712ef470- 95d0-438b- 9aac-8a7259f3c8 72 $mig_id ---+--- ------- ------- ------- ------- ------- +------ ------- ------- --+---- ------- ------- ----+-- ------- ------- ------+ ------- ------- ------- -+----- ------+ ------- ----+-- ------- ------- ------- ------- ------- -+----- ------- +------ ------+ ------- ------- ------- ------- +------ ------- ------- ------- -+----- ------- ----+ ---+--- ------- ------- ------- ------- ------- +------ ------- ------- --+---- ------- ------- ----+-- ------- ------- ------+ ------- ------- ------- -+----- ------+ ------- ----+-- ------- ------- ------- ------- ------- -+----- ------- +------ ------+ ------- ------- ------- ------- +------ ------- ------- ------- -+----- ------- ----+ 2a42-4259- a484-8ae621635a 2a | osp14-cn- 2.novalocal | osp14-cn- 1.novalocal | osp14-cn- 2.novalocal | osp14-cn- 1.novalocal | - | cancelled | 712ef470- 95d0-438b- 9aac-8a7259f3c8 72 | 1 | 1 | 2019-07- 05T07:06: 45.000000 | 2019-07- 05T07:06: 53.000000 | live-migration | ---+--- ------- ------- ------- ------- ------- +------ ------- ------- --+---- ------- ------- ----+-- ------- ------- ------+ ------- ------- ------- -+----- ------+ ------- ----+-- ------- ------- ------- ------- ------- -+----- ------- +------ ------+ ------- ------- ------- ------- +------ ------- ------- ------- -+----- ------- ----+ ------- ------- ------- ------- ------- --+---- ------- ------- ------- ------- ------- +------ -----+- ------- ----+-- ------- ----+-- ------- ------- ------- ---+ ------- ------- ------- ------- ------- --+---- ------- ------- ------- ------- ------- +------ -----+- ------- ----+-- ------- ----+-- ------- ------- ------- ---+ 9d90-4f6b- 91f8-92997f8b78 49 | live_migration_ abort_queued_ iscsi_vm1 | ACTIVE | - | Running | net_kobe4= 192.168. 200.2 | 95d0-438b- 9aac-8a7259f3c8 72 | live_migration_ abort_queued_ iscsi_vm5 | MIGRATING | migrating | Running | net_kobe4= 192.168. 200.5 | ------- ------- ------- ------- ------- --+---- ------- ------- ------- ------- ------- +------ -----+- ------- ----+-- ------- ----+-- ------- ------- ------- ---+
+-
| ID | Name | Status | Task State | Power State | Networks |
+-
| 18da36b8-
...
| 712ef470-
+-
# nova live-migration live_migration_
...
# nova live-migration live_migration_
# nova migration-list --instance-uuid 712ef470-
queued
# mig_id=$(nova migration-list --instance-uuid 712ef470-
# nova --os-compute-
# nova migration-list
+-
| Id | UUID | Source Node | Dest Node | Source Compute | Dest Compute | Dest Host | Status | Instance UUID | Old Flavor | New Flavor | Created At | Updated At | Type |
+-
...
| 33 | f83cbcff-
+-
# nova list
+-
| ID | Name | Status | Task State | Power State | Networks |
+-
| 18da36b8-
...
| 712ef470-
+-