@Alex-Zhao
2018-04-17T15:10:48.000000Z
字数 1392
阅读 121
OpenStack
# nova service-list
# nova hypervisor-servers <compute150>
# nova host-servers-migrate <compute152>
+--------------------------------------+--------------------+---------------+
| Server UUID | Migration Accepted | Error Message |
+--------------------------------------+--------------------+---------------+
| 7791d902-590c-4045-b813-08ce7b8d5540 | True | |
| f9053c9e-8fdd-4c93-82b5-406e5926c6d2 | True | |
| af7c6632-4c08-45a7-ac3a-acee0b22c3d3 | True | |
| f10559b8-51ef-43de-a575-f3054bc0ed7d | True | |
| 74697f65-ac36-4755-aff4-c32b3e67c8c8 | True | |
| 5b49346e-06da-44da-bdd9-fcfe6f669ce4 | True | |
| c19b3fcb-307a-4202-ac0e-66224cb20235 | True | |
| 99ffe3b4-4ab7-4f68-9f7f-4750c924772d | True | |
| 400eec93-cd7e-4a2c-9a5c-77e55974ec0a | True | |
| 4bbcb564-3859-4e7a-ae39-1a5cf48d0bd8 | True | |
| b2dbc7a7-186e-4f39-8c6a-0262f7c2a651 | True | |
| 1396b35f-80ea-4c8a-bd31-ee2b6c966913 | True | |
+--------------------------------------+--------------------+---------------+
# openstack server list | grep VERIFY_RESIZE
for a in $(openstack server list | grep VERIFY_RESIZE | awk '{print$2}'); do echo $a; nova resize-confirm $a ;done
PS:其他冷迁移或者故障恢复命令
nova evacuate Evacuate server from failed host.
nova host-servers-migrate Cold migrate all instances off the specified host to other available hosts.
nova migrate Migrate a server. The new host will be selected by the scheduler.
nova evacuate命令容易发生脑裂(两个虚拟机挂载同一个磁盘)
以上迁移都需要保证有共享存储情况下。