[关闭]
@Alex-Zhao 2018-04-17T15:10:48.000000Z 字数 1392 阅读 121

OpenStack宿主机故障冷迁移虚拟机

OpenStack


  1. # nova service-list
  1. # nova hypervisor-servers <compute150>
  1. # nova host-servers-migrate <compute152>
  2. +--------------------------------------+--------------------+---------------+
  3. | Server UUID | Migration Accepted | Error Message |
  4. +--------------------------------------+--------------------+---------------+
  5. | 7791d902-590c-4045-b813-08ce7b8d5540 | True | |
  6. | f9053c9e-8fdd-4c93-82b5-406e5926c6d2 | True | |
  7. | af7c6632-4c08-45a7-ac3a-acee0b22c3d3 | True | |
  8. | f10559b8-51ef-43de-a575-f3054bc0ed7d | True | |
  9. | 74697f65-ac36-4755-aff4-c32b3e67c8c8 | True | |
  10. | 5b49346e-06da-44da-bdd9-fcfe6f669ce4 | True | |
  11. | c19b3fcb-307a-4202-ac0e-66224cb20235 | True | |
  12. | 99ffe3b4-4ab7-4f68-9f7f-4750c924772d | True | |
  13. | 400eec93-cd7e-4a2c-9a5c-77e55974ec0a | True | |
  14. | 4bbcb564-3859-4e7a-ae39-1a5cf48d0bd8 | True | |
  15. | b2dbc7a7-186e-4f39-8c6a-0262f7c2a651 | True | |
  16. | 1396b35f-80ea-4c8a-bd31-ee2b6c966913 | True | |
  17. +--------------------------------------+--------------------+---------------+
  1. # openstack server list | grep VERIFY_RESIZE
  1. for a in $(openstack server list | grep VERIFY_RESIZE | awk '{print$2}'); do echo $a; nova resize-confirm $a ;done

PS:其他冷迁移或者故障恢复命令

  1. nova evacuate Evacuate server from failed host.
  2. nova host-servers-migrate Cold migrate all instances off the specified host to other available hosts.
  3. nova migrate Migrate a server. The new host will be selected by the scheduler.

nova evacuate命令容易发生脑裂(两个虚拟机挂载同一个磁盘)
以上迁移都需要保证有共享存储情况下。

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注