Mark Chaney
2009-Oct-19 19:17 UTC
[Xen-users] switching kernel from dom0 to guest with pv-grub
anyone know of any type of instructions/howto for converting a quest from using the dom0 kernel to something like pygrub or even better, pv-grub? Im using CentOS as the dom0 and guest if that makes a diff. Thanks, Mark _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Pasi Kärkkäinen
2009-Oct-19 20:51 UTC
Re: [Xen-users] switching kernel from dom0 to guest with pv-grub
On Mon, Oct 19, 2009 at 02:17:52PM -0500, Mark Chaney wrote:> anyone know of any type of instructions/howto for converting a quest from > using the dom0 kernel to something like pygrub or even better, pv-grub? Im > using CentOS as the dom0 and guest if that makes a diff. >You could install a new guest with virt-install or virt-manager and check the generated config file :) virt-* installed centos/rhel/fedora PV guests use pygrub as a default. Basicly it just means replacing the kernel/ramdisk/root/extra lines from the cfgfile by bootloader= line. -- Pasi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Chaney
2009-Oct-19 21:15 UTC
RE: [Xen-users] switching kernel from dom0 to guest with pv-grub
I know how to do it from the config level, but im assuming I probably need to install grub and download a xen kernel on the guest as well? They dont have any of that installed since they are currently using the kernel from the dom0. Current config looks like this: kernel = ''/XenConfigs/vmlinuz-vm2-xenU'' ramdisk = ''/XenConfigs/initrd.vm2.xenU.img'' memory = 2048 name = ''huffer'' vif = [ ''ip=xxx.xxx.xxx.xxx'' ] address = ''xxx.xxx.xxx.xxx'' netmask = ''255.255.255.224'' disk = [''phy:/dev/VolGroup00/huffer_img,sda1,w'', ''phy:/dev/VolGroup00/huffer_swap,sda2,w''] root = ''/dev/sda1 ro'' Just found out that the original guest you see above was created from jailtime.org image, but with some additional config changes. I am using a third party control panel for xen and I am trying to help them figure out how to convert their images from using a dom0 type kernel setup like this to being able to use pygrub or pv-grub. The problem is that really needs one disk per filesystem, so it can mount and manipulate that filesystem. Im hoping to find a way to convert their 20+ OS images into a pv-grub compatible guest without having to recreate each guest from scratch. I do see now that virt-install will allow you to specify additional disks, though I am not 100% sure how the kickstart would know which disk is which, plus im hoping I dont have to go this route. Hope my rambling makes sense. =) -Mark -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Pasi Kärkkäinen Sent: Monday, October 19, 2009 3:52 PM To: Mark Chaney Cc: Xen-users@lists.xensource.com Subject: Re: [Xen-users] switching kernel from dom0 to guest with pv-grub On Mon, Oct 19, 2009 at 02:17:52PM -0500, Mark Chaney wrote:> anyone know of any type of instructions/howto for converting a questfrom> using the dom0 kernel to something like pygrub or even better, pv-grub?Im> using CentOS as the dom0 and guest if that makes a diff. >You could install a new guest with virt-install or virt-manager and check the generated config file :) virt-* installed centos/rhel/fedora PV guests use pygrub as a default. Basicly it just means replacing the kernel/ramdisk/root/extra lines from the cfgfile by bootloader= line. -- Pasi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Oct-20 03:01 UTC
Re: [Xen-users] switching kernel from dom0 to guest with pv-grub
On Tue, Oct 20, 2009 at 4:15 AM, Mark Chaney <macscr@macscr.com> wrote:> I know how to do it from the config level, but im assuming I probably need > to install grubNot really. pygrub/pv-grub will simply read /boot/grub/menu.lst (which you can create manually).> and download a xen kernel on the guest as well?Yes> They don’t > have any of that installed since they are currently using the kernel from > the dom0.for RHEL/Centos domU, you can simply run "yum install kernel-xen" from within domU.> The problem is that really > needs one disk per filesystem, so it can mount and manipulate that > filesystem.It doesn''t matter. Using pygrub or dom0-located kernel does not change your domU disk/filesystem layout. Here''s my domU''s /boot/grub/menu.lst (relevant part only). It''s somewhat old, so just adjust to whatever kernel-xen version you have installed. default=0 timeout=5 title Red Hat Enterprise Linux Server (2.6.18-92.1.13.el5xen) root (hd0,0) kernel /boot/vmlinuz-2.6.18-92.1.13.el5xen ro root=/dev/hda1 initrd /boot/initrd-2.6.18-92.1.13.el5xen.img And here''s the relevant part of my domU''s config disk = [ ''phy:/dev/rootVG/dns01lv,hda1,w'', ''phy:/dev/rootVG/dns01swaplv,hda2,w'', ] bootloader="/usr/bin/pygrub" The bootloader line replaces the previous kernel and ramdisk line. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users