I have some old xen instances which were installed under Xen 3.1.0 with the following Disk configuration disk = [ ''phy:LG0/LV11,sda1,w'', ''phy:LG0/LV12,sda2,w'',''phy:LG0/LV13,sda3,w'' ] Each one of these is a single partition, with a single file system. I am now trying to run redhat/centos/scientific linux 5.2 and convert these old domU''s over. I run a lot of stuff on redhat/centos/scientific linux but I have used the virt-manager to install all of them, and they are all set up using the xvda type file system in which each exported partition has got a partition table. disk = [ "phy:/dev/LG0/LV0,xvda,w", "phy:/dev/LG0/LV16,xvdb,w" ] Is there any way to mountt single partitions under the new software, if so, how? I tried to export the three partitions above as xvda,xvdb, xvdc and change the fstab and the grub information in domU accordingly, no luck I also tried to just do things as before with sda1,sda2,sda3, also no luck. In all cases I get this error mount: could not find filesystem ''/dev/root'' Setting up other filesystems. Setting up new root fs setuproot: moving /dev failed: No such file or directory no fstab.sys, mounting internal defaults setuproot: error mounting /proc: No such file or directory setuproot: error mounting /sys: No such file or directory Switching to new root and running init. unmounting old /dev unmounting old /proc unmounting old /sys switchroot: mount failed: No such file or directory Kernel panic - not syncing: Attempted to kill init! --- I suppose I could move all existing file systems to new ones of the new format but would really like to avoid that if I can. Steve Timm ------------------------------------------------------------------ Steven C. Timm, Ph.D (630) 840-8525 timm@fnal.gov http://home.fnal.gov/~timm/ Fermilab Computing Division, Scientific Computing Facilities, Grid Facilities Department, FermiGrid Services Group, Assistant Group Leader. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Apr-22 05:34 UTC
Re: [Xen-users] export single partitions to xen 3.1.2 domU
On Wed, Apr 22, 2009 at 11:20 AM, Steven Timm <timm@fnal.gov> wrote:> > I have some old xen instances which were installed under > Xen 3.1.0 with the following Disk configuration > > disk = [ ''phy:LG0/LV11,sda1,w'', ''phy:LG0/LV12,sda2,w'',''phy:LG0/LV13,sda3,w'' > ] > > Each one of these is a single partition, with a single file system. > > I am now trying to run redhat/centos/scientific linux 5.2 and convert > these old domU''s over.If by "convert" you mean "run these old dom0 on new version of dom0", then you don''t have to do anything. Old domU config should run just fine.> disk = [ "phy:/dev/LG0/LV0,xvda,w", "phy:/dev/LG0/LV16,xvdb,w" ] > > > Is there any way to mountt single partitions > under the new software, if so, how?If your question is "how to mount these new domU fs on dom0", then it''s a bit tricky. One possible solution: http://lists.xensource.com/archives/html/xen-users/2009-01/msg00718.html Another alternative is to map that disk to dom0. Something like : - shutdown domU - modprobe xenblk - xm block-attach 0 phy:/dev/LG0/LV0 xvda w This should give you xvda on dom0, along with its partitions (xvda1, xvda2, etc.). After you''re done using it, detach the block device with "xm block-list" and "xm block-detach" Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Steven Timm
2009-Apr-22 08:39 UTC
[Xen-users] Re: export single partitions to xen 3.1.2 domU
Just as a clarification, as I read the various manuals, it seems that the key difference is that the enterprise linux 5.2/xen 3.1.2 (labeled 3.0.3 as it comes from Redhat) is running libvirt, and my previous setup that I''m trying to upgrade to that was not. So does anyone know how to export a single partition to a libvirt-enabled xen domU that''s otherwise installed already, or how to take a non-libvirt domU with 3 such partitions and turn it into one that is\ Steve On Tue, 21 Apr 2009, Steven Timm wrote:>> I have some old xen instances which were installed under > Xen 3.1.0 with the following Disk configuration > > disk = [ ''phy:LG0/LV11,sda1,w'', ''phy:LG0/LV12,sda2,w'',''phy:LG0/LV13,sda3,w'' ] > > Each one of these is a single partition, with a single file system. > > I am now trying to run redhat/centos/scientific linux 5.2 and convert > these old domU''s over. > > I run a lot of stuff on redhat/centos/scientific linux but > I have used the virt-manager to install all of them, and they are > all set up using the xvda type file system in which each exported > partition has got a partition table. > disk = [ "phy:/dev/LG0/LV0,xvda,w", "phy:/dev/LG0/LV16,xvdb,w" ] > > > Is there any way to mountt single partitions > under the new software, if so, how? > > I tried to export the three partitions above as xvda,xvdb, xvdc > and change the fstab and the grub information in domU accordingly, > no luck > > I also tried to just do things as before with sda1,sda2,sda3, > also no luck. > > In all cases I get this error > > mount: could not find filesystem ''/dev/root'' > Setting up other filesystems. > Setting up new root fs > setuproot: moving /dev failed: No such file or directory > no fstab.sys, mounting internal defaults > setuproot: error mounting /proc: No such file or directory > setuproot: error mounting /sys: No such file or directory > Switching to new root and running init. > unmounting old /dev > unmounting old /proc > unmounting old /sys > switchroot: mount failed: No such file or directory > Kernel panic - not syncing: Attempted to kill init! > > --- > > I suppose I could move all existing file systems to new ones > of the new format but would really like to avoid that if I can. > > Steve Timm > > > ------------------------------------------------------------------ > Steven C. Timm, Ph.D (630) 840-8525 > timm@fnal.gov http://home.fnal.gov/~timm/ > Fermilab Computing Division, Scientific Computing Facilities, > Grid Facilities Department, FermiGrid Services Group, Assistant Group Leader. >-- ------------------------------------------------------------------ Steven C. Timm, Ph.D (630) 840-8525 timm@fnal.gov http://home.fnal.gov/~timm/ Fermilab Computing Division, Scientific Computing Facilities, Grid Facilities Department, FermiGrid Services Group, Assistant Group Leader. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Apr-22 08:50 UTC
Re: [Xen-users] Re: export single partitions to xen 3.1.2 domU
On Wed, Apr 22, 2009 at 3:39 PM, Steven Timm <timm@fnal.gov> wrote:> Just as a clarification, as I read the various manuals, > it seems that the key difference is that > the enterprise linux 5.2/xen 3.1.2 (labeled 3.0.3 as it comes from Redhat) > is running libvirt, and my previous setup that I''m trying to > upgrade to that was not.Libvirt (for most purposes) is just a frontend. You can dump libvirt altogether if you like (which is what I did) and manage domUs using xm commands. That way (if you want to) it can be just like your previous setup. Which is why I told you earlier "If by "convert" you mean "run these old dom0 on new version of dom0", then you don''t have to do anything. Old domU config should run just fine."> > So does anyone know how to export a single partition to a > libvirt-enabled xen domU that''s otherwise installed already, orFirst method is to shutdown domU and edit its config file. They''re still located under /etc/xen. Second method is to use "xm block-attach" (or virsh attach-disk). You may still have to edit the config file afterwards.> how to take a non-libvirt domU with 3 such partitions and turn it > into one that is\Put the config file on /etc/xen, run "xm create" or "xm new" _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Steven Timm
2009-Apr-22 09:27 UTC
Re: [Xen-users] Re: export single partitions to xen 3.1.2 domU
On Wed, 22 Apr 2009, Fajar A. Nugraha wrote:> On Wed, Apr 22, 2009 at 3:39 PM, Steven Timm <timm@fnal.gov> wrote: >> Just as a clarification, as I read the various manuals, >> it seems that the key difference is that >> the enterprise linux 5.2/xen 3.1.2 (labeled 3.0.3 as it comes from Redhat) >> is running libvirt, and my previous setup that I''m trying to >> upgrade to that was not. > > Libvirt (for most purposes) is just a frontend. You can dump libvirt > altogether if you like (which is what I did) and manage domUs using xm > commands. That way (if you want to) it can be just like your previous > setup.Are you suggesting that xm create, which I always use to launch the domain, behaves differently depending on whether libvirt is running or not?> Which is why I told you earlier > > "If by "convert" you mean "run these old dom0 on new version of dom0", > then you don''t have to do anything. Old domU config should run just > fine." >Except that I want to move the kernel inside the domU and boot using pygrub, which I wasn''t doing on this system before. You are right that if I try to start the unmodified xen domU config on the new dom0 (with disabled libvirtd) I can do it. but if I try to change anything-- even shift to pygrub with same disk configuration, things don''t work. Ideas?>> >> So does anyone know how to export a single partition to a >> libvirt-enabled xen domU that''s otherwise installed already, or > > First method is to shutdown domU and edit its config file. They''re > still located under /etc/xen.That''s what I''m trying.. there is no way to get any sda device to show up at all. Would it be different if I stopped libvirt?> Second method is to use "xm block-attach" (or virsh attach-disk). You > may still have to edit the config file afterwards.virsh attach-disk according to its man page says that this will make a full disk which still has to be formatted and partitioned. Is this not the case?> >> how to take a non-libvirt domU with 3 such partitions and turn it >> into one that is\ > > Put the config file on /etc/xen, run "xm create" or "xm new" > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- ------------------------------------------------------------------ Steven C. Timm, Ph.D (630) 840-8525 timm@fnal.gov http://home.fnal.gov/~timm/ Fermilab Computing Division, Scientific Computing Facilities, Grid Facilities Department, FermiGrid Services Group, Assistant Group Leader. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Apr-22 09:53 UTC
Re: [Xen-users] Re: export single partitions to xen 3.1.2 domU
On Wed, Apr 22, 2009 at 4:27 PM, Steven Timm <timm@fnal.gov> wrote:>> Libvirt (for most purposes) is just a frontend. You can dump libvirt >> altogether if you like (which is what I did) and manage domUs using xm >> commands. That way (if you want to) it can be just like your previous >> setup. > > Are you suggesting that > xm create, which I always use to launch the domain, > behaves differently depending on whether libvirt is running or not?No. What I''m saying is that if you don''t like libvirt or have problems using it, then don''t use it. xm will work regardless whether libvirt is available or not.> > >> Which is why I told you earlier >> >> "If by "convert" you mean "run these old dom0 on new version of dom0", >> then you don''t have to do anything. Old domU config should run just >> fine." >> > Except that I want to move the kernel inside the domU and boot > using pygrub, which I wasn''t doing on this system before. >Now we''re getting somewhere : It''s not related libvirt. At all. :) pyggrub does NOT require libvrt to be available in any way, shape, or form. Here''s my domU config file, using similar disk layout as yours (e.g. hda1 instead of hda, sda, or xvda) #================================memory = "500" maxmem = "8000" vcpus=8 vcpu_avail=1 cpus="1-7" disk = [ ''phy:/dev/rootVG/radrootlv,hda1,w'', ''phy:/dev/rootVG/radswaplv,hda2,w'', ] vif = [ ''mac=00:16:3E:F3:AE:C0, bridge=br102'', ] vfb =[''type=vnc,vnclisten=0.0.0.0''] bootloader="/usr/bin/pygrub" #================================ Here''s /etc/fstab on that domU : #================================/dev/hda1 / ext3 defaults,noatime 1 1 devpts /dev/pts devpts gid=5,mode=620 0 0 tmpfs /dev/shm tmpfs defaults 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 /dev/hda2 swap swap defaults 0 0 #================================ Here''s /boot/grub/menu.lst (which is a symlink to grub.conf) on domU''s fs #================================default=0 timeout=5 hiddenmenu title Red Hat Enterprise Linux Server (2.6.18-128.1.6.el5xen) root (hd0,0) kernel /boot/vmlinuz-2.6.18-128.1.6.el5xen ro root=/dev/hda1 initrd /boot/initrd-2.6.18-128.1.6.el5xen.img #================================ Here''s /etc/modprobe.conf (required to build initrd correctly) #================================alias eth0 xennet alias scsi_hostadapter xenblk #================================ After checking those files you either need to create initrd inside domU, or copy dom0''s initrd to domU. Here''s anlother example, which is what I did to turn jailtime.org image (which uses sda1) to a pygrub-supported domU: http://lists.xensource.com/archives/html/xen-users/2009-03/msg00372.html> You are right that if I try to start > the unmodified xen domU config on the new dom0 (with > disabled libvirtd) I can do it. > but if I try to change anything-- > even shift to pygrub with same disk configuration, things don''t work.Again, problem not directly related to libvirt. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Steven Timm
2009-Apr-23 04:26 UTC
Re: [Xen-users] Re: export single partitions to xen 3.1.2 domU
On Wed, 22 Apr 2009, Fajar A. Nugraha wrote:> On Wed, Apr 22, 2009 at 4:27 PM, Steven Timm <timm@fnal.gov> wrote: >>> Libvirt (for most purposes) is just a frontend. You can dump libvirt >>> altogether if you like (which is what I did) and manage domUs using xm >>> commands. That way (if you want to) it can be just like your previous >>> setup. >> >> Are you suggesting that >> xm create, which I always use to launch the domain, >> behaves differently depending on whether libvirt is running or not? > > No. What I''m saying is that if you don''t like libvirt or have problems > using it, then don''t use it. > xm will work regardless whether libvirt is available or not. > > >> >> >>> Which is why I told you earlier >>> >>> "If by "convert" you mean "run these old dom0 on new version of dom0", >>> then you don''t have to do anything. Old domU config should run just >>> fine." >>> >> Except that I want to move the kernel inside the domU and boot >> using pygrub, which I wasn''t doing on this system before. >> > > Now we''re getting somewhere : It''s not related libvirt. At all. :) > pyggrub does NOT require libvrt to be available in any way, shape, or form. > Here''s my domU config file, using similar disk layout as yours (e.g. > hda1 instead of hda, sda, or xvda) > > #================================> memory = "500" > maxmem = "8000" > > vcpus=8 > vcpu_avail=1 > cpus="1-7" > > disk = [ > ''phy:/dev/rootVG/radrootlv,hda1,w'', > ''phy:/dev/rootVG/radswaplv,hda2,w'', > ] > vif = [ > ''mac=00:16:3E:F3:AE:C0, bridge=br102'', > ] > vfb =[''type=vnc,vnclisten=0.0.0.0''] > bootloader="/usr/bin/pygrub" > #================================> > Here''s /etc/fstab on that domU : > #================================> /dev/hda1 / ext3 > defaults,noatime 1 1 > devpts /dev/pts devpts gid=5,mode=620 0 0 > tmpfs /dev/shm tmpfs defaults 0 0 > proc /proc proc defaults 0 0 > sysfs /sys sysfs defaults 0 0 > /dev/hda2 swap swap defaults 0 0 > #================================> > Here''s /boot/grub/menu.lst (which is a symlink to grub.conf) on domU''s fs > #================================> default=0 > timeout=5 > hiddenmenu > title Red Hat Enterprise Linux Server (2.6.18-128.1.6.el5xen) > root (hd0,0) > kernel /boot/vmlinuz-2.6.18-128.1.6.el5xen ro root=/dev/hda1 > initrd /boot/initrd-2.6.18-128.1.6.el5xen.img > #================================> > Here''s /etc/modprobe.conf (required to build initrd correctly) > #================================> alias eth0 xennet > alias scsi_hostadapter xenblk > #================================> > After checking those files you either need to create initrd inside > domU, or copy dom0''s initrd to domU.Thanks a lot. The right modprobe.conf and remaking the initrd was the key. I had actualy installed the new kernel-xen inside the domU before the reboot, which triggers a mkinitrd but without the right modprobe.conf it didnt'' make it right. One of my nodes is back up in the new configuration and the other one should be soon. Steve Timm> > Here''s anlother example, which is what I did to turn jailtime.org > image (which uses sda1) to a pygrub-supported domU: > http://lists.xensource.com/archives/html/xen-users/2009-03/msg00372.html > >> You are right that if I try to start >> the unmodified xen domU config on the new dom0 (with >> disabled libvirtd) I can do it. >> but if I try to change anything-- >> even shift to pygrub with same disk configuration, things don''t work. > > Again, problem not directly related to libvirt. > > Regards, > > Fajar > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- ------------------------------------------------------------------ Steven C. Timm, Ph.D (630) 840-8525 timm@fnal.gov http://home.fnal.gov/~timm/ Fermilab Computing Division, Scientific Computing Facilities, Grid Facilities Department, FermiGrid Services Group, Assistant Group Leader. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users