如何拯救“rescue”一个虚机!

总的来说就是:To "resurrect" a instance on an other host you have to set it to state  "shutdown" in the database, change host value in database, define the instance in new hypervisor and start it. 


第一步:在数据库中,将虚机的状态设置为“shutdown”

Try to have a look at a database-entries of an instance which you stopped with "nova stop {instance-name}" and adjust necessary columns in the entry of the instance to be resurrected. Look for table instances in  nova db. Then set the instance to be resurrected to the same state as the stopped instance.


第二步:修改虚机的instance表中的host属性

-Next change the host value in database of this instance to an available host. 


第三步:(如果不使用共享存储)将虚机的相关文件copy到新的主机上

Copy over the instance-files to the new host if you are not using shared storage or whatever...


第四步:在新的host上执行virsh define命令

Take action to define your instance in hypervisor. How to do this depends on what type of hypervisor you are using. 


第五步:在新的主机上执行 nova start ****

-Now you should be able to start your instance on the new host via "nova start {instance-name}". 


参考链接:http://www.gossamer-threads.com/lists/openstack/dev/20950

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值