[Openstack] Recover data after VM crash
    Vishvananda Ishaya 
    vishvananda at gmail.com
       
    Fri Oct 12 17:27:12 UTC 2012
    
    
  
On Oct 12, 2012, at 9:10 AM, Ben <ben.div at gmail.com> wrote:
> Hi the list,
> 
> I have an instance in inconsistent state, and I would like to recover the data stored in.
> 
> The story : I had a very high load average on the instance, so I decided to reboot it with nova reboot command. The instance didn't went up (may be root fs corruption ?), so I tried to rescue it with nova rescue command.
> 
> Now when I try to start the instance, I see in the compute log an exception message telling that kernel.rescue file is not present. Same thing if I try to unrescue (playing with state in db to allow the command).
> 
> So I'm stuck with a probably broken image, in a broken rescue state.
> 
> Questions :
> - how can I rescue or unrescue the instance ?
Does your instance have a separate kernel and ramdisk? I'm not quite sure what went wrong with rescue, but you might try navigating to the instance directory and doing something like
cp kernel kernel.rescue
cp ramdisk ramdisk.rescue
You could also attempt to change the xml in libvirt to get it bootable again using virsh
virsh dumpxml <instance-id>
> - how can I recover the data (by mounting instance file to browse its content ?)
You can mount the instances root filesystem using qemu-nbd.  An example of doing this is in my nova-debug script here:
https://github.com/vishvananda/novatools/blob/master/nova-debug#L51
Vish
    
    
More information about the Openstack
mailing list