Hi all, I have install Xen3.4 on CentOS5 as Dom0. Can I install Ubuntu as DomU guest as PV guest? Thanks! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jun-17 01:42 UTC
Re: [Xen-users] Install Ubuntu Server 10 as PV Guest
On Thu, Jun 17, 2010 at 2:02 AM, KC LO <kclo2000@gmail.com> wrote:> Hi all, > > I have install Xen3.4 on CentOS5 as Dom0. Can I install Ubuntu as DomU > guest as PV guest?Try http://lists.xensource.com/archives/html/xen-users/2010-06/msg00298.html -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks! I have follow the link and download initrd.gz and vmlinuz to create the initial ubuntu.cfg and use it to start the installation by xm create -c ubuntu.cfg. I can complete the installation over Internet. However, after installation, how can I start the ubuntu DOMU guest? What should I change on the ubuntu.cfg? On 17 June 2010 09:42, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Thu, Jun 17, 2010 at 2:02 AM, KC LO <kclo2000@gmail.com> wrote: > > Hi all, > > > > I have install Xen3.4 on CentOS5 as Dom0. Can I install Ubuntu as DomU > > guest as PV guest? > > > Try > http://lists.xensource.com/archives/html/xen-users/2010-06/msg00298.html > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jun-20 01:09 UTC
Re: [Xen-users] Install Ubuntu Server 10 as PV Guest
On Sat, Jun 19, 2010 at 1:59 AM, KC LO <kclo2000@gmail.com> wrote:> Thanks! > > > > I have follow the link and download initrd.gz and vmlinuz to create the > initial ubuntu.cfg and use it to start the installation by xm create -c > ubuntu.cfg. I can complete the installation over Internet. However, after > installation, how can I start the ubuntu DOMU guest? What should I change > on the ubuntu.cfg?I''d test by running "pygrub -i /path/to/your/domU/disk/image.img" (adjust the disk image path to your setup, obviously). If it doesn''t return an error, you can simpley comment out kernel, ramdisk, and extra line on your original config, and add a line bootloader="/usr/bin/pygrub" Some peope has concerns about pygrub''s potential security problem since it copies some files from domU to dom0 and run it. So for some added security measure, once you have pygrub running, you can replace pygrub with pv-grub by commenting pygrub line and replace it with something like this kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz" extra = "(hd0,0)/grub/menu.lst" IMHO problems with pv-grub is harder to diagnose though, so I strongly suggest you only try pv-grub AFTER you get pygrub working correctly. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi, Thanks! I have tried to use pygrub to point to the image file to try to start the DomU guest. The following messages appears. pygrub -i /root/iso/ubuntu.img Traceback (most recent call last): File "/usr/bin/pygrub", line 679, in ? chosencfg = run_grub(file, entry, fs, incfg["args"]) File "/usr/bin/pygrub", line 515, in run_grub g = Grub(file, fs) File "/usr/bin/pygrub", line 202, in __init__ self.read_config(file, fs) File "/usr/bin/pygrub", line 397, in read_config raise RuntimeError, "couldn''t find bootloader config file in the image provided." RuntimeError: couldn''t find bootloader config file in the image provided. I have used kpartx -av /root/iso/ubuntu.img to mount the boot directory of the first partition The contents under /boot is abi-2.6.32-22-generic memtest86+.bin config-2.6.32-22-generic System.map-2.6.32-22-generic grub vmcoreinfo-2.6.32-22-generic initrd.img-2.6.32-22-generic vmlinuz-2.6.32-22-generic It seems that it don''t has the linux-xen kernel for PV client. Is it the reason for it fail to boot? Do you have any idea? On 20 June 2010 09:09, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Sat, Jun 19, 2010 at 1:59 AM, KC LO <kclo2000@gmail.com> wrote: > > Thanks! > > > > > > > > I have follow the link and download initrd.gz and vmlinuz to create the > > initial ubuntu.cfg and use it to start the installation by xm create -c > > ubuntu.cfg. I can complete the installation over Internet. However, > after > > installation, how can I start the ubuntu DOMU guest? What should I > change > > on the ubuntu.cfg? > > I''d test by running "pygrub -i /path/to/your/domU/disk/image.img" > (adjust the disk image path to your setup, obviously). > If it doesn''t return an error, you can simpley comment out kernel, > ramdisk, and extra line on your original config, and add a line > > bootloader="/usr/bin/pygrub" > > Some peope has concerns about pygrub''s potential security problem > since it copies some files from domU to dom0 and run it. So for some > added security measure, once you have pygrub running, you can replace > pygrub with pv-grub by commenting pygrub line and replace it with > something like this > > kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz" > extra = "(hd0,0)/grub/menu.lst" > > IMHO problems with pv-grub is harder to diagnose though, so I strongly > suggest you only try pv-grub AFTER you get pygrub working correctly. > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jun-21 01:47 UTC
Re: [Xen-users] Install Ubuntu Server 10 as PV Guest
On Sun, Jun 20, 2010 at 2:59 PM, KC LO <kclo2000@gmail.com> wrote:> RuntimeError: couldn''t find bootloader config file in the image provided.Quick check: did you happen to use ext4 for /boot? AFAIK pygrub (on Xen 3.4 anyway) does not support ext4. ext3 works just fine.> > I have used kpartx -av /root/iso/ubuntu.img to mount the boot directory of/root/iso is a strange place to put domU image :P> It seems that it don''t has the linux-xen kernel for PV client. Is it the > reason for it fail to boot?It shouldn''t matter. Ubuntu''s has pv_ops enabled kernel. Also, if it were a problem with kernel, you''d get a different error message. As a temporary work around, you can try copying domU''s kernel and initrd to dom0, and load it on domU Xen config file using "kernel", "ramdisk", and "extra" directive. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi all, Thanks all! I have copied kernel and ramdisk to the DOMU and it worked fine even the /boot is under partition of ext4. However, the pygrub still fails for partition of ext3 with same error. Below is my DOMU config name = "test" memory = "2048" bootloader="/usr/bin/pygrub" extra = "(hd0,0)/grub/menu.lst" vif = [ ''bridge=eth0'' ] vcpus=2 disk= [ ''file:/root/iso/ubuntu.img,xvda,w'' ] root="/dev/xvda1 ro" on_reboot = ''destroy'' on_crash = ''destroy'' When I replace with kernel and ramdisk, ubuntu can boot successfully. Any ideas? On 21 June 2010 09:47, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Sun, Jun 20, 2010 at 2:59 PM, KC LO <kclo2000@gmail.com> wrote: > > RuntimeError: couldn''t find bootloader config file in the image provided. > > Quick check: did you happen to use ext4 for /boot? AFAIK pygrub (on > Xen 3.4 anyway) does not support ext4. ext3 works just fine. > > > > > I have used kpartx -av /root/iso/ubuntu.img to mount the boot directory > of > > /root/iso is a strange place to put domU image :P > > > It seems that it don''t has the linux-xen kernel for PV client. Is it the > > reason for it fail to boot? > > It shouldn''t matter. Ubuntu''s has pv_ops enabled kernel. Also, if it > were a problem with kernel, you''d get a different error message. > > As a temporary work around, you can try copying domU''s kernel and > initrd to dom0, and load it on domU Xen config file using "kernel", > "ramdisk", and "extra" directive. > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jun-22 00:57 UTC
Re: [Xen-users] Install Ubuntu Server 10 as PV Guest
On Mon, Jun 21, 2010 at 10:19 AM, KC LO <kclo2000@gmail.com> wrote:> I have copied kernel and ramdisk to the DOMU and it worked fine even the > /boot is under partition of ext4.You mean copy to dom0, right?> However, the pygrub still fails for partition of ext3 with same error.You mean you reinstall domU''s so it''s ext3 now?> Below is my DOMU config > name = "test" > memory = "2048" > bootloader="/usr/bin/pygrub" > extra = "(hd0,0)/grub/menu.lst"pygrub does not need "extra" line. pv-grub does. Also, if /boot is not its own partition, the "extra" line for pv-grub becomes extra = "(hd0,0)/boot/grub/menu.lst"> When I replace with kernel and ramdisk, ubuntu can boot successfully. Any > ideas?So it''s down to pygrub problem now. Not really sure what the problem is. It might be a problem with pygrub parsing grub2''s config file, but I''m not really sure. Perhaps you can try uninstalling grub-pc on domU (which is grub2, the default for Lucid), and use grub (the legacy grub) instead. Afterwards, make sure there''s a /boot/grub/menu.lst with the correct entries (you might need to run update-grub first) -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi all, Thanks for your advice. I follow procedure from Ubuntu website on removing grub2 and intsall grub. I can use pygrub to boot the ubuntu. One more things that I have changed is that the /boot/grub/menu.lst is using uuid to refer hard drive of ubuntu. I need to remove all uuid keywords in the file and use /dev/xvda instead. Otherwise, pygrub can''t understand uuid On 22 June 2010 08:57, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Mon, Jun 21, 2010 at 10:19 AM, KC LO <kclo2000@gmail.com> wrote: > > I have copied kernel and ramdisk to the DOMU and it worked fine even the > > /boot is under partition of ext4. > > You mean copy to dom0, right? > > > However, the pygrub still fails for partition of ext3 with same error. > > You mean you reinstall domU''s so it''s ext3 now? > > > Below is my DOMU config > > name = "test" > > memory = "2048" > > bootloader="/usr/bin/pygrub" > > extra = "(hd0,0)/grub/menu.lst" > > pygrub does not need "extra" line. pv-grub does. > Also, if /boot is not its own partition, the "extra" line for pv-grub > becomes > > extra = "(hd0,0)/boot/grub/menu.lst" > > > When I replace with kernel and ramdisk, ubuntu can boot successfully. > Any > > ideas? > > So it''s down to pygrub problem now. > Not really sure what the problem is. It might be a problem with pygrub > parsing grub2''s config file, but I''m not really sure. Perhaps you can > try uninstalling grub-pc on domU (which is grub2, the default for > Lucid), and use grub (the legacy grub) instead. Afterwards, make sure > there''s a /boot/grub/menu.lst with the correct entries (you might need > to run update-grub first) > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users