Matthew Law
2009-Dec-05 16:09 UTC
[Xen-users] PVGrub can''t find config file for domU on logical volume
After hours of googling and not really finding a definitive solution to my problem, I''m a little stuck and would really appreciate some help from others. I have a CentOS 5.4 x86-64 server running Xen 3.3 from the gitco repos as dom0. On this I have created two logical volumes comprising 8GB for the system disk (xvda) and 1.5GB for swap (xvdb). I ran mkfs.ext3 and mkswap on these to create the required filesystems and then I mounted the 8GB volume and copied a system image onto it. After creating the xen config and starting it with pygrub the machine starts and runs without error - so far, so good! Now, If I shutdown the vm and change the config to use pvgrub and restart I am stuck at a grub prompt. If I manually tell it where to find the config file (using the exact same path as in the ''extra'' line in the domu config) it pvgrub starts and everything then runs as expected. Here is my config: --- snip --- name = "pvgrubtestvm" vcpus = 1 memory = 512 maxmem = 512 # pvgrub kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz" extra = "(hd0)/boot/grub/menu.lst" #end pvgrub dhcp = "dhcp" disk = [ "phy:/dev/VolGroupVM/pvgrubtestvm,xvda1,w", "phy:/dev/VolGroupVM/pvgrubtestvm-swap,xvda2,w" ] vif = [ "mac=00:16:3e:00:00:09,ip=192.168.1.12,bridge=xenbr0,vifname=vifpvgrubtestvm" ] on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' --- snip --- Have I done something wrong? Is this an issue with pvgrub and logical volumes - i.e. no partition table? Many thanks, Matt. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Matthew Law
2009-Dec-08 12:52 UTC
Re: [Xen-users] PVGrub can''t find config file for domU on logical volume
Sorry to reply to my own post, but still not making any progress with this. Here''s my domU config file which is working with pyGrub. # -*- mode: python; -*- name = "testvm" vcpus = 1 memory = 1024 maxmem = 1024 # pygrub bootloader = "/usr/bin/pygrub" # end pygrub # pvgrub #kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz" #extra = "(hd0,0)/boot/grub/menu.lst" #end pvgrub dhcp = "dhcp" disk = [ "phy:/dev/VolGroupVM/testvm,xvda,w", "phy:/dev/VolGroupVM/testvm-swap,xvdb,w" ] vif = [ "mac=00:16:3e:00:00:12,ip=192.168.1.12,bridge=xenbr0,vifname=viftestvm" ] on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' If I remove the pygrub bootloader line and un-comment the pvgrub entries I always end up at the ''grubdom>'' prompt. If I then enter ''configfile (hd0,0)/boot/grub/mennu.lst'' pvgrub works and I can boot the domU successfully. I''d be really grateful if anyone can offer any advice? Thanks in advance, Matt. On Sat, December 5, 2009 4:09 pm, Matthew Law wrote:> After hours of googling and not really finding a definitive solution to my > problem, I''m a little stuck and would really appreciate some help from > others. > > I have a CentOS 5.4 x86-64 server running Xen 3.3 from the gitco repos as > dom0. On this I have created two logical volumes comprising 8GB for the > system disk (xvda) and 1.5GB for swap (xvdb). I ran mkfs.ext3 and mkswap > on these to create the required filesystems and then I mounted the 8GB > volume and copied a system image onto it. After creating the xen config > and starting it with pygrub the machine starts and runs without error - so > far, so good! > > Now, If I shutdown the vm and change the config to use pvgrub and restart > I am stuck at a grub prompt. If I manually tell it where to find the > config file (using the exact same path as in the ''extra'' line in the domu > config) it pvgrub starts and everything then runs as expected. Here is my > config: > > --- snip --- > name = "pvgrubtestvm" > vcpus = 1 > memory = 512 > maxmem = 512 > > # pvgrub > kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz" > extra = "(hd0)/boot/grub/menu.lst" > #end pvgrub > > dhcp = "dhcp" > > disk = [ "phy:/dev/VolGroupVM/pvgrubtestvm,xvda1,w", > "phy:/dev/VolGroupVM/pvgrubtestvm-swap,xvda2,w" ] > > vif = [ > "mac=00:16:3e:00:00:09,ip=192.168.1.12,bridge=xenbr0,vifname=vifpvgrubtestvm" > ] > > on_poweroff = ''destroy'' > on_reboot = ''restart'' > on_crash = ''restart'' > --- snip --- > > Have I done something wrong? Is this an issue with pvgrub and logical > volumes - i.e. no partition table?_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Dec-09 02:21 UTC
Re: [Xen-users] PVGrub can''t find config file for domU on logical volume
On Tue, Dec 8, 2009 at 7:52 PM, Matthew Law <matt@webcontracts.co.uk> wrote:> #kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz" > #extra = "(hd0,0)/boot/grub/menu.lst"This line is different from your previous post (hd0,0 vs hd0). Did you try with the correct extra line? These lines wok for me kernel="/usr/lib/xen/boot/pv-grub-x86_64.gz" extra="(hd0,1)/boot/grub/menu.lst" Also, if I''m not mistaken, pv-grub needs to be the same type as domU kernel (i.e. both 32bit or both 64bit) -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Matthew Law
2009-Dec-09 09:06 UTC
Re: [Xen-users] PVGrub can''t find config file for domU on logical volume
I tried with both extra lines. The VM is debian lenny amd64 and was installed into a single partition. I''m going to try again from scratch using the debian netinstall image direct from xm create. Curious thing is that it works fine if I switch to pygrub. I really want to get pvgrub working for security reasons. Thanks, Matt. On Wed, December 9, 2009 2:21 am, Fajar A. Nugraha wrote:> On Tue, Dec 8, 2009 at 7:52 PM, Matthew Law <matt@webcontracts.co.uk> > wrote: >> #kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz" >> #extra = "(hd0,0)/boot/grub/menu.lst" > > This line is different from your previous post (hd0,0 vs hd0). Did you > try with the correct extra line? These lines wok for me > > kernel="/usr/lib/xen/boot/pv-grub-x86_64.gz" > extra="(hd0,1)/boot/grub/menu.lst" > > Also, if I''m not mistaken, pv-grub needs to be the same type as domU > kernel (i.e. both 32bit or both 64bit) > > -- > Fajar_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users