Hi All, I am trying to install a 32-bit CentOS 5 paravirtualised domU based on the instructions at http://wiki.centos.org/HowTos/Xen/InstallingCentOSDomU. I would like to allocate storage to the domU as a number of LVM logical volumes instead of a single disk image. Ie. kernel = "/domx/boot/vmlinuz-xen-install" ramdisk = "/domx/boot/initrd-xen-install" extra = "text" [...] disk = [ ''phy:/dev/sage/root,xvda1,w'', ''phy:/dev/sage/usr,xvda2,w'', ''phy:/dev/sage/swap,xvda3,w'', ''phy:/dev/sage/tmp,xvda4,w'', ''phy:/dev/sage/var,xvda5,w'' ] [...] I was hoping the logical volumes would appear as partitions inside the domU, but instead the installer recognises them as separate disk devices and wants me to partition each of them, ie. xvda11, xvda21, etc. Is this expected behaviour? Is it at all possible to pass LV partitions through to the domU as partitions instead of disk devices? dom0 = CentOS 5.2 64-bit Xen = 3.3.1 Thank you. Matthias _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi All, I am trying to install a 32-bit CentOS 5 paravirtualised domU based on the instructions at http://wiki.centos.org/HowTos/Xen/InstallingCentOSDomU. I would like to allocate storage to the domU as a number of LVM logical volumes instead of a single disk image. Ie. kernel = "/domx/boot/vmlinuz-xen-install" ramdisk = "/domx/boot/initrd-xen-install" extra = "text" [...] disk = [ ''phy:/dev/sage/root,xvda1,w'', ''phy:/dev/sage/usr,xvda2,w'', ''phy:/dev/sage/swap,xvda3,w'', ''phy:/dev/sage/tmp,xvda4,w'', ''phy:/dev/sage/var,xvda5,w'' ] [...] I was hoping the logical volumes would appear as partitions inside the domU, but instead the installer recognises them as separate disk devices and wants me to partition each of them, ie. xvda11, xvda21, etc. Is this expected behaviour? Is it at all possible to pass LV partitions through to the domU as partitions instead of disk devices? dom0 = CentOS 5.2 64-bit Xen = 3.3.1 Thank you. Matthias _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi, You can pass a LVM partition (one) to the DomU as a disk (as you have discovered). Then you can let the DomU partition it. If you have a need to access the partitions of the DomU, in Dom0, then you can make use of kpartx to access them. Regards, Alan -----Original Message----- From: Matthias Reif [mailto:matthreif@gmail.com] Sent: Thursday, 18 June 2009 2:38 PM To: xen-users@lists.xensource.com Subject: [Xen-users] LVM partitions on PV domU Hi All, I am trying to install a 32-bit CentOS 5 paravirtualised domU based on the instructions at http://wiki.centos.org/HowTos/Xen/InstallingCentOSDomU. I would like to allocate storage to the domU as a number of LVM logical volumes instead of a single disk image. Ie. kernel = "/domx/boot/vmlinuz-xen-install" ramdisk = "/domx/boot/initrd-xen-install" extra = "text" [...] disk = [ ''phy:/dev/sage/root,xvda1,w'', ''phy:/dev/sage/usr,xvda2,w'', ''phy:/dev/sage/swap,xvda3,w'', ''phy:/dev/sage/tmp,xvda4,w'', ''phy:/dev/sage/var,xvda5,w'' ] [...] I was hoping the logical volumes would appear as partitions inside the domU, but instead the installer recognises them as separate disk devices and wants me to partition each of them, ie. xvda11, xvda21, etc. Is this expected behaviour? Is it at all possible to pass LV partitions through to the domU as partitions instead of disk devices? dom0 = CentOS 5.2 64-bit Xen = 3.3.1 Thank you. Matthias _______________________________________________ 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
The CentOS installers always expect disk images to be whole disks, not partitions, and to do their own partitioning--i.e. this isn''t really a Xen question. You can accomplish the storage layout you''re after, but not with the native CentOS installers. The following EC2 page has instructions for installing Fedora to a single root filesystem, but can easily be adapted to CentOS on multiple volumes. The key is preparing for a successful "yum --installroot=... Groupinstall Base": http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/index.htm l?ami-via-loopback.html If you want to use multiple volumes instead of one (as in your root/usr/var example below), create and mount each (i.e. /mnt, /mnt/usr, /mnt/var, etc.) before you begin your install.> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Matthias Reif > Sent: Thursday, June 18, 2009 12:38 AM > To: xen-users@lists.xensource.com > Subject: [Xen-users] LVM partitions on PV domU > > Hi All, > > I am trying to install a 32-bit CentOS 5 paravirtualised domU > based on the instructions at > http://wiki.centos.org/HowTos/Xen/InstallingCentOSDomU. > > I would like to allocate storage to the domU as a number of > LVM logical volumes instead of a single disk image. > > Ie. > > kernel = "/domx/boot/vmlinuz-xen-install" > ramdisk = "/domx/boot/initrd-xen-install" > extra = "text" > > [...] > > disk = [ ''phy:/dev/sage/root,xvda1,w'', > ''phy:/dev/sage/usr,xvda2,w'', > ''phy:/dev/sage/swap,xvda3,w'', > ''phy:/dev/sage/tmp,xvda4,w'', > ''phy:/dev/sage/var,xvda5,w'' ] > [...] > > I was hoping the logical volumes would appear as partitions > inside the domU, but instead the installer recognises them as > separate disk devices and wants me to partition each of them, > ie. xvda11, xvda21, etc. > > Is this expected behaviour? > > Is it at all possible to pass LV partitions through to the > domU as partitions instead of disk devices? > > dom0 = CentOS 5.2 64-bit > Xen = 3.3.1 > > Thank you. > > Matthias > > _______________________________________________ > 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
Geert Janssens
2009-Sep-23 17:08 UTC
[Xen-users] Manually create Fedora domU on CentOS 5.3 dom0
I am trying to setup a Fedora 11 domU on my CentOS 5.3 dom0 installation. I want it to use a dom0 LVM partition as its root partition instead of as a virtual disk. I understand that Fedora''s anaconda won''t allow me to do this. I found this thread on xen-users http://lists.xensource.com/archives/html/xen-users/2009-06/msg00650.html Which refers to an Amazon EC2 tech doc, explaining how to install Fedora on a single root filesystem. Following these instructions, I managed to install fedora 11 on an LVM partition. However, when attempting to start this setup as a Xen PV, I get this error right after pygrub finishes: Error: (2, ''Invalid kernel'', ''elf_xen_note_check: ERROR: Will only load images built for the generic loader or Linux images'') I''m not sure how to proceed here. Is a special initrd required in a PV environment ? More details: My environment is all 32 bit (xen, dom0, domU) dom0 kernel is 2.6.18-128.1.10.el5.centos.plusxen xen is gitco xen 3.3.1 domU kernel is 2.6.30.5-43.fc11.i586 Geert -- Kobalt W.I.T. Web & Information Technology Brusselsesteenweg 152 1850 Grimbergen Tel : +32 479 339 655 Email: info@kobaltwit.be _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Geert Janssens
2009-Sep-23 21:36 UTC
Re: [Xen-users] Manually create Fedora domU on CentOS 5.3 dom0
I got a little further. For the record, the error was due to a kernel mismatch anyway: dom0 was PAE, domU not. After having installed the PAE version in domU, I got passed the kernel loading. But not passed boot, I''m afraid. The domU crashes during the boot sequence. I found this error in the xend.log: [2009-09-23 23:34:03 4893] DEBUG (DevController:166) Waiting for devices tap. [2009-09-23 23:34:03 4893] DEBUG (DevController:166) Waiting for devices vtpm. [2009-09-23 23:34:03 4893] WARNING (XendDomainInfo:1617) Domain has crashed: name=Maven id=54. [2009-09-23 23:34:03 4893] ERROR (XendDomainInfo:1755) VM Maven restarting too fast (7.206110 seconds since the last restart). Refusing to restart to avoid loops. [2009-09-23 23:34:03 4893] DEBUG (XendDomainInfo:2402) XendDomainInfo.destroy: domid=54 [2009-09-23 23:34:03 4893] DEBUG (XendDomainInfo:1939) Destroying device model [2009-09-23 23:34:03 4893] DEBUG (XendDomainInfo:1946) Releasing devices [2009-09-23 23:34:03 4893] WARNING (image:472) domain Maven: device model failure: no longer running; see /var/log/xen/qemu-dm-Maven.log [2009-09-23 23:34:03 4893] DEBUG (XendDomainInfo:1959) Removing vif/0 This doesn''t say much. Any idea what''s wrong here, please ? If more info is needed, just tell me. Geert On Wednesday 23 September 2009, Geert Janssens wrote:> I am trying to setup a Fedora 11 domU on my CentOS 5.3 dom0 installation. > > I want it to use a dom0 LVM partition as its root partition instead of as a > virtual disk. I understand that Fedora''s anaconda won''t allow me to do > this. > > I found this thread on xen-users > http://lists.xensource.com/archives/html/xen-users/2009-06/msg00650.html > Which refers to an Amazon EC2 tech doc, explaining how to install Fedora on > a single root filesystem. > > Following these instructions, I managed to install fedora 11 on an LVM > partition. However, when attempting to start this setup as a Xen PV, I get > this error right after pygrub finishes: > Error: (2, ''Invalid kernel'', ''elf_xen_note_check: ERROR: Will only load > images built for the generic loader or Linux images'') > > I''m not sure how to proceed here. Is a special initrd required in a PV > environment ? > > More details: > My environment is all 32 bit (xen, dom0, domU) > dom0 kernel is 2.6.18-128.1.10.el5.centos.plusxen > xen is gitco xen 3.3.1 > domU kernel is 2.6.30.5-43.fc11.i586 > > Geert-- Kobalt W.I.T. Web & Information Technology Brusselsesteenweg 152 1850 Grimbergen Tel : +32 479 339 655 Email: info@kobaltwit.be _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Grant McWilliams
2009-Sep-23 22:07 UTC
Re: [Xen-users] Manually create Fedora domU on CentOS 5.3 dom0
> > > I found this thread on xen-users > > http://lists.xensource.com/archives/html/xen-users/2009-06/msg00650.html > > Which refers to an Amazon EC2 tech doc, explaining how to install Fedora > on > > a single root filesystem. > > > > Following these instructions, I managed to install fedora 11 on an LVM > > partition. However, when attempting to start this setup as a Xen PV, I > get > > this error right after pygrub finishes: > > Error: (2, ''Invalid kernel'', ''elf_xen_note_check: ERROR: Will only load > > images built for the generic loader or Linux images'') > > > > I''m not sure how to proceed here. Is a special initrd required in a PV > > environment ? > > > > More details: > > My environment is all 32 bit (xen, dom0, domU) > > dom0 kernel is 2.6.18-128.1.10.el5.centos.plusxen > > xen is gitco xen 3.3.1 > > domU kernel is 2.6.30.5-43.fc11.i586 > > > > Geert > >You know I''m not sure you''re going about this the easiest way. I''ve never installed on a LVM partition but I do use them. I''ll give you the 4 step process that I would have used. Maybe it doesn''t match exactly to what you wanted but it''s fast and it works. 1. Download a Fedora Disk Image from Stacklet. http://stacklet.com/downloads/images/list/Fedora 2. Make your LV. 3. Modify the included domU config file to add the LV as a second disk 4. Start the VM and once booted up, format the LV and use it for whatever you want. I''m sure there''s a cleaner way but doing this I can have a working VM in about 15 minutes that''s using LVM. For databases it''s worth the trouble to use LVM because you gain about 4% in speed on the sql-bench test. Another thing that is more directly related to your problem is you probably want to be using the kernel from gitco if you''re using the gitco xen like this. This might actually solve your problem as apposed to just avoiding it. Here''s my grub.conf entry using the gitco xen kernel. title CentOS (2.6.18-128.4.1.el5xen) root (hd0,0) kernel /xen.gz-3.4.0 module /vmlinuz-2.6.18-128.4.1.el5xen ro root=/dev/vgsys/lvroot rhgb quiet module /initrd-2.6.18-128.4.1.el5xen.img Grant McWilliams _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users