Newbie Question: We are using RHEL 5.2 with the 2.6.18-92.1.6.el5xen kernel. I am trying to follow instructions that I found to create an bootable image by doing the following: I first created a 10 gig file and formatted the partition using the dd and mkfs.ext3 commands: dd if=/dev/zero if=generic.img bs=1024k count=10000 mkfs.ext3 -t ext3 generic.img>From a working image that I shut down I then copied the directories intothe file: mount -o loop generic.img /mnt/generic cp -ax /mnt/image1/{root,dev,var,etc,usr,bin,sbin,lib} /mnt/generic mkdir /mnt/generic/{proc,sys,home,tmp} I copied image1s config file and called it generic and then tried to start it up but I get a message that the virDomainCreate() failed POST operations failed: (xend.err Error creating domain:bootloader didn''t return any data!) I am guessing that I have missed a few steps in the process. Would someone please point them out? Thanks. Gord _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Jul 25, 2008 at 3:52 PM, Gordon Carlyle <Gordon.Carlyle@nic.bc.ca>wrote:> Newbie Question: > > > > We are using RHEL 5.2 with the 2.6.18-92.1.6.el5xen kernel. I am trying to > follow instructions that I found to create an bootable image by doing the > following: > > I copied image1s config file and called it generic and then tried to start > it up but I get a message that the virDomainCreate() failed POST operations > failed: (xend.err Error creating domain:bootloader didn''t return any data!) > > > > I am guessing that I have missed a few steps in the process. Would someone > please point them out? > > > > Thanks. > > > > Gord > > >Is this for HVM or PV? Seems you need a boot loader of sorts. Grant McWilliams _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Gordon Carlyle wrote on Fri, 25 Jul 2008 15:52:26 -0700:> dd if=/dev/zero if=generic.img bs=1024k count=10000 > > mkfs.ext3 -t ext3 generic.imgyou can omit the -t ext3> > > > >From a working image that I shut down I then copied the directories into > the file: > > mount -o loop generic.img /mnt/generic > > cp -ax /mnt/image1/{root,dev,var,etc,usr,bin,sbin,lib} /mnt/genericdo not copy dev, just create it like below! You forgot to copy /boot !> > mkdir /mnt/generic/{proc,sys,home,tmp}this leaves you with a tmp that has wrong permissions, copy it as well or add the necessary steps afterwards. I assume, home is empty or you do not want to copy it? Do you want to go from xvda image to an ext3 file system or what is the purpose? The procedure is straight-forward and it looks like you have done it *almost* correctly. I assume you followed an instruction that wants to boot from an external kernel, there is a nice wiki with a lot of good explanations about this out there. However, these instructions are nonsense for paravirtualized CentOS/RHEL guests, probably all PV guests. You simply copy *everything* *as is* to the new location, except for the "special directories" dev, proc, sys. Then you just boot the VM like normal with the pygrub boot loader. e.g. copy the config file from your original virt-install/virt-manager created setup, do *not* change it according to the instructions for external kernel booting you found! Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
You were correct about the *almost*. Great help! Thanks very much. Gord -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Kai Schaetzl Sent: July-26-08 03:31 To: xen-users@lists.xensource.com Subject: Re: [Xen-users] Creating a Bootable Image file Gordon Carlyle wrote on Fri, 25 Jul 2008 15:52:26 -0700:> dd if=/dev/zero if=generic.img bs=1024k count=10000 > > mkfs.ext3 -t ext3 generic.imgyou can omit the -t ext3> > > > >From a working image that I shut down I then copied the directories into > the file: > > mount -o loop generic.img /mnt/generic > > cp -ax /mnt/image1/{root,dev,var,etc,usr,bin,sbin,lib} /mnt/genericdo not copy dev, just create it like below! You forgot to copy /boot !> > mkdir /mnt/generic/{proc,sys,home,tmp}this leaves you with a tmp that has wrong permissions, copy it as well or add the necessary steps afterwards. I assume, home is empty or you do not want to copy it? Do you want to go from xvda image to an ext3 file system or what is the purpose? The procedure is straight-forward and it looks like you have done it *almost* correctly. I assume you followed an instruction that wants to boot from an external kernel, there is a nice wiki with a lot of good explanations about this out there. However, these instructions are nonsense for paravirtualized CentOS/RHEL guests, probably all PV guests. You simply copy *everything* *as is* to the new location, except for the "special directories" dev, proc, sys. Then you just boot the VM like normal with the pygrub boot loader. e.g. copy the config file from your original virt-install/virt-manager created setup, do *not* change it according to the instructions for external kernel booting you found! Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ 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
Gordon Carlyle wrote on Thu, 31 Jul 2008 11:54:00 -0700:> You were correct about the *almost*. Great help!Glad you succeeded :-) Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users