Hi everyone, I have created a CentOS4 PV on a Xen host contained in a *.img file. Now I want to store that image fileon a NFS server. Does anyone have a config.sxp file example and want to share it on a pastebin service? I have put the *.img on an NFS server, then mounted the img using #mount -o loop image.img /mnt/centosand then exported it to the xen host but it does not work since the DomU kernel does not have Root NFS support. How can I do instead to read directly from the xen host the *.img file stored in the NFS server, I think it wouldlook like: nfs_root = "/mnt/images/centos/image.img". ** This does not work at all, it ends up with a kernel panic on console. kernel = "/mnt/images/centos/boot/vmlinuz-2.6.9-89.ELxenU"ramdisk = "/mnt/images/centos/boot/initrd-2.6.9-89.ELxenU.img"memory = 512name = "centos4"vcpus = 1vif = ['''']dhcp = "dhcp"ip = "192.168.1.100"netmask = "255.255.255.0"gateway = "192.168.1.254"hostname = "centos4"nfs_root = "/mnt/images/centos/"nfs_server = "192.168.1.98"root = "/dev/root"on_poweroff = ''destroy''on_reboot = ''restart''on_crash = ''restart'' I would really appreciate one example or config option.Regards,Tony. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
In Xen, you need to create a Storage Repository for the NFS share instead of trying to manually make the connection to the NFS share. Then Xen will be able to use the NFS share for storing DomU images. -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Antonio Colin Sent: Saturday, October 08, 2011 12:03 AM To: Xen Users List Subject: [Xen-users] DomU image file on NFS Storage Hi everyone, I have created a CentOS4 PV on a Xen host contained in a *.img file. Now I want to store that image file on a NFS server. Does anyone have a config.sxp file example and want to share it on a pastebin service? I have put the *.img on an NFS server, then mounted the img using #mount -o loop image.img /mnt/centos and then exported it to the xen host but it does not work since the DomU kernel does not have Root NFS support. How can I do instead to read directly from the xen host the *.img file stored in the NFS server, I think it would look like: nfs_root = "/mnt/images/centos/image.img". ** This does not work at all, it ends up with a kernel panic on console. kernel = "/mnt/images/centos/boot/vmlinuz-2.6.9-89.ELxenU" ramdisk = "/mnt/images/centos/boot/initrd-2.6.9-89.ELxenU.img" memory = 512 name = "centos4" vcpus = 1 vif = [''''] dhcp = "dhcp" ip = "192.168.1.100" netmask = "255.255.255.0" gateway = "192.168.1.254" hostname = "centos4" nfs_root = "/mnt/images/centos/" nfs_server = "192.168.1.98" root = "/dev/root" on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' I would really appreciate one example or config option. Regards, Tony. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Erick, Yes, that is only for locally, AoE, iSCSI (if I remember rightly) stored images. I''m using Xen 4.0.0 + Debian Lenny as Dom0. The CentOS4 *.img file was created with virt-manager within the Dom0 and stored in the local hard drive, as usual. Now, I want to store that same *.img file but on an NFS server and boot it from there for later migration, whichis exactly what I want to do. I have tried mounting the DomU filesystem on the NFS server and then export the directory to the Dom0, but it does not boot. And it woult not work either for a HVM which is what I would be implementing later. Do you have any option or idea of how could I do this? Thank you, Tony. Date: Sat, 8 Oct 2011 11:18:12 +0200 From: zod@pointless.org To: dftonywhite@hotmail.com Subject: Re: [Xen-users] DomU image file on NFS Storage Hi I guess I''m missing something important but it is not disk = [ ''file:/mnt/images/centos/image.img,hda,w''] you want to do? or does it have to be nfs-mounted in the DomU? /Erik On 10/08/2011 07:02 AM, Antonio Colin wrote: Hi everyone, I have created a CentOS4 PV on a Xen host contained in a *.img file. Now I want to store that image file on a NFS server. Does anyone have a config.sxp file example and want to share it on a pastebin service? I have put the *.img on an NFS server, then mounted the img using #mount -o loop image.img /mnt/centos and then exported it to the xen host but it does not work since the DomU kernel does not have Root NFS support. How can I do instead to read directly from the xen host the *.img file stored in the NFS server, I think it would look like: nfs_root = "/mnt/images/centos/image.img". ** This does not work at all, it ends up with a kernel panic on console. kernel "/mnt/images/centos/boot/vmlinuz-2.6.9-89.ELxenU" ramdisk "/mnt/images/centos/boot/initrd-2.6.9-89.ELxenU.img" memory = 512 name = "centos4" vcpus = 1 vif = [''''] dhcp = "dhcp" ip = "192.168.1.100" netmask = "255.255.255.0" gateway = "192.168.1.254" hostname = "centos4" nfs_root = "/mnt/images/centos/" nfs_server = "192.168.1.98" root = "/dev/root" on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' I would really appreciate one example or config option. Regards, Tony. _______________________________________________ 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
Hi, Yes, but I think that is only for Xen Server isn''t it? I am using Xen hypervisor 4.0.0 + Debian Lenny as Dom0. Is there a way to achieve NFS SR on Xen 4 ?? I have been looing for that on Google but nothing yet. Thank you in advance, Tony. From: admin@xenhive.com To: xen-users@lists.xensource.com Subject: RE: [Xen-users] DomU image file on NFS Storage Date: Sat, 8 Oct 2011 08:54:54 -0500 In Xen, you need to create a Storage Repository for the NFS share instead of trying to manually make the connection to the NFS share. Then Xen will be able to use the NFS share for storing DomU images. -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Antonio Colin Sent: Saturday, October 08, 2011 12:03 AM To: Xen Users List Subject: [Xen-users] DomU image file on NFS Storage Hi everyone, I have created a CentOS4 PV on a Xen host contained in a *.img file. Now I want to store that image file on a NFS server. Does anyone have a config.sxp file example and want to share it on a pastebin service? I have put the *.img on an NFS server, then mounted the img using #mount -o loop image.img /mnt/centos and then exported it to the xen host but it does not work since the DomU kernel does not have Root NFS support. How can I do instead to read directly from the xen host the *.img file stored in the NFS server, I think it would look like: nfs_root "/mnt/images/centos/image.img". ** This does not work at all, it ends up with a kernel panic on console. kernel "/mnt/images/centos/boot/vmlinuz-2.6.9-89.ELxenU" ramdisk "/mnt/images/centos/boot/initrd-2.6.9-89.ELxenU.img" memory = 512 name = "centos4" vcpus = 1 vif = [''''] dhcp = "dhcp" ip = "192.168.1.100" netmask "255.255.255.0" gateway "192.168.1.254" hostname = "centos4" nfs_root = "/mnt/images/centos/" nfs_server "192.168.1.98" root = "/dev/root" on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' I would really appreciate one example or config option. Regards, Tony. _______________________________________________ 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
Tony, When Xen presents anything disk wise to a DomU, the means of how the Dom0 got the disk image is abstracted. As such, you don''t need to provide an "nfs_root" option to the DomU. Just use the normal config options for accessing a disk, as the Dom0 takes care of all nfs stuff. Thanks Jonny On 08/10/2011 18:07, Antonio Colin wrote:> Hi, > > Yes, but I think that is only for Xen Server isn''t it? I am using Xen > hypervisor 4.0.0 + Debian Lenny as Dom0. > Is there a way to achieve NFS SR on Xen 4 ?? I have been looing for > that on Google but nothing yet. > > Thank you in advance, > > Tony. > > ------------------------------------------------------------------------ > From: admin@xenhive.com > To: xen-users@lists.xensource.com > Subject: RE: [Xen-users] DomU image file on NFS Storage > Date: Sat, 8 Oct 2011 08:54:54 -0500 > > In Xen, you need to create a Storage Repository for the NFSshare > instead of trying to manually make the connection to the NFSshare. > Then Xen will be able to use the NFSshare for storing DomU images. > > -----Original Message----- > *From:* xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] *On Behalf Of *Antonio > Colin > *Sent:* Saturday, October 08, 201112:03 AM > *To:* Xen Users List > *Subject:* [Xen-users] DomU image file on NFS Storage > > Hi everyone, > > I have created a CentOS4 PV on a Xen host contained in a *.img file. > Now I want to store that image file > > on a NFS server. Does anyone have a config.sxp file example and want > to share it on a pastebin service? > > I have put the *.img on an NFS server, then mounted the img using > #mount -o loop image.img /mnt/centos > > and then exported it to the xen host but it does not work since the > DomU kernel does not have Root NFS support. > > How can I do instead to read directly from the xen host the *.img file > stored in the NFS server, I think it would > > look like: nfs_root = "/mnt/images/centos/image.img". > > ** This does not work at all, it ends up with a kernel panic on console. > > kernel = "/mnt/images/centos/boot/vmlinuz-2.6.9-89.ELxenU" > > ramdisk = "/mnt/images/centos/boot/initrd-2.6.9-89.ELxenU.img" > > memory = 512 > > name = "centos4" > > vcpus = 1 > > vif = [''''] > > dhcp = "dhcp" > > ip = "192.168.1.100" > > netmask = "255.255.255.0" > > gateway = "192.168.1.254" > > hostname = "centos4" > > nfs_root = "/mnt/images/centos/" > > nfs_server = "192.168.1.98" > > root = "/dev/root" > > on_poweroff = ''destroy'' > > on_reboot = ''restart'' > > on_crash = ''restart'' > > I would really appreciate one example or config option. > > Regards, > > Tony. > > > _______________________________________________ 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_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
________________________________ From: Antonio Colin <dftonywhite@hotmail.com> To: Xen Users List <xen-users@lists.xensource.com> Sent: Friday, October 7, 2011 10:02 PM Subject: [Xen-users] DomU image file on NFS Storage Hi everyone, I have created a CentOS4 PV on a Xen host contained in a *.img file. Now I want to store that image file on a NFS server. Does anyone have a config.sxp file example and want to share it on a pastebin service? I have put the *.img on an NFS server, then mounted the img using #mount -o loop image.img /mnt/centos and then exported it to the xen host but it does not work since the DomU kernel does not have Root NFS support. How can I do instead to read directly from the xen host the *.img file stored in the NFS server, I think it would look like: nfs_root = "/mnt/images/centos/image.img". ** This does not work at all, it ends up with a kernel panic on console. kernel = "/mnt/images/centos/boot/vmlinuz-2.6.9-89.ELxenU" ramdisk = "/mnt/images/centos/boot/initrd-2.6.9-89.ELxenU.img" memory = 512 name = "centos4" vcpus = 1 vif = [''''] dhcp = "dhcp" ip = "192.168.1.100" netmask = "255.255.255.0" gateway = "192.168.1.254" hostname = "centos4" nfs_root = "/mnt/images/centos/" nfs_server = "192.168.1.98" root = "/dev/root" on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' I would really appreciate one example or config option. Regards, Tony. --------------- Here are the snips from an SL6 domU booting from nfsroot. The dom0 is OpenSuSE with xen 4.1.1 http://paste.ubuntu.com/704618/ this took me 3 days to get working. The kernel rebuild with config changes was tough until I gave up on rpm build and went with traditional Make. All the NFS options were passed via extra = "" -- Mark _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi guys, I just wanted to say thank you for all your help. Everything was useful and is tested... now I am moving to the next stage of the project. Best regards, Tony.> > > > _______________________________________________ > 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