- XenServer 6.0.2 Build 53456p
- Ubuntu 12.04
Mar 17 00:58:40 srv xapi: [error|srv|1959896 unix-RPC|VM.start R:7321d8dea9e4|xapi] Vmops.start_paused caught: Using <class 'grub.GrubConf.Grub2ConfigFile'> to parse /boot/grub/grub.cfg: [ Traceback (most recent call last):; File "/usr/bin/pygrub", line 850, in ?; raise RuntimeError, "Unable to find partition containing kernel"; RuntimeError: Unable to find partition containing kernel; ]
The origin of this problem is incompatibility of XenServer with pygrub2 bootloader.
As a prerequisite, install vim :-)
First we need to show Xen where is the kernel that we want.
$ xe vm-list
note down the VM UUID that you need to resurrect.
Then we need to edit the grub config on the VM’s disk:
- Comment out any submenu sections completely, leave only the default newest kernel.
- Note down the 1/ kernel path, 2/ the initramdisk path and 3/ the root partition UUID/path, example:
Now, just in case, note down VM params before changing them:
And set the boot params for the VM with previously noted values:
Now you should be able to start the VM:
xe vm-start vm=<name>
Step 2 - install standard grub
When you successfully boot up the VM, deinstall the problematic pygrub2 and replace with standard grub.