I have a CentOS server that I started to rebuild using Xen. It''s turning out to have lot more configuring than I thought. So instead of building a new server and setting everything up again, is there any way to convert a running, stand alone linux system into a xen image? Googling I see people converting xen to parallels, vmware to xen, and even Windows to Xen, but I could not find converting a linux system. Thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Di, Apr 01, 2008 at 02:49:43 -0400, James Pifer wrote:> I have a CentOS server that I started to rebuild using Xen. It''s turning > out to have lot more configuring than I thought. So instead of building > a new server and setting everything up again, is there any way to > convert a running, stand alone linux system into a xen image? >Yes, of course you can. First of all, you must know, do you want to convert it to a PV or an HVM Xen domain. HVM: 1) Just copy image of your server to a logical volume of the Xen server LVM or to any other block device. Xen uses plain raw images for vm images storing. To do this you can boot your Cent OS to single user mode (and bring network up manually) or use Knoppix or any live cd. 2) Create config for new domain. 3) Run it. PV: Like HVM, but after that (and before domain start), you also should do: 1) Copy into domain file system kernel modules (/lib/modules/`uname -r`) 2) Modify /etc/fstab (if needed) 3) Modify /etc/udev/rules.d (if needed) It''s better to start from converting into HVM and the convert it into PV if needed.> Googling I see people converting xen to parallels, vmware to xen, and > even Windows to Xen, but I could not find converting a linux system. > > Thanks, > James > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> First of all, you must know, do you want to convert it > to a PV or an HVM Xen domain.I believe I need to convert to a PV.> > HVM: > > 1) Just copy image of your server to a logical volume of > the Xen server LVM or to any other block device.Is it possible to create an uncompressed image using something like g4l and make use of that image file somehow? Thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-01 19:54 UTC
RE: [Xen-users] Convert CentOS system to Xen image?
James Pifer wrote:> > First of all, you must know, do you want to convert it > > to a PV or an HVM Xen domain. > > I believe I need to convert to a PV. > > > > > HVM: > > > > 1) Just copy image of your server to a logical volume of > > the Xen server LVM or to any other block device. > > Is it possible to create an uncompressed image using something like g4l > and make use of that image file somehow?Watch out for device name changes, like sda->xvda, in you configuration. How big is the volumes of the source system? If they are really big it might be best to kickstart a fresh install into a PV, then import the configuration and packages from the source system to the new PV. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Di, Apr 01, 2008 at 03:47:20 -0400, James Pifer wrote:> > First of all, you must know, do you want to convert it > > to a PV or an HVM Xen domain. > > I believe I need to convert to a PV. > > > > > HVM: > > > > 1) Just copy image of your server to a logical volume of > > the Xen server LVM or to any other block device. > > Is it possible to create an uncompressed image using something like g4l > and make use of that image file somehow?I think yes, but I have never used it. You can create image with cat, netcat or ssh. knoopix# cat /dev/sda | nc -l -p 3000 dom0# nc knoppix 3000 > centos.img or (if you use LVM and have a volume group called VG) dom0# lvcreate -L 20G -n centos /dev/VG dom0# nc knoppix 3000 > /dev/VG/centos> > Thanks, > James > >-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, 2008-04-01 at 15:54 -0400, Ross S. W. Walker wrote:> James Pifer wrote: > > > First of all, you must know, do you want to convert it > > > to a PV or an HVM Xen domain. > > > > I believe I need to convert to a PV. > > > > > > > > HVM: > > > > > > 1) Just copy image of your server to a logical volume of > > > the Xen server LVM or to any other block device. > > > > Is it possible to create an uncompressed image using something like g4l > > and make use of that image file somehow? > > Watch out for device name changes, like sda->xvda, in you > configuration. > > How big is the volumes of the source system? > > If they are really big it might be best to kickstart a fresh > install into a PV, then import the configuration and packages > from the source system to the new PV. >Not that bit at all. Total used space on the system is about 8 gig, and I might be able to trim that down. But I don''t have free space to create a separate logical drive. So I would need to do this in an image file. Thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> I think yes, but I have never used it. > > > You can create image with cat, netcat or ssh. > > > knoopix# cat /dev/sda | nc -l -p 3000 > > dom0# nc knoppix 3000 > centos.img >Any chance of this working while the system is up, instead of booting with knoppix (or anything else)? Or would too much not be copied because it''s locked? One of my other challenges is that this system is remote to me so I would have to ask (beg) someone to give me hand. Also, being a live production system, downtime is never easy... Never used netcat before, that looks pretty cool. Thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Di, Apr 01, 2008 at 04:17:19 -0400, James Pifer wrote:> > I think yes, but I have never used it. > > > > > > You can create image with cat, netcat or ssh. > > > > > > knoopix# cat /dev/sda | nc -l -p 3000 > > > > dom0# nc knoppix 3000 > centos.img > > > > Any chance of this working while the system is up, instead of booting > with knoppix (or anything else)? Or would too much not be copied because > it''s locked?The reason not in locks actually, but better to say in the fact that copied filesystem is being modified while copying. Hence it''s likely that it will be inconsistent after copying finished (I mean target fs). If you can remount all of the source file systems to ro mode, you may not reboot to live cd. Also, if it is impossible, you can shut all processes (or better to switch to init 1, but as far as I understand you want to ssh to the server, so sshd must be running as minimum), that can modify filesystem, and after that make # sync and start copying. Also you can use ssh instead of nc (ssh eats more CPU power due to crypting, but it is not so important in your case). centos# sync ; cat /dev/hda | ssh dom0 '' cat > centos.img ''> > One of my other challenges is that this system is remote to me so I > would have to ask (beg) someone to give me hand. Also, being a live > production system, downtime is never easy... > > Never used netcat before, that looks pretty cool. > > Thanks, > James >-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Attempted to do this using netcat + ssh and here''s my next problem. The CentOS server is using LVM, so instead of getting an img file of around 8 gig that I expected, I got one that is 18 gig, or the size of the LV. I tried it anyway and I get a valid boot sector not found. Any suggestions? Thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-02 13:19 UTC
RE: [Xen-users] Convert CentOS system to Xen image?
James Pifer wrote:> Attempted to do this using netcat + ssh and here''s my next problem. The > CentOS server is using LVM, so instead of getting an img file of around > 8 gig that I expected, I got one that is 18 gig, or the size of the LV. > > I tried it anyway and I get a valid boot sector not found. > > Any suggestions?Don''t do netcat, create a fresh PV with the same installed packages as on the old machine and copy the configuration of the old server that is pertinent. You could look at creating a kickstart file to have those packages installed during the initial install, or just install base/core and add in by hand the missing packages via yum. For data partitions like /home you can do a dump, sftp, and restore. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Apr 2, 2008 at 8:41 AM, James Pifer <jep@obrien-pifer.com> wrote:> Attempted to do this using netcat + ssh and here''s my next problem. The > CentOS server is using LVM, so instead of getting an img file of around > 8 gig that I expected, I got one that is 18 gig, or the size of the LV. > > I tried it anyway and I get a valid boot sector not found. > > Any suggestions?Xen uses a partition within a partiton. If you are going from a real system to a xen and they are both on lvms do something like lvcreate -n xenBoot -L <a little bigger than the real servers lvm>G /dev/VolGroup00 fdisk /dev/VolGroup00/xenBoot create a primary partion kpartx -a /dev/VolGroup/xendBoot <this will make the partition visible to dom0 in /dev/mapper/xenBoot1 dd if=/dev/VolGroup/<your real boot volume> of=/dev/mapper/xenBoot1> > > Thanks, > James > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- Joe Royall 407-401-2007 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mi, Apr 02, 2008 at 08:41:40 -0400, James Pifer wrote:> Attempted to do this using netcat + ssh and here''s my next problem. The > CentOS server is using LVM, so instead of getting an img file of around > 8 gig that I expected, I got one that is 18 gig, or the size of the LV.If you use netcat (and dd), you will get image with the size of underlying harddisk. (not LV, but whole disk). What command have you use to copy image? If you use line cat /dev/DEVICE | nc ... what do you specify as the DEVICE?> > I tried it anyway and I get a valid boot sector not found. > > Any suggestions? > > Thanks, > James > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mi, Apr 02, 2008 at 09:19:19 -0400, Ross S. W. Walker wrote:> James Pifer wrote: > > Attempted to do this using netcat + ssh and here''s my next problem. The > > CentOS server is using LVM, so instead of getting an img file of around > > 8 gig that I expected, I got one that is 18 gig, or the size of the LV. > > > > I tried it anyway and I get a valid boot sector not found. > > > > Any suggestions? > > Don''t do netcat, create a fresh PV with the same installed packages > as on the old machine and copy the configuration of the old server > that is pertinent. You could look at creating a kickstart file to > have those packages installed during the initial install, or just > install base/core and add in by hand the missing packages via yum.You can use dd or cat (+ netcat | ssh) and it will copy raw image, but creating LVM and filesystems on its logical volumes has several advantages: 1. You can filesystems with any layout and sizes 2. You transfer only data and not "freespace" as in case of dd/netcat usage Disatvantage: 1. You should create LVM and FS first.> > For data partitions like /home you can do a dump, sftp, and restore.Also you can use rsync (it should be installed on both hosts).> > -Ross > > ______________________________________________________________________ > This e-mail, and any attachments thereto, is intended only for use by > the addressee(s) named herein and may contain legally privileged > and/or confidential information. If you are not the intended recipient > of this e-mail, you are hereby notified that any dissemination, > distribution or copying of this e-mail, and any attachments thereto, > is strictly prohibited. If you have received this e-mail in error, > please immediately notify the sender and permanently delete the > original and any copy or printout thereof. >-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-02 13:52 UTC
RE: [Xen-users] Convert CentOS system to Xen image?
Igor Chubin wrote:> On Mi, Apr 02, 2008 at 09:19:19 -0400, Ross S. W. Walker wrote: > > James Pifer wrote: > > > Attempted to do this using netcat + ssh and here''s my next problem. The > > > CentOS server is using LVM, so instead of getting an img file of around > > > 8 gig that I expected, I got one that is 18 gig, or the size of the LV. > > > > > > I tried it anyway and I get a valid boot sector not found. > > > > > > Any suggestions? > > > > Don''t do netcat, create a fresh PV with the same installed packages > > as on the old machine and copy the configuration of the old server > > that is pertinent. You could look at creating a kickstart file to > > have those packages installed during the initial install, or just > > install base/core and add in by hand the missing packages via yum. > > > You can use dd or cat (+ netcat | ssh) > and it will copy raw image,Yes, but that makes a lot of assumptions about the source and destination systems that might not be true, like, the source system is physical and the destination virtual, so the destination will have different disk names, the source may have software RAID1, but the destination being virtual may already be backed by RAID1 and not need it. The source disk may be infinitely bigger then the allocated destination (ie source drive 250GB, root partition is 16GB LV and only 3GB of it is used, but netcat''ing will try to transfer full 250GB into a 16 or 32GB guest volume).> but creating LVM and filesystems on its logical volumes > has several advantages: > > 1. You can filesystems with any layout and sizes > 2. You transfer only data and not "freespace" as in case of > dd/netcat usage > > > Disatvantage: > > 1. You should create LVM and FS first. >I don''t think I grasp your advantages/disadvantages points here, maybe it''s a language barrier where the subtleties were lost in translation. I do agree that LVM is the way to go, as it''s pros far outweigh it''s cons.> > > > For data partitions like /home you can do a dump, sftp, and restore. > > Also you can use rsync > (it should be installed on both hosts).rsync will indiscriminately copy-over files that it shouldn''t. No this is why companies sell stand-alone P2V products. You can look for these, but if you had just created the PV and duplicated the important configuration it''d be up and running and in testing phase now. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, 2008-04-02 at 16:32 +0300, Igor Chubin wrote:> On Mi, Apr 02, 2008 at 08:41:40 -0400, James Pifer wrote: > > Attempted to do this using netcat + ssh and here''s my next problem. The > > CentOS server is using LVM, so instead of getting an img file of around > > 8 gig that I expected, I got one that is 18 gig, or the size of the LV. > > > If you use netcat (and dd), you will get image > with the size of underlying harddisk. > > (not LV, but whole disk). > > > What command have you use to copy image? > > If you use line > > cat /dev/DEVICE | nc ... >I used: cat /dev/ida/c0d0p2 | nc -l -p 3000 Then on dom0 I used: netcat centoshost 3000 > centos.img James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
...> > You can use dd or cat (+ netcat | ssh) > > and it will copy raw image, > > Yes, but that makes a lot of assumptions about the source and > destination systems that might not be true, like, the source > system is physical and the destination virtual, so the > destination will have different disk names, the source may > have software RAID1, but the destination being virtual may > already be backed by RAID1 and not need it. The source disk > may be infinitely bigger then the allocated destination > (ie source drive 250GB, root partition is 16GB LV and only > 3GB of it is used, but netcat''ing will try to transfer full > 250GB into a 16 or 32GB guest volume).I agree with you. My advice is related to particular (described earlier) task. ...> > Disatvantage: > > > > 1. You should create LVM and FS first. > > > > I don''t think I grasp your advantages/disadvantages points > here, maybe it''s a language barrier where the subtleties > were lost in translation.My mother tongue is Russian and my English is very very poor. It''s really hard to quickly express my thoughts in English. Excuse me Ross, and all who read this (and other my postings to the list). When I say that dd/cat + netcat usage has advantage over LVM+FS+rsync/scp/dump usage in the particular case, I mean: when you use cat/dd you can copy system quick and dirty, but when you use high level tools for copying files, you should create volumes and filesystems before copying. I stress, that cat/dd one should use only in particular cases (for "quick-and-dirty" migration). And for full featured migration it''s better to use LVM/FS and other high-level tools.> I do agree that LVM is the way to go, as it''s pros far > outweigh it''s cons. >Ross, I think that I fully agree with you (except the fact that I think that there are many tasks where dd/cat is enough).> > > > > > For data partitions like /home you can do a dump, sftp, and restore. > > > > Also you can use rsync > > (it should be installed on both hosts). > > rsync will indiscriminately copy-over files that it shouldn''t.What do you mean? -- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mi, Apr 02, 2008 at 10:03:04 -0400, James Pifer wrote:> On Wed, 2008-04-02 at 16:32 +0300, Igor Chubin wrote: > > On Mi, Apr 02, 2008 at 08:41:40 -0400, James Pifer wrote: > > > Attempted to do this using netcat + ssh and here''s my next problem. The > > > CentOS server is using LVM, so instead of getting an img file of around > > > 8 gig that I expected, I got one that is 18 gig, or the size of the LV. > > > > > > If you use netcat (and dd), you will get image > > with the size of underlying harddisk. > > > > (not LV, but whole disk). > > > > > > What command have you use to copy image? > > > > If you use line > > > > cat /dev/DEVICE | nc ... > > > > > I used: > cat /dev/ida/c0d0p2 | nc -l -p 3000You have copied just one partition, instead of the whole disk. To copy the whole disk, you should use: # cat /dev/ida/c0d0 | nc -l -p 3000 But this command will copy all of the disk (and if it is big, it is not good idea; also you need enough freespace on the target system). More flexible way is the way mentioned by Ross: to use LVM on the target system and to copy not the raw device, but files, which is situated on the device.> > Then on dom0 I used: > netcat centoshost 3000 > centos.img > > James >-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-02 14:28 UTC
RE: [Xen-users] Convert CentOS system to Xen image?
Igor Chubin wrote:> ... > > > You can use dd or cat (+ netcat | ssh) > > > and it will copy raw image, > > > > Yes, but that makes a lot of assumptions about the source and > > destination systems that might not be true, like, the source > > system is physical and the destination virtual, so the > > destination will have different disk names, the source may > > have software RAID1, but the destination being virtual may > > already be backed by RAID1 and not need it. The source disk > > may be infinitely bigger then the allocated destination > > (ie source drive 250GB, root partition is 16GB LV and only > > 3GB of it is used, but netcat''ing will try to transfer full > > 250GB into a 16 or 32GB guest volume). > > I agree with you. > My advice is related to particular (described earlier) task. > > ... > > > Disatvantage: > > > > > > 1. You should create LVM and FS first. > > > > > > > I don''t think I grasp your advantages/disadvantages points > > here, maybe it''s a language barrier where the subtleties > > were lost in translation. > > My mother tongue is Russian and my English is very very poor. > It''s really hard to quickly express my thoughts in English. > Excuse me Ross, and all who read this (and other my postings > to the list). > > When I say that dd/cat + netcat usage has advantage over > LVM+FS+rsync/scp/dump usage in the particular case, > I mean: > > when you use cat/dd you can copy system quick and dirty, > but when you use high level tools for copying files, > you should create volumes and filesystems before copying. > > I stress, that cat/dd one should use only > in particular cases (for "quick-and-dirty" migration). > And for full featured migration > it''s better to use LVM/FS and other high-level tools. > > > I do agree that LVM is the way to go, as it''s pros far > > outweigh it''s cons. > > > > Ross, I think that I fully agree with you > (except the fact that I think that there are many > tasks where dd/cat is enough). > > > > > > > > > For data partitions like /home you can do a dump, sftp, and restore. > > > > > > Also you can use rsync > > > (it should be installed on both hosts). > > > > rsync will indiscriminately copy-over files that it shouldn''t. > > What do you mean?Well rsync was really designed to replicate data from one system to another, but this isn''t technically replication here as not all configs will be the same. If it''s a data volume like /home, then you might get by with rsync. I have found though that the time to get rsync going efficiently doesn''t pay for a one time operation. If this is done over a secure reliable network and not the Internet, you could do a dump | ssh restore type deal, maybe add a gzip step in there to compress over the wire and it''s done. I have been playing around with the idea of using something like ''revisor'' from Fedora to capture the basic system settings and packages into a kickstart install iso that you can use to install a PV that''s identical to the source. Have it do an RPM audit of all config files except a few key ones like fstab, ifcfg etc and such and tar those up and have it extracted in the %post section of the kickstart... It''s an interesting idea... Hmmm -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I simply commented out the line of boot in /etc/fstab. hope it works. On Wed, Apr 2, 2008 at 8:41 AM, James Pifer <jep@obrien-pifer.com> wrote:> Attempted to do this using netcat + ssh and here''s my next problem. The > CentOS server is using LVM, so instead of getting an img file of around > 8 gig that I expected, I got one that is 18 gig, or the size of the LV. > > I tried it anyway and I get a valid boot sector not found. > > Any suggestions? > > Thanks, > James > > > _______________________________________________ > 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
...> > > > > For data partitions like /home you can do a dump, sftp, and restore. > > > > > > > > Also you can use rsync > > > > (it should be installed on both hosts). > > > > > > rsync will indiscriminately copy-over files that it shouldn''t. > > > > What do you mean? > > Well rsync was really designed to replicate data from > one system to another, but this isn''t technically > replication here as not all configs will be the same. > > If it''s a data volume like /home, then you might get > by with rsync. I have found though that the time to > get rsync going efficiently doesn''t pay for a one > time operation. If this is done over a secure > reliable network and not the Internet, you could do > a dump | ssh restore type deal, maybe add a gzip > step in there to compress over the wire and it''s > done.If I understand you right, you say that hostA# dump / | ssh hostB restore is more effective than: hostA# rsync -a / hostB:/ Or you''ve said «> by with rsync. I have found though that the time to > get rsync going efficiently doesn''t pay for a one» about setup time? rsync installation is very quick. It''s enough to simply install rsync package and then you can run it (it uses ssh as transport).> I have been playing around with the idea of using > something like ''revisor'' from Fedora to capture > the basic system settings and packages into a > kickstart install iso that you can use to install > a PV that''s identical to the source. Have it do > an RPM audit of all config files except a few > key ones like fstab, ifcfg etc and such and tar > those up and have it extracted in the %post > section of the kickstart... It''s an interesting > idea... HmmmReally interesting idea. Thank you for it. I''m looking for the way how I can automagically (without rsyncing, dumping and another big data transfers) create clone of a system from standard repositories. Your idea is to package configs delta between current system (that we want to clone) and fresh system installed from repo state. Cloned system configs - fresh system configs => delta.rpm And after installing delta.rpm into fresh system we will have system that will be equal to cloned. Correct?> > -Ross > > ______________________________________________________________________ > This e-mail, and any attachments thereto, is intended only for use by > the addressee(s) named herein and may contain legally privileged > and/or confidential information. If you are not the intended recipient > of this e-mail, you are hereby notified that any dissemination, > distribution or copying of this e-mail, and any attachments thereto, > is strictly prohibited. If you have received this e-mail in error, > please immediately notify the sender and permanently delete the > original and any copy or printout thereof. > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Apr 2, 2008 at 9:52 AM, Igor Chubin <igor@chub.in> wrote:> If I understand you right, > you say that > > > hostA# dump / | ssh hostB restore > > is more effective than: > > hostA# rsync -a / hostB:/i like to use rsync to replicate running servers. of course, for one-shot copy it''s no faster than other dump-transfer-restore schemas; but it''s quite easy to use to quickly converge almost to a ''snapshot'' capability: 1: do a full rsync, might take tooo long, lots of stuff wouldn''t be really consistent 2: repeat rsync, should be far faster, copying only the differences. 3: keep repeating until the whole copy is comfortably short. usually the third iteration is less than a couple minutes 4: quick: shut down services, one last rsync, start services. 5: done! -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-02 15:17 UTC
RE: [Xen-users] Convert CentOS system to Xen image?
Igor Chubin wrote:> ... > > > > > > For data partitions like /home you can do a dump, sftp, and restore. > > > > > > > > > > Also you can use rsync > > > > > (it should be installed on both hosts). > > > > > > > > rsync will indiscriminately copy-over files that it shouldn''t. > > > > > > What do you mean? > > > > Well rsync was really designed to replicate data from > > one system to another, but this isn''t technically > > replication here as not all configs will be the same. > > > > If it''s a data volume like /home, then you might get > > by with rsync. I have found though that the time to > > get rsync going efficiently doesn''t pay for a one > > time operation. If this is done over a secure > > reliable network and not the Internet, you could do > > a dump | ssh restore type deal, maybe add a gzip > > step in there to compress over the wire and it''s > > done. > > > If I understand you right, > you say that > > > hostA# dump / | ssh hostB restore > > is more effective than: > > hostA# rsync -a / hostB:/ > > Or you''ve said > < > > by with rsync. I have found though that the time to > > get rsync going efficiently doesn''t pay for a one > > > about setup time? > > rsync installation is very quick. > It''s enough to simply install rsync package > and then you can run it (it uses ssh as transport).I was unaware that you didn''t need to setup an rsync daemon on the other end and configure security. Then sure I guess rsync would be quicker, does it preserve special files, pipes, symlinks and sparse files properly?> > I have been playing around with the idea of using > > something like ''revisor'' from Fedora to capture > > the basic system settings and packages into a > > kickstart install iso that you can use to install > > a PV that''s identical to the source. Have it do > > an RPM audit of all config files except a few > > key ones like fstab, ifcfg etc and such and tar > > those up and have it extracted in the %post > > section of the kickstart... It''s an interesting > > idea... Hmmm > > Really interesting idea. Thank you for it. > > > I''m looking for the way how I can > automagically (without rsyncing, dumping and another big > data transfers) create clone of a system > from standard repositories. > > > Your idea is to package configs delta between > current system (that we want to clone) and fresh system > installed from repo state. > > > Cloned system configs - fresh system configs => delta.rpm > > > And after installing delta.rpm into fresh system > we will have system that will be equal to cloned. > > Correct?Well my idea for the configs was more rudimentary, but your idea of a delta RPM is perfect! What is the tool used for creating delta RPMs? All one would need is to create a list of configs that should never be packaged and create a delta RPM of all the others... Then once you have the delta RPM you add it to the list of RPMs included in the revisor spin and voila! Hmmm, I suppose when it comes to the actual data you could do a number of things like tar or cpio to a series of DVD images. Maybe some dvd authoring tool can help automate this process... You would need some interesting method to find all the data though as not all data is in easily identifiable locations like home. An example of this would be the samba tdb files like passdb.tdb and secrets.tdb, which are created after install and aren''t included in the catalog. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-02 15:18 UTC
RE: [Xen-users] Convert CentOS system to Xen image?
Javier Guerra wrote:> On Wed, Apr 2, 2008 at 9:52 AM, Igor Chubin <igor@chub.in> wrote: > > If I understand you right, > > you say that > > > > > > hostA# dump / | ssh hostB restore > > > > is more effective than: > > > > hostA# rsync -a / hostB:/ > > i like to use rsync to replicate running servers. of course, for > one-shot copy it''s no faster than other dump-transfer-restore schemas; > but it''s quite easy to use to quickly converge almost to a ''snapshot'' > capability: > > 1: do a full rsync, might take tooo long, lots of stuff wouldn''t be > really consistent > 2: repeat rsync, should be far faster, copying only the differences. > 3: keep repeating until the whole copy is comfortably short. usually > the third iteration is less than a couple minutes > 4: quick: shut down services, one last rsync, start services. > 5: done!Or, take a snapshot, mount it, then rsync off that. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
...> > Or you''ve said > > < > > > by with rsync. I have found though that the time to > > > get rsync going efficiently doesn''t pay for a one > > > > > about setup time? > > > > rsync installation is very quick. > > It''s enough to simply install rsync package > > and then you can run it (it uses ssh as transport). > > I was unaware that you didn''t need to setup an rsync > daemon on the other end and configure security.You need daemon in anonymous mode only. Except this mode, rsync uses transport (ssh by default and -e /some/path/to/program if specified).> > Then sure I guess rsync would be quicker, does it > preserve special files, pipes, symlinks and sparse > files properly?Yes. All of them (use -a key for that).> > > > I have been playing around with the idea of using > > > something like ''revisor'' from Fedora to capture > > > the basic system settings and packages into a > > > kickstart install iso that you can use to install > > > a PV that''s identical to the source. Have it do > > > an RPM audit of all config files except a few > > > key ones like fstab, ifcfg etc and such and tar > > > those up and have it extracted in the %post > > > section of the kickstart... It''s an interesting > > > idea... Hmmm > > > > Really interesting idea. Thank you for it. > > > > > > I''m looking for the way how I can > > automagically (without rsyncing, dumping and another big > > data transfers) create clone of a system > > from standard repositories. > > > > > > Your idea is to package configs delta between > > current system (that we want to clone) and fresh system > > installed from repo state. > > > > > > Cloned system configs - fresh system configs => delta.rpm > > > > > > And after installing delta.rpm into fresh system > > we will have system that will be equal to cloned. > > > > Correct? > > Well my idea for the configs was more rudimentary, but > your idea of a delta RPM is perfect! What is the tool > used for creating delta RPMs? All one would need is > to create a list of configs that should never be > packaged and create a delta RPM of all the others...I''m not rpm guru (I use debian), but I have just googled and found what we need (at least it''s very like to it). The tool name is deltarpm :) More info here [1]. [1] http://www-uxsup.csx.cam.ac.uk/pub/doc/suse/suse9.3/suselinux-adminguide_en/sec.rpm.html> > Then once you have the delta RPM you add it to the > list of RPMs included in the revisor spin and voila!Yes.> > Hmmm, I suppose when it comes to the actual data you could > do a number of things like tar or cpio to a series of > DVD images. Maybe some dvd authoring tool can help automate > this process... You would need some interesting method to > find all the data though as not all data is in easily > identifiable locations like home. An example of this > would be the samba tdb files like passdb.tdb and > secrets.tdb, which are created after install and aren''t > included in the catalog.The idea was about configs, not about data actually. Of course, if you want to migrate file server or DBMS system, rpm delta is not enough.> > -Ross > > ______________________________________________________________________ > This e-mail, and any attachments thereto, is intended only for use by > the addressee(s) named herein and may contain legally privileged > and/or confidential information. If you are not the intended recipient > of this e-mail, you are hereby notified that any dissemination, > distribution or copying of this e-mail, and any attachments thereto, > is strictly prohibited. If you have received this e-mail in error, > please immediately notify the sender and permanently delete the > original and any copy or printout thereof. >-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mi, Apr 02, 2008 at 11:18:42 -0400, Ross S. W. Walker wrote:> Javier Guerra wrote: > > On Wed, Apr 2, 2008 at 9:52 AM, Igor Chubin <igor@chub.in> wrote: > > > If I understand you right, > > > you say that > > > > > > > > > hostA# dump / | ssh hostB restore > > > > > > is more effective than: > > > > > > hostA# rsync -a / hostB:/ > > > > i like to use rsync to replicate running servers. of course, for > > one-shot copy it''s no faster than other dump-transfer-restore schemas; > > but it''s quite easy to use to quickly converge almost to a ''snapshot'' > > capability: > > > > 1: do a full rsync, might take tooo long, lots of stuff wouldn''t be > > really consistentTo solve the problem (if you use LVMs) you should make snapshots and than sync files from them.> > 2: repeat rsync, should be far faster, copying only the differences. > > 3: keep repeating until the whole copy is comfortably short. usually > > the third iteration is less than a couple minutes > > 4: quick: shut down services, one last rsync, start services. > > 5: done! > > Or, take a snapshot, mount it, then rsync off that.Don''t forget to make sync before snapshotting. It will work without syncing to but it''s better to use it to be sure that there no information cached by FS and not written to LVs. # sync; lvcreate -n snap -L2G /dev/VG/source> > -Ross > > ______________________________________________________________________ > This e-mail, and any attachments thereto, is intended only for use by > the addressee(s) named herein and may contain legally privileged > and/or confidential information. If you are not the intended recipient > of this e-mail, you are hereby notified that any dissemination, > distribution or copying of this e-mail, and any attachments thereto, > is strictly prohibited. If you have received this e-mail in error, > please immediately notify the sender and permanently delete the > original and any copy or printout thereof. > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Apr 2, 2008 at 10:18 AM, Ross S. W. Walker <rwalker@medallion.com> wrote:> > Javier Guerra wrote: > > i like to use rsync to replicate running servers. of course, for > > one-shot copy it''s no faster than other dump-transfer-restore schemas; > > but it''s quite easy to use to quickly converge almost to a ''snapshot'' > > capability: > > > > 1: do a full rsync, might take tooo long, lots of stuff wouldn''t be > > really consistent > > 2: repeat rsync, should be far faster, copying only the differences. > > 3: keep repeating until the whole copy is comfortably short. usually > > the third iteration is less than a couple minutes > > 4: quick: shut down services, one last rsync, start services. > > 5: done! > > Or, take a snapshot, mount it, then rsync off that.sure, much better... when the original server uses LVM _and_ has free space on the VG. otherwise (and quite often) a few rsync iterations save the day. -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-02 15:56 UTC
RE: [Xen-users] Convert CentOS system to Xen image?
Igor Chubin wrote:> ... > > > Or you''ve said > > > < > > > > by with rsync. I have found though that the time to > > > > get rsync going efficiently doesn''t pay for a one > > > > > > > about setup time? > > > > > > rsync installation is very quick. > > > It''s enough to simply install rsync package > > > and then you can run it (it uses ssh as transport). > > > > I was unaware that you didn''t need to setup an rsync > > daemon on the other end and configure security. > > > You need daemon in anonymous mode only. > Except this mode, rsync uses transport (ssh by default > and -e /some/path/to/program if specified). > > > > > > Then sure I guess rsync would be quicker, does it > > preserve special files, pipes, symlinks and sparse > > files properly? > > > Yes. > All of them (use -a key for that).Well then I guess rsync is probably the way to go then in this scenario.> > > > I have been playing around with the idea of using > > > > something like ''revisor'' from Fedora to capture > > > > the basic system settings and packages into a > > > > kickstart install iso that you can use to install > > > > a PV that''s identical to the source. Have it do > > > > an RPM audit of all config files except a few > > > > key ones like fstab, ifcfg etc and such and tar > > > > those up and have it extracted in the %post > > > > section of the kickstart... It''s an interesting > > > > idea... Hmmm > > > > > > Really interesting idea. Thank you for it. > > > > > > > > > I''m looking for the way how I can > > > automagically (without rsyncing, dumping and another big > > > data transfers) create clone of a system > > > from standard repositories. > > > > > > > > > Your idea is to package configs delta between > > > current system (that we want to clone) and fresh system > > > installed from repo state. > > > > > > > > > Cloned system configs - fresh system configs => delta.rpm > > > > > > > > > And after installing delta.rpm into fresh system > > > we will have system that will be equal to cloned. > > > > > > Correct? > > > > Well my idea for the configs was more rudimentary, but > > your idea of a delta RPM is perfect! What is the tool > > used for creating delta RPMs? All one would need is > > to create a list of configs that should never be > > packaged and create a delta RPM of all the others... > > I''m not rpm guru (I use debian), but I have just googled > and found what we need (at least it''s very like to it). > > > The tool name is deltarpm :) > > More info here [1]. > > > > [1] > http://www-uxsup.csx.cam.ac.uk/pub/doc/suse/suse9.3/suselinux- > adminguide_en/sec.rpm.htmlThanks, I''ll take a look at that. I don''t know if all distros support delta RPMs at this point though. :-( Since your a Debian person, is there any similar tool to do this on Debian?> > > > Then once you have the delta RPM you add it to the > > list of RPMs included in the revisor spin and voila! > > > Yes. > > > > > Hmmm, I suppose when it comes to the actual data you could > > do a number of things like tar or cpio to a series of > > DVD images. Maybe some dvd authoring tool can help automate > > this process... You would need some interesting method to > > find all the data though as not all data is in easily > > identifiable locations like home. An example of this > > would be the samba tdb files like passdb.tdb and > > secrets.tdb, which are created after install and aren''t > > included in the catalog. > > > > The idea was about configs, not about data actually.True, but some data, like the samba dbs I mentioned would be essential in preserving the machine''s network identity during the conversion.> Of course, if you want to migrate file server or DBMS system, > rpm delta is not enough.No, your right earlier that the actual data migration is too sensitive to handle here, but we would need to identify what "extra" configurations should also be bundled in (ie samba), this can probably be determined by what packages are installed, or handled en masse. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> You have copied just one partition, > instead of the whole disk. > > To copy the whole disk, > you should use: > > # cat /dev/ida/c0d0 | nc -l -p 3000 > > But this command will copy all of the disk (and if it is big, > it is not good idea; also you need enough freespace on the target > system). > > More flexible way is the way mentioned by Ross: > to use LVM on the target system > and to copy not the raw device, but files, which is situated > on the device.I do have enough space to do the whole disk, I just don''t have free space to create an LV. I did it again using /dev/ida/c0d0. Now when I try to bring up in Xen I get No kernel was found. I also downloaded the DVD for the same version of CentOS. So I thought maybe I would try booting off that and see if I can fix it. I figured if the iso was mounted as a CDROM first that it would boot, but I still get No kernel was found. I''ll try creating a new VM using the DVD, and try to rsync everything, similar to what Ross was saying. The good thing is that I can try lots of things, as long as I don''t have to take the other server offline. I appreciate everyone''s help! James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mi, Apr 02, 2008 at 12:40:00 -0400, James Pifer wrote:> > You have copied just one partition, > > instead of the whole disk. > > > > To copy the whole disk, > > you should use: > > > > # cat /dev/ida/c0d0 | nc -l -p 3000 > > > > But this command will copy all of the disk (and if it is big, > > it is not good idea; also you need enough freespace on the target > > system). > > > > More flexible way is the way mentioned by Ross: > > to use LVM on the target system > > and to copy not the raw device, but files, which is situated > > on the device. > > I do have enough space to do the whole disk, I just don''t have free > space to create an LV. I did it again using /dev/ida/c0d0. Now when I > try to bring up in Xen I get No kernel was found.Great! Now you should edit kernel command line and specify new root fs path. What bootloader to you use? Presuming you use GRUB: 1. press e in the GRUB bootprompt 2. Choose kernel line 3. Press e again 4. Change root=/dev/ida/c0d0p1 arg to root=/dev/hda1 5. add parameter init=/bin/sh 6. press b to boot 7. when you will get shell prompt do mount -t proc proc /proc mount -o rw,remount / mount -a vi /etc/fstab and here change /dev/ida/c0d0pXXXX to /dev/hdaXXXX also you can use sed instead of vi: sed -i s@/dev/ida/c0d0p@/dev/hda@ /etc/fstab 8. umount -a 9. continue booting process exec /sbin/init> > I also downloaded the DVD for the same version of CentOS. So I thought > maybe I would try booting off that and see if I can fix it. I figured if > the iso was mounted as a CDROM first that it would boot, but I still get > No kernel was found.I think that when you fix boot loader config and /etc/fstab you will boot successfully. So you are close to the victory. You even not obliged to use live CD or installation CD to do this. All can be done be bootloader.> > I''ll try creating a new VM using the DVD, and try to rsync everything, > similar to what Ross was saying.> > The good thing is that I can try lots of things, as long as I don''t have > to take the other server offline. > > I appreciate everyone''s help! > > James >-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Great! > > Now > you should edit kernel command line > and specify new root fs path. > > What bootloader to you use? > > Presuming you use GRUB: > > > 1. press e in the GRUB bootprompt > 2. Choose kernel line > 3. Press e again > 4. Change root=/dev/ida/c0d0p1 arg to root=/dev/hda1 > 5. add parameter init=/bin/sh > 6. press b to boot > 7. when you will get shell prompt do > mount -t proc proc /proc > mount -o rw,remount / > mount -a > vi /etc/fstab > > and here change /dev/ida/c0d0pXXXX to /dev/hdaXXXX > > also you can use sed instead of vi: > > sed -i s@/dev/ida/c0d0p@/dev/hda@ /etc/fstab > > 8. umount -a > 9. continue booting process > exec /sbin/init >Problem is I don''t even get to grub. After I create the new machine in xen, select the image file for the hard disk, set the other settings, it gives me a popup that no kernels can be found. Did I miss some steps? Thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mi, Apr 02, 2008 at 01:35:14 -0400, James Pifer wrote:> > Great! > > > > Now > > you should edit kernel command line > > and specify new root fs path. > > > > What bootloader to you use? > > > > Presuming you use GRUB: > > > > > > 1. press e in the GRUB bootprompt > > 2. Choose kernel line > > 3. Press e again > > 4. Change root=/dev/ida/c0d0p1 arg to root=/dev/hda1 > > 5. add parameter init=/bin/sh > > 6. press b to boot > > 7. when you will get shell prompt do > > mount -t proc proc /proc > > mount -o rw,remount / > > mount -a > > vi /etc/fstab > > > > and here change /dev/ida/c0d0pXXXX to /dev/hdaXXXX > > > > also you can use sed instead of vi: > > > > sed -i s@/dev/ida/c0d0p@/dev/hda@ /etc/fstab > > > > 8. umount -a > > 9. continue booting process > > exec /sbin/init > > > > Problem is I don''t even get to grub. After I create the new machine in > xen, select the image file for the hard disk, set the other settings, it > gives me a popup that no kernels can be found. Did I miss some steps?Please, show the config file of the domain.> > Thanks, > James >-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Please, show the config file of the domain. > >As I said, I''m new to xen. I''ve been calling it a guest OS, which from what I''ve read is not really correct. My apologies.... Anyway, I''m trying to create the domain for the "captured" centos.img using the Virtual Machine Manager/Create Virtual Machine. When I click the last "OK" is when I get the error. So it never creates a config file for the domain. Should I create the domain a different way (don''t know another way!) or manually create the config file based on another domain that is already working? under /etc/xen/vm I only see my other domain in there, not the new one I''m trying to create. Thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, 2008-04-02 at 14:27 -0400, James Pifer wrote:> Anyway, I''m trying to create the domain for the "captured" centos.img > using the Virtual Machine Manager/Create Virtual Machine. When I click > the last "OK" is when I get the error. So it never creates a config file > for the domain.When you got this error, don''t press "OK". Go to your /etc/xen directory, look for one new file (ls -ltr /etc/xen) and show us. -- Tiago Cruz http://everlinux.com Linux User #282636 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, 2008-04-02 at 15:33 -0300, Tiago Cruz wrote:> On Wed, 2008-04-02 at 14:27 -0400, James Pifer wrote: > > Anyway, I''m trying to create the domain for the "captured" centos.img > > using the Virtual Machine Manager/Create Virtual Machine. When I click > > the last "OK" is when I get the error. So it never creates a config file > > for the domain. > > When you got this error, don''t press "OK". Go to your /etc/xen > directory, look for one new file (ls -ltr /etc/xen) and show us. >Nothing new in /etc/xen or /etc/xen/vm. I did not press ok on the error, it''s still on the screen. It doesn''t create the config file. Screenshot of error here: http://www.obrien-pifer.com/screenshot.jpg James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, 2008-04-02 at 14:59 -0400, James Pifer wrote:> Screenshot of error here: > http://www.obrien-pifer.com/screenshot.jpgMaybe I can be wrong, but if you would like to virtualize one Red Hat v4, you don''t can use "Paravirtualization". You must to use "Full-Virtualization". If you guest OS (domU) was one RHEL5, you will can use "ParaVirt" -- Tiago Cruz http://everlinux.com Linux User #282636 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-02 19:19 UTC
RE: [Xen-users] Convert CentOS system to Xen image?
Tiago Cruz wrote:> On Wed, 2008-04-02 at 14:59 -0400, James Pifer wrote: > > > Screenshot of error here: > > http://www.obrien-pifer.com/screenshot.jpg > > Maybe I can be wrong, but if you would like to virtualize one Red Hat > v4, you don''t can use "Paravirtualization". You must to use > "Full-Virtualization". > > If you guest OS (domU) was one RHEL5, you will can use "ParaVirt"RHEL/CentOS 4.6+ has support for xen PV kernels -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, 2008-04-02 at 16:09 -0300, Tiago Cruz wrote:> On Wed, 2008-04-02 at 14:59 -0400, James Pifer wrote: > > > Screenshot of error here: > > http://www.obrien-pifer.com/screenshot.jpg > > Maybe I can be wrong, but if you would like to virtualize one Red Hat > v4, you don''t can use "Paravirtualization". You must to use > "Full-Virtualization". > > If you guest OS (domU) was one RHEL5, you will can use "ParaVirt" >Okay, tried again with "Full-Virtualization". Now it tries to boot but gives an error about missing OS. :-( At this point I was just trying to make it work on principal and futrue reference. Maybe I''ll just do as Ross suggested and build a new domain and bring the configs over. This has probably been covered a million times, but... what is the preferred method, "Paravirtualization" or "Full-Virtualization"? I''m guessing Full-Virtualization because it''s using VT enabled in the processor. Thanks to all. James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
James, On Wed, 2008-04-02 at 15:36 -0400, James Pifer wrote:> This has probably been covered a million times, but... what is the > preferred method, "Paravirtualization" or "Full-Virtualization"? I''m > guessing Full-Virtualization because it''s using VT enabled in the > processor.Para-virt it''s faster ("Lightweight method of virtualizing machines", following the help of virt-manager) but only works with one modified version of kernel. Full-virt it''s slower, but works with no kernel modification (ex: older linux versions, windows and others). -- Tiago Cruz http://everlinux.com Linux User #282636 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-02 20:01 UTC
RE: [Xen-users] Convert CentOS system to Xen image?
James Pifer wrote:> On Wed, 2008-04-02 at 16:09 -0300, Tiago Cruz wrote: > > On Wed, 2008-04-02 at 14:59 -0400, James Pifer wrote: > > > > > Screenshot of error here: > > > http://www.obrien-pifer.com/screenshot.jpg > > > > Maybe I can be wrong, but if you would like to virtualize one Red Hat > > v4, you don''t can use "Paravirtualization". You must to use > > "Full-Virtualization". > > > > If you guest OS (domU) was one RHEL5, you will can use "ParaVirt" > > > > Okay, tried again with "Full-Virtualization". Now it tries to boot but > gives an error about missing OS. :-( At this point I was just trying to > make it work on principal and futrue reference. Maybe I''ll just do as > Ross suggested and build a new domain and bring the configs over.Well, your almost there, but you need to boot up an OS recovery iso in the HVM and reinstall grub as the primary disk will now be ''hda'' instead of whatever the other server''s was, probably ''sda'', or ''md0'' if it had software raid. Once you have it running install the xen PV kernel, use disklabels for non-LVM volumes in your fstab and grub and then shut it down and convert the config to PVM. Boot with ''xm create -c <config'' so you see the grub menu and select the xen kernel. Once you have the PVM running, set it''s kernel as the default in grub.> This has probably been covered a million times, but... what is the > preferred method, "Paravirtualization" or "Full-Virtualization"? I''m > guessing Full-Virtualization because it''s using VT enabled in the > processor.The preferred method is whether you need PV performance. For Linux based domains I highly recommend PV as you''ll get enhanced CPU performance and 1Gbe networking instead of 100Mbe networking. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Well, your almost there, but you need to boot up an OS recovery iso > in the HVM and reinstall grub as the primary disk will now be ''hda'' > instead of whatever the other server''s was, probably ''sda'', or > ''md0'' if it had software raid. > > Once you have it running install the xen PV kernel, use disklabels > for non-LVM volumes in your fstab and grub and then shut it down > and convert the config to PVM. Boot with ''xm create -c <config'' > so you see the grub menu and select the xen kernel. Once you > have the PVM running, set it''s kernel as the default in grub.I tried to do that. Since it''s full virt does an actual CD need to be inserted in the box? I tried adding a virtual CDROM using the ISO, but it will not boot off of it. On the screen I have ata0 master is the qemu hard disk. ata0 slave is Unknown device. I installed a xen PV kernel on the live server before grabbing it. thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-02 20:57 UTC
RE: [Xen-users] Convert CentOS system to Xen image?
James Pifer wrote:> > > Well, your almost there, but you need to boot up an OS recovery iso > > in the HVM and reinstall grub as the primary disk will now be ''hda'' > > instead of whatever the other server''s was, probably ''sda'', or > > ''md0'' if it had software raid. > > > > Once you have it running install the xen PV kernel, use disklabels > > for non-LVM volumes in your fstab and grub and then shut it down > > and convert the config to PVM. Boot with ''xm create -c <config'' > > so you see the grub menu and select the xen kernel. Once you > > have the PVM running, set it''s kernel as the default in grub. > > I tried to do that. Since it''s full virt does an actual CD need to be > inserted in the box? I tried adding a virtual CDROM using the ISO, but > it will not boot off of it.Best thing to do is write up a command-line config for your little domain. Try this to get started (put your specifics where needed): kernel = "/usr/lib/xen/boot/hvmloader" builder=''hvm'' memory = 512 name = "MyDomain" guest_os_type = ''linux'' vcpus=1 vif = [ ''type=ioemu, bridge=xenbr0'' ] disk = [ ''phy:/dev/vg0/lv3,hda,w'', ''file:/tmp/rescue.iso,hdc,r'' ] boot="dcna" vnc=1 vncconsole=1 vncpasswd='''' serial=''pty'' This should boot into d=cdrom first, then c=hard disk second, followed by n=network (PXE) third, followed by a=floppy last.> On the screen I have > ata0 master is the qemu hard disk. > ata0 slave is Unknown device.Not sure which screen you are talking about here, still using virt-manager? Drop it and start writing config files. The options are documented in the examples in /etc/xen directory.> I installed a xen PV kernel on the live server before grabbing it.Good fore thought, that''ll save a step later. -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I''m coming in late to the "party" and haven''t gone through the entire thread. Couple things I did notice so I''m going to base my answers on the following assumptions: 1. You''re attempting full virtualization. 2. Your guest domain configuration file is in Python format located in /etc/xen. If the above two are correct: 1. Open up the Python config file for your CentOS domain. 2. Locate the line starting with "disk =" 3. Within the last double-quote, but before closing bracket, put in the following immediately after the last double-quote: , "file:/directory/with/cdrom_dvd_image.iso,hdc:cdrom,r" So it should look similar to this: disk = [ "file:/var/lib/xen/images/centos.img,hda,w", "file:/directory/with/cdrom_dvd_image.iso,hdc:cdrom,r" ] 4. While still the Python domain Xen configuration file, find the line which starts with "boot =". It''s probably set to boot = "c". 5. Change the boot sequence to boot = "dc" or "boot = "d". 6. Once you''re done with the CD/DVD, you can revert it back. Good luck! James Pifer wrote: I tried to do that. Since it''s full virt does an actual CD need to be inserted in the box? I tried adding a virtual CDROM using the ISO, but it will not boot off of it. On the screen I have ata0 master is the qemu hard disk. ata0 slave is Unknown device. I installed a xen PV kernel on the live server before grabbing it. thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users -- Daniel Kao Übermind, Inc. dkao@ubermind.com Seattle, WA, U.S.A. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Not sure which screen you are talking about here, still using > virt-manager? Drop it and start writing config files. > > The options are documented in the examples in /etc/xen directory.Trying this. Should I still use virt-manager for starting and stopping them? If so, how do I get it to re-read the new config file? If not, how do you start them without virt-manager? Thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ross S. W. Walker
2008-Apr-02 22:09 UTC
Re: [Xen-users] Convert CentOS system to Xen image?
You will start it from the command line with ''xm create <config file>''. Oh and I made a mistake in my example config earlier, where it specified the iso for the cdrom it should be ''file:/path_to_iso,hdc:cdrom,r'', I left out the :cdrom for the device type. -Ross ----- Original Message ----- From: James Pifer <jep@obrien-pifer.com> To: Ross S. W. Walker Cc: Xen List <xen-users@lists.xensource.com> Sent: Wed Apr 02 18:02:20 2008 Subject: RE: [Xen-users] Convert CentOS system to Xen image?> Not sure which screen you are talking about here, still using > virt-manager? Drop it and start writing config files. > > The options are documented in the examples in /etc/xen directory.Trying this. Should I still use virt-manager for starting and stopping them? If so, how do I get it to re-read the new config file? If not, how do you start them without virt-manager? Thanks, James ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mi, Apr 02, 2008 at 02:59:11 -0400, James Pifer wrote:> On Wed, 2008-04-02 at 15:33 -0300, Tiago Cruz wrote: > > On Wed, 2008-04-02 at 14:27 -0400, James Pifer wrote: > > > Anyway, I''m trying to create the domain for the "captured" centos.img > > > using the Virtual Machine Manager/Create Virtual Machine. When I click > > > the last "OK" is when I get the error. So it never creates a config file > > > for the domain. > > > > When you got this error, don''t press "OK". Go to your /etc/xen > > directory, look for one new file (ls -ltr /etc/xen) and show us. > > > > Nothing new in /etc/xen or /etc/xen/vm. I did not press ok on the error, > it''s still on the screen. It doesn''t create the config file. > > Screenshot of error here: > http://www.obrien-pifer.com/screenshot.jpgHello James, I''m sorry for delay, I was away from the network. Let us check image you have grabbed. Is it ok or no. Question #1. If you have qemu installed, just try to run qemu -hda centos.img and say (or better show) what do you see. Question #2. (if QEMU is not installed and you can''t install it) What does the command chow? # file centos.img Question #3. # lsmod | grep -q ^loop || modprobe loop # losetup /dev/loop1 centos.img (if /dev/loop1 is busy, try /dev/loop2, /dev/loop3 and so on you can get know what loop devices are busy with the command losetup -a if device is not listed, it is not busy and you can use it) # fdisk -l /dev/loop1 And show what you have got.> > James > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> I''m sorry for delay, I was away from the network. >NP. Beggers can''t be choosers. :-)> > > Let us check image you have grabbed. > Is it ok or no. > > > Question #1. > > If you have qemu installed, > just try to run > > qemu -hda centos.imgNot installed.> > and say (or better show) > what do you see. > > > Question #2. > > (if QEMU is not installed and you can''t install it) > > What does the command chow? > > # file centos.img >This looks good I think. # file centos.img centos.img: x86 boot sector, Microsoft Windows XP mbr,Serial 0xb5058> > Question #3. > > > # lsmod | grep -q ^loop || modprobe loop > # losetup /dev/loop1 centos.img > (if /dev/loop1 is busy, try /dev/loop2, /dev/loop3 and so on > you can get know what loop devices are busy with the command > losetup -a > if device is not listed, it is not busy and you can use it) > > # fdisk -l /dev/loop1 > > And show what you have got.This can''t be good..... # lsmod | grep -q ^loop || modprobe lo # losetup /dev/loop1 centos.img # fdisk -l /dev/loop1 Disk /dev/loop1: 3845 MB, 3845230592 bytes 255 heads, 63 sectors/track, 467 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/loop1 doesn''t contain a valid partition table Thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
...> > This looks good I think. > > # file centos.img > centos.img: x86 boot sector, Microsoft Windows XP mbr,Serial 0xb5058Can you run file -s /dev/ida/c0d0 on the host where from you have copied the image?> > > > > > Question #3. > > > > > > # lsmod | grep -q ^loop || modprobe loop > > # losetup /dev/loop1 centos.img > > (if /dev/loop1 is busy, try /dev/loop2, /dev/loop3 and so on > > you can get know what loop devices are busy with the command > > losetup -a > > if device is not listed, it is not busy and you can use it) > > > > # fdisk -l /dev/loop1 > > > > And show what you have got. > > This can''t be good..... > > # lsmod | grep -q ^loop || modprobe lo > # losetup /dev/loop1 centos.img > # fdisk -l /dev/loop1 > > Disk /dev/loop1: 3845 MB, 3845230592 bytes > 255 heads, 63 sectors/track, 467 cylinders > Units = cylinders of 16065 * 512 = 8225280 bytes > > Disk /dev/loop1 doesn''t contain a valid partition tableWhat shows fdisk -l /dev/ida/c0d0 on the source host? Size=4G <- is it ok? You have said that your HDD is 8GB size> > Thanks, > James > >-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Can you run > > file -s /dev/ida/c0d0 > > on the host where from > you have copied the image? ># file -s /dev/ida/c0d0 /dev/ida/c0d0: x86 boot sector> Size=4G <- is it ok? > You have said that your HDD is 8GB sizeNo, actually the used space is a little over 8GB. The LV is about 18GB. James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mi, Apr 02, 2008 at 09:19:53 -0400, James Pifer wrote:> > Can you run > > > > file -s /dev/ida/c0d0 > > > > on the host where from > > you have copied the image? > > > > # file -s /dev/ida/c0d0 > /dev/ida/c0d0: x86 boot sector > > > > Size=4G <- is it ok? > > You have said that your HDD is 8GB size > > > No, actually the used space is a little over 8GB. The LV is about 18GB.fdisk output shat you have showed before says, that your image is about 4G. It means that you haven''t copied entire disk. When you do raw data copying (using cat or dd), result file will have size of the source disk (18G in your case, or even more if your disk has greater size; and 18G is LV, but not the disk, size). So, it''s better, may be, to do not raw copying in your case, but files copying. If you have LVM installed on target system, you may create new LV, format it and mount. E.g.: lvcreate -L 8G -n centos /dev/VG mkfs.ext3 /dev/VG/centos mount /dev/VG/centos /mnt/ If you have not, than you regular files: dd if=/dev/zero of=centos-new.img count=$[8*1024*1024] bs=1k mkfs.ext3 centos-new.img # (press y here) mount -o loop centos-new.img /mnt/ After that you may start to copy files: target# rsync -a --exclude=/sys --exclude=/proc --exclude=/dev source:/ /mnt/ When copying will be finished: target# mkdir -p /mnt/{sys,proc,dev} target# cp -a /lib/modules/VERSION_OF_THE_PV_KERNEL_HERE /mnt/lib/ target# cat <<EOF > /mnt/etc/fstab proc /proc proc defaults 0 0 /dev/hda1 / ext3 defaults 0 0 EOF After that umount /mnt And create config file for new domain. This is a PV domain, not an HVM! So you need new config file.> > James > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hello guys, Just my 2 cents: On Thu, 2008-04-03 at 11:30 +0300, Igor Chubin wrote:> So, it''s better, may be, to do not raw copying in your case, > but files copying.James, I''ve had did a lot of migrations using one machine real into one virtual (also called "p2v") "at hot" -- without shutdown the machine. If you can turn off the physical machine, please, considere to use one tool to automatize your migration, like this one: http://et.redhat.com/~rjones/virt-p2v/ Whatever, I know this ways to do this work "by hand": 1-) Cloning the device using dd+nc 2-) Coping all "/" using rsync For this second way, I recommend this read: http://wiki.xensource.com/xenwiki/XenManualPtoVProcess And I can say one example of "rsync" with a lot of parameters: rsync -vaH --numeric-ids --stats --progress --exclude "/mnt/*" \ --exclude "/proc/*" --exclude "/sys/*" --exclude "/tmp/*" \ --exclude "/var/tmp/*" --exclude "/var/run/*.pid" \ --exclude "/var/run/dbus/system_bus_socket"\ rsync://192.168.1.123/p2v/ /mnt/vmname/ http://wiki.xen-br.org/index.php?title=P2v-howto But, in both wais, you can have boot problems with LiLo/Grub, and with different devices (ex: /dev/ida/c0d0p1 -> /dev/hda1). So, i think that the easier way to do this, its the follow: - Install one new CentOS inside Xen, using Virt-Manager with sufficient space to do the migration; - Boot this one, test, and lean how to start and stop this virtual machine; - Backup this machine; - Just "rsync" all "/" from the physical one for inside of "/" of virtual one; - Restore your backup from /etc/hosts, /etc/fstab, /etc/mtab/ ifcfg-eth-x, lilo.conf, menu.lst and be happy :-) May the Force be with you! -- Tiago Cruz http://everlinux.com Linux User #282636 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> So, i think that the easier way to do this, its the follow: > > - Install one new CentOS inside Xen, using Virt-Manager with sufficient > space to do the migration; > - Boot this one, test, and lean how to start and stop this virtual > machine; > - Backup this machine; > - Just "rsync" all "/" from the physical one for inside of "/" of > virtual one; > - Restore your backup from /etc/hosts, /etc/fstab, /etc/mtab/ > ifcfg-eth-x, lilo.conf, menu.lst and be happy :-) > > May the Force be with you! >Igor, I followed your last suggestion and now I''m back to "A valid boot sector was not found. The installation may have failed." No config file has been written yet either. (yes, using virt-manager) All the steps you wrote went without a hitch and I verified fstab was updated correctly. Tiago, I''ve tried installing CentOS 4.5, 4.6, and 5.1 using virt-manager, but none of them see a disk to install to once the CentOS install process starts. Maybe there''s a special way to run these installs. I''ll have to google for that. SLES10.1 installs without doing anything special. Thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Do, Apr 03, 2008 at 10:11:04 -0400, James Pifer wrote:> > So, i think that the easier way to do this, its the follow: > > > > - Install one new CentOS inside Xen, using Virt-Manager with sufficient > > space to do the migration; > > - Boot this one, test, and lean how to start and stop this virtual > > machine; > > - Backup this machine; > > - Just "rsync" all "/" from the physical one for inside of "/" of > > virtual one; > > - Restore your backup from /etc/hosts, /etc/fstab, /etc/mtab/ > > ifcfg-eth-x, lilo.conf, menu.lst and be happy :-) > > > > May the Force be with you! > > > > Igor, I followed your last suggestion and now I''m back to "A valid boot > sector was not found. The installation may have failed." No config file > has been written yet either. (yes, using virt-manager) > > All the steps you wrote went without a hitch and I verified fstab was > updated correctly.Please, show the config file you use to start the virtual machine. It should be situated in the /etc/xen/ directory. Also, try to use command lines tools like xm and after success with them you may switch to virt-manager> > Tiago, I''ve tried installing CentOS 4.5, 4.6, and 5.1 using > virt-manager, but none of them see a disk to install to once the CentOS > install process starts. Maybe there''s a special way to run these > installs. I''ll have to google for that. SLES10.1 installs without doing > anything special. > > Thanks, > James >-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, 2008-04-03 at 10:11 -0400, James Pifer wrote:> Tiago, I''ve tried installing CentOS 4.5, 4.6, and 5.1 using > virt-manager, but none of them see a disk to install to once the CentOS > install process starts. Maybe there''s a special way to run these > installs.I''m just installing new RHEL5 machines doing this. Takes ~4 minutes. # virt-install \ --name=myvm \ --ram=1000 \ --file=/dev/Vol_LVM/vm05 \ --network=bridge:virbr0 \ --vnc \ --paravirt \ --location=http://server.com/redhat5as_install/ \ -x ks=http://server.com/redhat5as_install/ks.cfg Where: - /dev/Vol_LVM/vm05 its one LVM device with 20 GB - ks.cfg: install url --url http://server.com/redhat5as_install/ lang en_US.UTF-8 keyboard br-abnt2 network --device eth0 --bootproto dhcp --hostname xen.com.br rootpw --iscrypted (#hash of password#) firewall --disable authconfig --enableshadow --enablemd5 selinux --disable timezone --utc America/Sao_Paulo bootloader --location=mbr --driveorder=xvda clearpart --linux part / --fstype ext3 --size=100 --grow part swap --size=3000 --asprimary %packages %packages @admin-tools @base @core @development-libs @development-tools @dialup @editors @printing @system-tools @text-internet>-- Tiago Cruz http://everlinux.com Linux User #282636 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Please, show the config file you use > to start the virtual machine. > > It should be situated in the /etc/xen/ directory. > > Also, try to use command lines tools like xm > and after success with them you may switch > to virt-manager > >I looked back through this thread and don''t see anywhere that I''ve said what dom0 is running. It''s running on 64 bit SLES 10.1. I don''t understand what to specify on the kernel line. Right now I have this: kernel = "/usr/lib/xen/boot/hvmloader" builder=''linux'' name = "pcalakwww01" memory = "1024" disk = [ ''file:/etc/xen/images/pcalakwww01/centos.img,xvda,w'' ] vif = [ ''bridge=xenbr1'', ] vcpus=1 on_reboot = ''restart'' on_crash = ''destroy'' vfb=["type=vnc,vncunused=1"] When I try to run xm create pcalakwww01 I get: Using config file "./pcalakwww01". Error: (2, ''Invalid kernel'', "elf_xen_note_check: ERROR: Not a Xen-ELF image: No ELF notes or ''__xen_guest'' section found.\n") Also, once I run this, how do you convert it or get it into virt-manager? I see it in there, but if I do shutdown it goes away. Thanks, James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hello again guys, This thread was very interesting for me, so, I''ve decided do some tests, and I would like to share with the list (and hope to kill some doubts...) So, I have running on my desktop (Dell Optiplex 745) one Ubuntu Hardy, on my sda2, so: - dd+netcat to copy my device into my XenServer running RHEL5; - create one new LVM file, and particione it (/ and swap); - mount the image and copy the files to LVM device; - adjust files like fstab and mtab (/ its now sda1, not more sda2) and after, I''ve used the Igor''s idea: On Thu, 2008-04-03 at 02:00 +0300, Igor Chubin wrote:> just try to run > > qemu -hda centos.img > > and say (or better show)I never was think on this before, great idea! Before kill myself using Xen, I''ve used the old and good qemu to fix my image (reinstall grub and etc) :-D After this, I''ve just put my working qemu''s image inside Xen, like this: name = "teste" uuid = "da7371c1deaf8280213a0534b43da4ca" maxmem = 500 memory = 300 vcpus = 1 builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "c" pae = 1 acpi = 1 apic = 1 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" device_model = "/usr/lib64/xen/bin/qemu-dm" sdl = 0 vnc = 1 vncunused = 1 keymap = "en-us" disk = [ "phy:/dev/Vol_LVM/teste,hda,w", "file:/iso/ubuntu-7.10-desktop-i386.iso,hdc:cdrom,r" ] vif = [ "mac=00:16:3e:1f:86:70,bridge=virbr0,type=ioemu" ] serial = "pty" And it''s working like a charm, but: 1-) Should I use hda or sda on xen config file? And on domU (grub, fstab)... must be hda or sda? 2-) I''m getting a lot of errors like this on my dmesg/messages... what can I do to fix this? Apr 11 17:04:46 tuxkiller kernel: [ 6847.639957] ata2: DRQ=1 with device error, dev_stat 0x49 Apr 11 17:04:46 tuxkiller kernel: [ 6847.640405] res 41/50:03:00:00:20/00:00:00:00:00/a0 Emask 0x3 (HSM violation) Apr 11 17:04:46 tuxkiller kernel: [ 6847.641026] ata2: soft resetting port Apr 11 17:04:46 tuxkiller kernel: [ 6848.106528] ata2.00: configured for MWDMA2 Apr 11 17:04:46 tuxkiller kernel: [ 6848.106540] ata2: EH complete My boot dmesg show me this: [ 9.399068] eth0: RealTek RTL8139 at 0xd380e000, 00:16:3e:1f:86:70, IRQ 16 [ 9.399542] eth0: Identified 8139 chip type ''RTL-8139'' [ 9.403628] 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004) [ 9.427008] sd 0:0:0:0: [sda] 229015552 512-byte hardware sectors (117256 MB) [ 9.427604] sd 0:0:0:0: [sda] Write Protect is off [ 9.428137] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 9.428159] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn''t support DPO or FUA [ 9.430447] sd 0:0:0:0: [sda] 229015552 512-byte hardware sectors (117256 MB) [ 9.431032] sd 0:0:0:0: [sda] Write Protect is off [ 9.431445] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 9.431457] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn''t support DPO or FUA [ 9.434390] sda: sda1 [ 9.436832] sd 0:0:0:0: [sda] Attached SCSI disk [ 9.439554] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen [ 9.440016] ata2.00: (BMDMA stat 0x5) [ 9.440392] ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x5a data 128 in [ 9.440394] res 48/00:02:00:00:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation) [ 9.442395] ata2: soft resetting port [ 9.448559] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 9.449085] sr 1:0:0:0: Attached scsi generic sg1 type 5 [ 9.913637] ata2.00: configured for MWDMA2 [ 9.914076] ata2: EH complete [ 9.914748] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen [ 9.917331] ata2.00: (BMDMA stat 0x5) [ 9.917777] ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x5a data 128 in [ 9.917778] res 48/01:02:00:00:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation) [ 9.919393] ata2: soft resetting port [ 10.388618] ata2.00: configured for MWDMA2 [ 10.389032] ata2: EH complete [ 10.389605] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen [ 10.390070] ata2.00: (BMDMA stat 0x5) [ 10.392294] ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x5a data 128 in [ 10.392296] res 48/01:02:00:00:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation) [ 10.393724] ata2: soft resetting port [ 10.859690] ata2.00: configured for MWDMA2 [ 10.860317] ata2: EH complete [ 10.861011] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen [ 10.863270] ata2.00: (BMDMA stat 0x5) [ 10.863658] ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x5a data 128 in [ 10.863660] res 48/01:02:00:00:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation) [ 10.866820] ata2: soft resetting port [ 11.334555] ata2.00: configured for MWDMA2 [ 11.335059] ata2: EH complete [ 11.335515] sr0: scsi-1 drive [ 11.335969] Uniform CD-ROM driver Revision: 3.20 [ 11.338453] sr 1:0:0:0: Attached scsi CD-ROM sr0 [ 14.786436] kjournald starting. Commit interval 5 seconds [ 14.787029] EXT3-fs: mounted filesystem with ordered data mode. [ 19.115422] udev: renamed network interface eth0 to eth1 [ 21.326355] input: PC Speaker as /class/input/input2 [ 21.420419] input: ImExPS/2 Generic Explorer Mouse as /class/input/input3 [ 21.829974] lp: driver loaded but no devices found [ 22.256104] EXT3 FS on sda1, internal journal [ 23.581239] Adding 1023992k swap on /swap. Priority:-1 extents:259 across:1053904k [ 23.754162] AppArmor: Unable to register AppArmor [ 25.654011] No dock devices found. [ 27.890021] ata2: DRQ=1 with device error, dev_stat 0x49 [ 27.891842] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen [ 27.892709] ata2.00: (BMDMA stat 0x5) [ 27.893998] ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x46 data 32 in [ 27.894000] res 41/50:03:00:00:00/00:00:00:00:00/a0 Emask 0x3 (HSM violation) [ 27.894906] ata2: soft resetting port [ 28.361448] ata2.00: configured for MWDMA2 [ 28.361471] ata2: EH complete # lspci 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02) 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] 00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] 00:01.2 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01) 00:02.0 VGA compatible controller: Cirrus Logic GD 5446 00:03.0 Class ff80: XenSource, Inc. Xen Platform Device (rev 01) 00:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 20) Many thanks! -- Tiago Cruz http://everlinux.com Linux User #282636 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, 2008-04-11 at 14:09 -0300, Tiago Cruz wrote: I''ve removed the "cdrom" device> disk = [ "phy:/dev/Vol_LVM/teste,hda,w", "file:/iso/ubuntu-7.10-desktop-i386.iso,hdc:cdrom,r" ]And this erros stopped :-)> [ 27.893998] ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x46 data 32 in > [ 27.894000] res 41/50:03:00:00:00/00:00:00:00:00/a0 Emask 0x3 (HSM violation) > [ 27.894906] ata2: soft resetting port > [ 28.361448] ata2.00: configured for MWDMA2 > [ 28.361471] ata2: EH complete_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users