當虛機系統不能啓動時(前提是系統盤保存在rbd,而不是cinder中),在openstack環境的修復辦法(建議在修復前先給虛機打個鏡像)數據庫
一、使用nova rescue <server> 會從虛機初始鏡像啓動實例,將實例的原有磁盤會作爲second硬盤
二、啓動後將第二硬盤聯機就能夠修復了。
三、修復系統完成後,須要將虛機從rescue恢復到正常模式。windows
儘可能在測試環境使用nova rescue命令,本人就遇到了windows機器在unrescue後出現boot分區文件設置問題致使不能啓動的狀況。
ide
當unrescue後提示不能啓動時,須要從新進入unrescue模式,給boot分區增長盤符,並使用bcdedit命令將boot分區的3個參數修改一下:
(e:\爲隱藏的100M分區)測試
bcdedit /store e:\boot\bcd /set {bootmgr} device partition=c:
bcdedit /store e:\boot\bcd /set {default} device partition=c:
bcdedit /store e:\boot\bcd /set {default} osdevice partition=c:server
修改完成後再 unrescue 就能夠恢復了。blog