Justin Wickett
2006-Dec-30 21:07 UTC
[Fedora-xen] treating logical volumes as physical drives
I would like to use a logical volume as a "physical" drive on which I can install a fedora operating system. As of now, when I run xenguest- installer, it treats the install location that I specified ( which is an unformatted logical volume that I had just created ) as a physical drive (named "xvda") and allows me to perform a basic install on it. When I look at that logical volume, it comes up as a "foreign" device, because it contains a /boot directory, and a volume group consisting of a / directory and a swap directory. I was wondering how to mimic that effect without using my xenguest-installer program, so that when I pop a CD in and the installer starts up, I can specify a logical volume and let the installer treat it as a physical drive just like the xenguest-installer program does. I am trying to accomplish this because I was unable to install FC4 via the xenguest-installer. I had mounted the image as a loopback device to /var/ftp/pub and specified the /pub directory in FTP server''s root folder as my "Installation source", and was greeted by an error from my FTP server (vsftpd) saying "550 Failed to change directory". When I do the exact same thing except mount the FC6 iso instead of the FC4 iso, everything works fine. What could I be doing wrong? If all else fails, I guess I can just specify in my /etc/xen/xm- fc4-001 file the kernel and the ramdisk parameters, and install FC4 on an ext3 formatted logical volume specified as the / directory, and thus reuse my existing /boot directory instead of trying to use the pygrub bootloader with a new /boot directory. In this case, where could I find a compiled xenU kernel and an appropriate initrd image for FC4? Thank you very much and happy new years to all! Justin Wickett Duke 2010 http://www.duke.edu/~jyw2
Justin Wickett
2007-Jan-06 05:27 UTC
Re: [Fedora-xen] treating logical volumes as physical drives
I decided to go with my third approach and ended up installing FC5 on an ext3 formatted logical volume within my LVM partition containing my host OS (FC6) and specified a FC5 xen PAE-supported kernel in my xen config file. The kernel seemed to load without any problems when I tried creating the xen config file while in FC6, but panicked since I failed to "append a correct "root=" boot option". From the console view, I noticed that my kernel command line was "root=/dev/hda2/dev/ VolGroup00/xm_fc5_001_lv ro 4", which obviously doesn''t make any sense. I followed the basic install for FC6, with the addition of creating multiple logical volumes within my LVM partition. What would be the correct string to set the root variable found inside of the xen config files as? Here are the last couple of lines I get while in console view before the kernel panics... md: Autodetecting RAID arrays. md: autorun ... md: ... autorun DONE. VFS: Cannot open root device "hda2/dev/VolGroup00/xm_fc5_001_lv" or unknown-block(0,0) Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown- block(0,0) More of my system information can be viewed at http://www.duke.edu/ ~jyw2/xenerrors.html Justin Wickett Duke 2010 http://www.duke.edu/~jyw2 On Dec 30, 2006, at 4:07 PM, Justin Wickett wrote:> I would like to use a logical volume as a "physical" drive on which > I can install a fedora operating system. As of now, when I run > xenguest-installer, it treats the install location that I specified > ( which is an unformatted logical volume that I had just created ) > as a physical drive (named "xvda") and allows me to perform a basic > install on it. When I look at that logical volume, it comes up as a > "foreign" device, because it contains a /boot directory, and a > volume group consisting of a / directory and a swap directory. I > was wondering how to mimic that effect without using my xenguest- > installer program, so that when I pop a CD in and the installer > starts up, I can specify a logical volume and let the installer > treat it as a physical drive just like the xenguest-installer > program does. > > I am trying to accomplish this because I was unable to install FC4 > via the xenguest-installer. I had mounted the image as a loopback > device to /var/ftp/pub and specified the /pub directory in FTP > server''s root folder as my "Installation source", and was greeted > by an error from my FTP server (vsftpd) saying "550 Failed to > change directory". When I do the exact same thing except mount the > FC6 iso instead of the FC4 iso, everything works fine. What could I > be doing wrong? > > If all else fails, I guess I can just specify in my /etc/xen/xm- > fc4-001 file the kernel and the ramdisk parameters, and install FC4 > on an ext3 formatted logical volume specified as the / directory, > and thus reuse my existing /boot directory instead of trying to use > the pygrub bootloader with a new /boot directory. In this case, > where could I find a compiled xenU kernel and an appropriate initrd > image for FC4? > > Thank you very much and happy new years to all! > > Justin Wickett > Duke 2010 > http://www.duke.edu/~jyw2 > > > > -- > Fedora-xen mailing list > Fedora-xen@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-xen
Andrew Cathrow
2007-Jan-06 16:32 UTC
Re: [Fedora-xen] treating logical volumes as physical drives
So looking at your xen config on your web page we see this kernel = "/boot/vmlinuz-2.6.18-1.2257.fc5xen" #initrd = "/boot/initrd-2.6.18-1.2257.fc5xen.img" memory = "400" name = "xm-fc5-001" disk = [ ''phy:/dev/VolGroup00/xm_fc5_001_lv,xvda,w'' ] root = "/dev/hda2/dev/VolGroup00/xm_fc5_001_lv ro" vif = [ '''' ] #vif = [ ''mac=00:17:3f:23:67:v2, bridge=xenbr0'', ] uuid = "34998936-a8a1-4252-81cc-3109181e8111" #vnc = 1 #vncunused = 1 vcpus=4 extra = "4" on_reboot = ''restart'' on_crash = ''restart'' Looking at your disk configuration in that file disk = [ ''phy:/dev/VolGroup00/xm_fc5_001_lv,xvda,w'' ] So you''re using /dev/VolGroup00/xm_fc6_001_lv as your disk in your guest domain. and that will appear to the guest as /dev/xvda So the root line is wrong. After the kernel is loaded it''ll look inside the guest domain for /dev/hda2/dev/VolGroup00/xm_fc5_001_lv which doesn''t exist. Typically you''d not have the kernel, initrd and root lines in the xen config. You''d use a bootloader. Remove those lines and add the following bootloader="/usr/bin/pygrub" Then start the domain with xm create -c domain-name This will give you a console with a cut down version of grub (that reads /boot/grub/grub.conf from your guest''s xvda device. This presumes that you''ve got the xenU kernel installed in the guest domain. On Sat, 2007-01-06 at 00:27 -0500, Justin Wickett wrote:> ~jyw2/xenerrors.html-- Andrew Cathrow Red Hat, Inc. (678) 733 0452 - Mobile (404) 437 6178 - Home Office acathrow@redhat.com
Justin Wickett
2007-Jan-09 10:37 UTC
Re: [Fedora-xen] treating logical volumes as physical drives
Thank you Andrew for the response. I am taking the pygrub route, and have specified in my xen config file that "disk = [ ''phy:/dev/ hdc,xvda,w'', ''phy:/dev/VolGroup00/xm_fc5_001_lv,xvda2,w'' ]". The kernel starts up fine, but when Red Hat nash starts to run, no volume groups are found. When i mount /dev/VolGroup00/xm_fc5_001_lv and ''cd'' into the /dev/ directory, the only files that appear when I do an ''ls'' are mapper and VolGroup00, both of which are directories. I think that my problem has to do with specifying a correct value for my ''disk'' variable in the xen config file. I have included all of the important information concerning this issue on my website. As always, thanks for the help! Also, if there was simply a way you could tell Anaconda to treat a logical volume as a partition on which to install a standard FC operating system all my problems would be solved. I just specified xm- fc5-001_lv as my root partition and used my existing FC6 boot partition for my /boot kernels+data. The errors and extra info can be found at http://www.duke.edu/~jyw2/ xenerrors.html Justin Wickett Duke 2010 http://www.duke.edu/~jyw2 On Jan 6, 2007, at 11:32 AM, Andrew Cathrow wrote:> > So looking at your xen config on your web page we see this > > kernel = "/boot/vmlinuz-2.6.18-1.2257.fc5xen" #initrd = "/boot/ > initrd-2.6.18-1.2257.fc5xen.img" memory = "400" name = "xm-fc5-001" > disk = [ ''phy:/dev/VolGroup00/xm_fc5_001_lv,xvda,w'' ] root = "/dev/ > hda2/dev/VolGroup00/xm_fc5_001_lv ro" vif = [ '''' ] #vif = > [ ''mac=00:17:3f:23:67:v2, bridge=xenbr0'', ] uuid = "34998936- > a8a1-4252-81cc-3109181e8111" #vnc = 1 #vncunused = 1 vcpus=4 extra > = "4" on_reboot = ''restart'' on_crash = ''restart'' Looking at your > disk configuration in that file disk = [ ''phy:/dev/VolGroup00/ > xm_fc5_001_lv,xvda,w'' ] So you''re using /dev/VolGroup00/ > xm_fc6_001_lv as your disk in your guest domain. and that will > appear to the guest as /dev/xvda So the root line is wrong. After > the kernel is loaded it''ll look inside the guest domain for /dev/ > hda2/dev/VolGroup00/xm_fc5_001_lv which doesn''t exist. Typically > you''d not have the kernel, initrd and root lines in the xen config. > You''d use a bootloader. Remove those lines and add the following > bootloader="/usr/bin/pygrub" Then start the domain with xm create - > c domain-name This will give you a console with a cut down version > of grub (that reads /boot/grub/grub.conf from your guest''s xvda > device. This presumes that you''ve got the xenU kernel installed in > the guest domain. On Sat, 2007-01-06 at 00:27 -0500, Justin Wickett > wrote: >> ~jyw2/xenerrors.html > -- Andrew Cathrow Red Hat, Inc. (678) 733 0452 - Mobile (404) 437 > 6178 - Home Office acathrow@redhat.com