在做openstack的vm迁移的时候出现ERROR。无法启动虚拟机,也没有迁移成功。


在出现ERROR的时候在一个测试用的vm上,使用dashboard里面的重建功能也可恢复正常状态,并且数据也不会丢失还是和之前的一样。


恢复ERROR状态到active的方法如下:

  1. 找出该VM的id。

  2. 查找数据库的该id状态。

  3. use nova;

  4. select * from instances where uuid='xxxxxx' \G;

  5. update instances set vm_state='active' where uuid='xxxxx';

  6. update instances set power_state=1 where uuid='xxxxxx';

  7. 硬重启该VM即可。