To Gain Knowledge and to become a one, who all wants to become

Dreams are not those which are seen during sleep ,but Dreams are those which do not let you sleep,so see the dreams
and work hard to make them true.

Monday, October 25, 2010

How to recover VM on Xenserver When VM is not bootable from updated kernel (Citrics XenServer )

1 . Create/Restore an new VM (say rescue vm )on the xenserver where the crashed VM is located.

2 . Stop the  rescue  vm and deattach the storage device .

3 . Attach this storage  device on crashed vm .

4 . Change the crashed disk vbd to non bootable after checking with below command

    xe vm-disk-list vm="crashedvm name" l ( It will list the storage devices with their uuid's ,for each disk there is a vdi and vbd uuid )

  xe vbd-param-set uuid=7f6a1563-fc76-31d8-49c2-c03466ca836b bootable=false

5 . Change the rescue vm disk vbd  to bootable .

  xe vbd-param-set uuid=5f64a143633-fc76-313-59a2-d13466ca3egf bootable=true

6  Start the crashed vm ,it will boot with the rescue vm's disk.
    Now ,mount the  original disk  whose vbd you  changed to non bootable earlier .

    mount /dev/xvda /mnt

7 . Going  to /mnt ,we will get the old filesystem.
     cd /mnt/boot/

    Changed the grub.conf default  entry   to 1 i.e the older version of kernel is selected( as i have updated the
    kernel after which vm  does not starts)

8. Stop the this crash vm again .

9 . Deattach  the rescue disk from the crashed vm and change the crashed disk's vbd again to bootable .
       xe vbd-param-set uuid=7f6a1563-fc76-31d8-49c2-c03466ca836b bootable=true.

10 .Now try to start it  and now it is  bootable (from earlier  kernel.)

No comments:

Post a Comment