Hi, I have an old server, running Debian Sarge. I''m getting ready to migrate to a new machine - more horsepower, newer version of Debian, etc. As an interim step to migrating all of my production stuff, it sure would be nice to generate a snapshot of the current system, turn it into an image file, and get it running on the new box, as a VM. Any suggestions as to procedures and tools for imaging an existing system? Thanks much, Miles Fidelman -- In theory, there is no difference between theory and practice. In practice, there is. .... Yogi Berra _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Miles, Am Montag, den 16.02.2009, 16:47 -0500 schrieb Miles Fidelman:> Hi, > > I have an old server, running Debian Sarge. I''m getting ready to > migrate to a new machine - more horsepower, newer version of Debian, etc.Good plan ;-)> As an interim step to migrating all of my production stuff, it sure > would be nice to generate a snapshot of the current system, turn it into > an image file, and get it running on the new box, as a VM. > > Any suggestions as to procedures and tools for imaging an existing system?First boot up your old-system into rescue-mode (use knoppix, grml, whatever) to get a consitent system.... Steps in dom0: ################# create an empty image file on dom0 dd if=/dev/zero of=/path/to/images/sarge-disk bs=1M count=5000 ---> creates a 5GB-Disk Format it mkfs.ext3 /path/to/images/sarge-disk Mount it mount -o loop /path/to/images/sarge-disk /mnt Copy your data into it rsync -avzH --numeric-ids -e ssh root@old-system:/* /mnt/ umount && create domu.cfg umount /mnt && cd /etc/xen && cp $extisting-domu.cfg sarge.cfg vim sarge.cfg> > Thanks much, > > Miles Fidelmanhth, Thomas _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi, Well, a slightly less elegant solution but one I''ve done several times is to boot the machine you want to turn into a VM using this CD; http://et.redhat.com/~rjones/virt-p2v/ But the caveat is that you must first have a Xen dom0 on a machine supporting Intel VT or AMD V extensions. That machine must have SSH open as well. Summary of what happens; 1 - Boot the p2v CD. 2 - Answer several self guided questions. 3 - An image of the entire disk is created over the net via SSH on your VT/V enabled dom0. The down side is that the domU image file is the same size as the entire source disk. What I''ve done since is to create a new HVM domU where not all the image is allocated (a sparse file) and then kpartx/ lomount/mount the original HVM and new HVM and then dump | restore from the original HVM to the new HVM. This may seem a little Polish to some of you, but hey, I am 1/4 Polak :) - Brian On Feb 16, 2009, at 2:15 PM, Thomas Halinka wrote:> Hi Miles, > > Am Montag, den 16.02.2009, 16:47 -0500 schrieb Miles Fidelman: >> Hi, >> >> I have an old server, running Debian Sarge. I''m getting ready to >> migrate to a new machine - more horsepower, newer version of >> Debian, etc. > > Good plan ;-) > >> As an interim step to migrating all of my production stuff, it sure >> would be nice to generate a snapshot of the current system, turn it >> into >> an image file, and get it running on the new box, as a VM. >> >> Any suggestions as to procedures and tools for imaging an existing >> system? > > First boot up your old-system into rescue-mode (use knoppix, grml, > whatever) to get a consitent system.... > > > Steps in dom0: > ################# > > create an empty image file on dom0 > > dd if=/dev/zero of=/path/to/images/sarge-disk bs=1M count=5000 > > ---> creates a 5GB-Disk > > Format it > > mkfs.ext3 /path/to/images/sarge-disk > > > Mount it > > mount -o loop /path/to/images/sarge-disk /mnt > > > Copy your data into it > > rsync -avzH --numeric-ids -e ssh root@old-system:/* /mnt/ > > umount && create domu.cfg > > umount /mnt && cd /etc/xen && cp $extisting-domu.cfg sarge.cfg > vim sarge.cfg > > >> >> Thanks much, >> >> Miles Fidelman > > > hth, > > Thomas > > > _______________________________________________ > 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
Thomas Halinka wrote:> Hi Miles, > > Am Montag, den 16.02.2009, 16:47 -0500 schrieb Miles Fidelman: > >> Hi, >> >> I have an old server, running Debian Sarge. I''m getting ready to >> migrate to a new machine - more horsepower, newer version of Debian, etc. >> > > Good plan ;-) >I''m not so sure - it works, and as the saying goes, if it ain''t broke, don''t fix it . But... :-) Thanks for the suggestions! I think I still need to work through a few details (like getting the network addresses right, and such), but this looks like a good start. Miles> First boot up your old-system into rescue-mode (use knoppix, grml, > whatever) to get a consitent system.... > > > Steps in dom0: > ################# > > create an empty image file on dom0 > > dd if=/dev/zero of=/path/to/images/sarge-disk bs=1M count=5000 > > ---> creates a 5GB-Disk > > Format it > > mkfs.ext3 /path/to/images/sarge-disk > > > Mount it > > mount -o loop /path/to/images/sarge-disk /mnt > > > Copy your data into it > > rsync -avzH --numeric-ids -e ssh root@old-system:/* /mnt/ > > umount && create domu.cfg > > umount /mnt && cd /etc/xen && cp $extisting-domu.cfg sarge.cfg > vim sarge.cfg > >-- In theory, there is no difference between theory and practice. In practice, there is. .... Yogi Berra _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Brian, Whoa... that''s cool. Unfortunately, I''m not sure my target machine is going to support the VT extensions. Why the requirement? Thanks, Miles Brian Krusic wrote:> Hi, > > Well, a slightly less elegant solution but one I''ve done several times > is to boot the machine you want to turn into a VM using this CD; > > http://et.redhat.com/~rjones/virt-p2v/ > > But the caveat is that you must first have a Xen dom0 on a machine > supporting Intel VT or AMD V extensions. That machine must have SSH > open as well. > > Summary of what happens; > > 1 - Boot the p2v CD. > 2 - Answer several self guided questions. > 3 - An image of the entire disk is created over the net via SSH on > your VT/V enabled dom0. > > The down side is that the domU image file is the same size as the > entire source disk. What I''ve done since is to create a new HVM domU > where not all the image is allocated (a sparse file) and then > kpartx/lomount/mount the original HVM and new HVM and then dump | > restore from the original HVM to the new HVM. > > This may seem a little Polish to some of you, but hey, I am 1/4 Polak :) > > - Brian > > > > > On Feb 16, 2009, at 2:15 PM, Thomas Halinka wrote: > >> Hi Miles, >> >> Am Montag, den 16.02.2009, 16:47 -0500 schrieb Miles Fidelman: >>> Hi, >>> >>> I have an old server, running Debian Sarge. I''m getting ready to >>> migrate to a new machine - more horsepower, newer version of Debian, >>> etc. >> >> Good plan ;-) >> >>> As an interim step to migrating all of my production stuff, it sure >>> would be nice to generate a snapshot of the current system, turn it >>> into >>> an image file, and get it running on the new box, as a VM. >>> >>> Any suggestions as to procedures and tools for imaging an existing >>> system? >> >> First boot up your old-system into rescue-mode (use knoppix, grml, >> whatever) to get a consitent system.... >> >> >> Steps in dom0: >> ################# >> >> create an empty image file on dom0 >> >> dd if=/dev/zero of=/path/to/images/sarge-disk bs=1M count=5000 >> >> ---> creates a 5GB-Disk >> >> Format it >> >> mkfs.ext3 /path/to/images/sarge-disk >> >> >> Mount it >> >> mount -o loop /path/to/images/sarge-disk /mnt >> >> >> Copy your data into it >> >> rsync -avzH --numeric-ids -e ssh root@old-system:/* /mnt/ >> >> umount && create domu.cfg >> >> umount /mnt && cd /etc/xen && cp $extisting-domu.cfg sarge.cfg >> vim sarge.cfg >> >> >>> >>> Thanks much, >>> >>> Miles Fidelman >> >> >> hth, >> >> Thomas >> >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users-- In theory, there is no difference between theory and practice. In practice, there is. .... Yogi Berra _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Miles, This util simply creates a VM and doesn''t incorporate any PVM kernels into your VM. So basically use it to only create HVMs and then if needed like I have, convert the HVM to a PVM. I actually prefer having control over the HVM to PVM process. Not sure if I''m using the terminology correctly but; HVM - hardware virtual machine. PVM - para virtual machine. - Brian On Feb 16, 2009, at 6:23 PM, Miles Fidelman wrote:> Brian, > > Whoa... that''s cool. Unfortunately, I''m not sure my target machine > is going to support the VT extensions. Why the requirement? > > Thanks, > > Miles > > Brian Krusic wrote: >> Hi, >> >> Well, a slightly less elegant solution but one I''ve done several >> times is to boot the machine you want to turn into a VM using this >> CD; >> >> http://et.redhat.com/~rjones/virt-p2v/ >> >> But the caveat is that you must first have a Xen dom0 on a machine >> supporting Intel VT or AMD V extensions. That machine must have >> SSH open as well. >> >> Summary of what happens; >> >> 1 - Boot the p2v CD. >> 2 - Answer several self guided questions. >> 3 - An image of the entire disk is created over the net via SSH on >> your VT/V enabled dom0. >> >> The down side is that the domU image file is the same size as the >> entire source disk. What I''ve done since is to create a new HVM >> domU where not all the image is allocated (a sparse file) and then >> kpartx/lomount/mount the original HVM and new HVM and then dump | >> restore from the original HVM to the new HVM. >> >> This may seem a little Polish to some of you, but hey, I am 1/4 >> Polak :) >> >> - Brian >> >> >> >> >> On Feb 16, 2009, at 2:15 PM, Thomas Halinka wrote: >> >>> Hi Miles, >>> >>> Am Montag, den 16.02.2009, 16:47 -0500 schrieb Miles Fidelman: >>>> Hi, >>>> >>>> I have an old server, running Debian Sarge. I''m getting ready to >>>> migrate to a new machine - more horsepower, newer version of >>>> Debian, etc. >>> >>> Good plan ;-) >>> >>>> As an interim step to migrating all of my production stuff, it sure >>>> would be nice to generate a snapshot of the current system, turn >>>> it into >>>> an image file, and get it running on the new box, as a VM. >>>> >>>> Any suggestions as to procedures and tools for imaging an >>>> existing system? >>> >>> First boot up your old-system into rescue-mode (use knoppix, grml, >>> whatever) to get a consitent system.... >>> >>> >>> Steps in dom0: >>> ################# >>> >>> create an empty image file on dom0 >>> >>> dd if=/dev/zero of=/path/to/images/sarge-disk bs=1M count=5000 >>> >>> ---> creates a 5GB-Disk >>> >>> Format it >>> >>> mkfs.ext3 /path/to/images/sarge-disk >>> >>> >>> Mount it >>> >>> mount -o loop /path/to/images/sarge-disk /mnt >>> >>> >>> Copy your data into it >>> >>> rsync -avzH --numeric-ids -e ssh root@old-system:/* /mnt/ >>> >>> umount && create domu.cfg >>> >>> umount /mnt && cd /etc/xen && cp $extisting-domu.cfg sarge.cfg >>> vim sarge.cfg >>> >>> >>>> >>>> Thanks much, >>>> >>>> Miles Fidelman >>> >>> >>> hth, >>> >>> Thomas >>> >>> >>> _______________________________________________ >>> Xen-users mailing list >>> Xen-users@lists.xensource.com >>> http://lists.xensource.com/xen-users > > > -- > In theory, there is no difference between theory and practice. > In practice, there is. .... Yogi Berra > > > > _______________________________________________ > 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
Brian Krusic wrote:> Hi Miles, > > This util simply creates a VM and doesn''t incorporate any PVM kernels > into your VM. > > So basically use it to only create HVMs and then if needed like I > have, convert the HVM to a PVM. > > I actually prefer having control over the HVM to PVM process. > > Not sure if I''m using the terminology correctly but; > > HVM - hardware virtual machine. > PVM - para virtual machine. >ok.... can you elaborate just a little on how you do that conversion? Thanks! Miles -- In theory, there is no difference between theory and practice. In practice, there is. .... Yogi Berra _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Well, the HVM to PVM process is a PITA for me in some cases, in others its fine. For a Centos/RHEL HVM to PVM conversion, its easy, just install the xen kernel on your guest, mod the network config, then shut it down, mod the network config of the domU config file including how it boots; re pygrub/pvgrub and then start it. Before dong this, make a backup copy of your guest VM image and config files. For Ubuntu, it kinda suxed but thanks to Thomas, I was able to get it going. - Brian On Feb 16, 2009, at 7:04 PM, Miles Fidelman wrote:> Brian Krusic wrote: >> Hi Miles, >> >> This util simply creates a VM and doesn''t incorporate any PVM >> kernels into your VM. >> >> So basically use it to only create HVMs and then if needed like I >> have, convert the HVM to a PVM. >> >> I actually prefer having control over the HVM to PVM process. >> >> Not sure if I''m using the terminology correctly but; >> >> HVM - hardware virtual machine. >> PVM - para virtual machine. >> > ok.... can you elaborate just a little on how you do that conversion? > > Thanks! > > Miles > > -- > In theory, there is no difference between theory and practice. > In practice, there is. .... Yogi Berra > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Can you say a little more about what was involved in Ubuntu? I''m working with Debian, which should be similar. Thanks! Miles Brian Krusic wrote:> Well, the HVM to PVM process is a PITA for me in some cases, in others > its fine. > > For a Centos/RHEL HVM to PVM conversion, its easy, just install the > xen kernel on your guest, mod the network config, then shut it down, > mod the network config of the domU config file including how it boots; > re pygrub/pvgrub and then start it. > > Before dong this, make a backup copy of your guest VM image and config > files. > > For Ubuntu, it kinda suxed but thanks to Thomas, I was able to get it > going. > > - Brian > > > > > On Feb 16, 2009, at 7:04 PM, Miles Fidelman wrote: > >> Brian Krusic wrote: >>> Hi Miles, >>> >>> This util simply creates a VM and doesn''t incorporate any PVM >>> kernels into your VM. >>> >>> So basically use it to only create HVMs and then if needed like I >>> have, convert the HVM to a PVM. >>> >>> I actually prefer having control over the HVM to PVM process. >>> >>> Not sure if I''m using the terminology correctly but; >>> >>> HVM - hardware virtual machine. >>> PVM - para virtual machine. >>> >> ok.... can you elaborate just a little on how you do that conversion? >> >> Thanks! >> >> Miles >> >> -- >> In theory, there is no difference between theory and practice. >> In practice, there is. .... Yogi Berra >> >> > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- In theory, there is no difference between theory and practice. In practice, there is. .... Yogi Berra _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Miles, Check out this exchange. its pretty much what I did for Ubuntu, however I do use pygrub :) I''ll email you an exact step by step next week. Hey Brian, Am Freitag, den 13.02.2009, 15:22 -0800 schrieb Brian Krusic:> Hi Thomas, > > Since I will be loading a Xen kernel in my Ubuntu domU, couldn''t I > just use pygrub as my boot loader without needing the kernel/ramdisk > options in my config? > > My current domU PVMs use pygrub.pygrub is really ugly and unsecure - use pvgrub instead. But yes - thats correct, it will work, too. But you also have to install grub into domU, too.> > - BrianRegards, Thomas PS: Take a look at the pygrub-code - I''ve never seen such evil code of darkness :-) - Brian On Feb 17, 2009, at 12:30 AM, Miles Fidelman wrote:> Can you say a little more about what was involved in Ubuntu? I''m > working with Debian, which should be similar. > > Thanks! > > Miles > > Brian Krusic wrote: >> Well, the HVM to PVM process is a PITA for me in some cases, in >> others its fine. >> >> For a Centos/RHEL HVM to PVM conversion, its easy, just install the >> xen kernel on your guest, mod the network config, then shut it >> down, mod the network config of the domU config file including how >> it boots; re pygrub/pvgrub and then start it. >> >> Before dong this, make a backup copy of your guest VM image and >> config files. >> >> For Ubuntu, it kinda suxed but thanks to Thomas, I was able to get >> it going. >> >> - Brian >> >> >> >> >> On Feb 16, 2009, at 7:04 PM, Miles Fidelman wrote: >> >>> Brian Krusic wrote: >>>> Hi Miles, >>>> >>>> This util simply creates a VM and doesn''t incorporate any PVM >>>> kernels into your VM. >>>> >>>> So basically use it to only create HVMs and then if needed like I >>>> have, convert the HVM to a PVM. >>>> >>>> I actually prefer having control over the HVM to PVM process. >>>> >>>> Not sure if I''m using the terminology correctly but; >>>> >>>> HVM - hardware virtual machine. >>>> PVM - para virtual machine. >>>> >>> ok.... can you elaborate just a little on how you do that >>> conversion? >>> >>> Thanks! >>> >>> Miles >>> >>> -- >>> In theory, there is no difference between theory and practice. >>> In practice, there is. .... Yogi Berra >>> >>> >> >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users > > > -- > In theory, there is no difference between theory and practice. > In practice, there is. .... Yogi Berra > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users