From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Sinhoreli Subject: Re: [Xen-devel] Re: XCP/XenServer Migration utility now available at xen.org Date: Mon, 15 Mar 2010 17:30:10 -0300 Message-ID: <20fe3cf61003151330l20cd8eadg7f10b4f67efa7185@mail.gmail.com> References: <6894a6471003151043o5ba7bf03kc8be41b7ae007626@mail.gmail.com> <6b7f6eb1003151113o60046a6l3f6667851737fa8f@mail.gmail.com> <6894a6471003151117n781471beh4df5f0a0df4da7c5@mail.gmail.com> <6b7f6eb1003151131v7a381856nafa681fd348935db@mail.gmail.com> <6894a6471003151139r5b4ddad6o839fd79b8f4555f1@mail.gmail.com> <6b7f6eb1003151146jbdcfaa7m710110d87b18cbef@mail.gmail.com> <6894a6471003151155u44438a1arcefbca3fc96fb876@mail.gmail.com> <6b7f6eb1003151314r4ab2e7efqb7c3eb37aa7807f@mail.gmail.com> <6894a6471003151324t483e518bu358c159ebccd3f48@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0481908911==" Return-path: In-Reply-To: <6894a6471003151324t483e518bu358c159ebccd3f48@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-users-bounces@lists.xensource.com Errors-To: xen-users-bounces@lists.xensource.com To: David Markey , "xen-devel@lists.xensource.com" , "xen-users@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --===============0481908911== Content-Type: multipart/alternative; boundary=0016e68def6f682ad10481dcbfcf --0016e68def6f682ad10481dcbfcf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi David, Could I migrate a Citrix XenServer VM to XCP as well? Cheers, 2010/3/15 David Markey > No im afraid not. > > YOU have to make these changes to menu.lst and fstab before migration. > > If your VMs are the exact same, this should be easily scripted. i.e. > > vmdisk=3D"/dev/xen/vm1root" > > mount $vmdisk /mnt/tmp > > sed -i.bak -e 's/xvda1/xvda/g' -e 's/xvda2/xvdb/g' /mnt/tmp/etc/fstab > /mnt/tmp/etc/fstab > > umount /mnt/tmp > > > > > > > 2010/3/15 Martinx - =E3=82=B8=E3=82=A7=E3=83=BC=E3=83=A0=E3=82=BA > >> So, your script can make a new partition scheme and a new fstab for my V= Ms >> before stream it to the XenServer? >> Because I have more than 100 VMs to copy! :-/ >> >> >> 2010/3/15 David Markey >> >>> Wow, what a pain :) >>> >>> >>> >>> 2010/3/15 Martinx - =E3=82=B8=E3=82=A7=E3=83=BC=E3=83=A0=E3=82=BA >>> >>>> Yeah! Sure! >>>> >>>> Today I'm doing this work manually... I mean, to copy a VM from open >>>> source Xen to the XenServer I do: >>>> >>>> 1- stop the VM on my debian dom0; >>>> 2- mount its root file system under /mnt/source; >>>> 3- export it via NFS; >>>> 4- At the XenServer, I boot the sysrescuecd (a live system); >>>> 5- fdisk the /dev/sda; >>>> 6- create the LVM volumes; >>>> 7- mount /dev/vg01/root under /mnt/target; >>>> 8- mount /dev/sda1 under /mnt/target/boot; >>>> 9- mount the debian dom0 nfs server under /mnt/source; >>>> 10- cp /mnt/source/* /mnt/target/ >>>> 11- edit the /etc/fstab and the grub's menu; >>>> 12- shutdown the VM; >>>> 13- Convert it from HVM to PVM; >>>> 14- start the VM; >>>> >>>> >>>> Thanks, >>>> Thiago >>>> >>>> 2010/3/15 David Markey >>>> >>>>> If you change xvda1 to xvda, change xvda2 to xvdb it will work fine. >>>>> >>>>> Change references in /boot/grub/menu.lst of xvda1 to xvda >>>>> >>>>> Change references in /etc/fstab of xvda1 to xvda, and xvda2 to xvdb. >>>>> >>>>> >>>>> Understand? >>>>> >>>>> >>>>> 2010/3/15 Martinx - =E3=82=B8=E3=82=A7=E3=83=BC=E3=83=A0=E3=82=BA >>>>> >>>>>> Exactly! >>>>>> >>>>>> The first one is for my domU hosted at my open source Xen (powered = by >>>>>> Debian), the second fstab, is the new one, used for my guests hosted= at my >>>>>> XenServers. >>>>>> >>>>>> >>>>>> Thanks! >>>>>> Thiago >>>>>> >>>>>> 2010/3/15 David Markey >>>>>> >>>>>>> I'm confused, >>>>>>> >>>>>>> You supply 2 fstabs there, one using LVM, one without. Which one is >>>>>>> it? >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> 2010/3/15 Martinx - =E3=82=B8=E3=82=A7=E3=83=BC=E3=83=A0=E3=82=BA <= thiagocmartinsc@gmail.com> >>>>>>> >>>>>>> Hi David! >>>>>>>> >>>>>>>> My Xen domU in my open source dom0 (Debian) have this configurati= on >>>>>>>> file: >>>>>>>> >>>>>>>> ---- >>>>>>>> bootloader =3D '/usr/bin/pygrub' >>>>>>>> extra =3D 'console=3Dhvc0' >>>>>>>> memory =3D '64' >>>>>>>> disk =3D [ >>>>>>>> 'phy:/dev/HyperVG01/guest01-root,xvda1,w', >>>>>>>> 'phy:/dev/HyperVG01/guest01-swap,xvda2,w', >>>>>>>> ] >>>>>>>> name =3D 'guest01' >>>>>>>> vif =3D [ 'mac=3D00:01:64:4b:0d:2e, vifname=3Dguest01-eth0= , >>>>>>>> bridge=3Deth0' ] >>>>>>>> on_poweroff =3D 'destroy' >>>>>>>> on_reboot =3D 'restart' >>>>>>>> on_crash =3D 'restart' >>>>>>>> ---- >>>>>>>> >>>>>>>> My guest01 /etc/fstab file: >>>>>>>> >>>>>>>> proc /proc proc defaults 0 0 >>>>>>>> /dev/xvda1 / ext3 relatime,errors=3Dremount-= ro >>>>>>>> 0 1 >>>>>>>> /dev/xvda2 none swap sw 0 0 >>>>>>>> >>>>>>>> BUT, this is for open source Xen domU, within the XenServer, the >>>>>>>> guest01 should be: >>>>>>>> >>>>>>>> proc /proc proc defaults 0 0 >>>>>>>> /dev/xvda1 /boot ext2 defaults 0 2 >>>>>>>> /dev/mapper/vdwuaf1-root / ext3 errors=3Dremount-= ro >>>>>>>> 0 1 >>>>>>>> /dev/mapper/vdwuaf1-swap_1 none swap sw >>>>>>>> 0 0 >>>>>>>> >>>>>>>> And the partition table of the guest01: >>>>>>>> >>>>>>>> guest01:~# fdisk -lu /dev/xvda >>>>>>>> >>>>>>>> Disk /dev/xvda: 8589 MB, 8589934592 bytes >>>>>>>> 255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sector= s >>>>>>>> Units =3D sectors of 1 * 512 =3D 512 bytes >>>>>>>> Disk identifier: 0x0009c181 >>>>>>>> >>>>>>>> Device Boot Start End Blocks Id System >>>>>>>> /dev/xvda1 * 63 498014 248976 83 Linux >>>>>>>> /dev/xvda2 498015 16771859 8136922+ 8e Linux LVM >>>>>>>> >>>>>>>> You tool can recreate the partition scheme? Or it just copy the >>>>>>>> domU as is? >>>>>>>> I have many others domU like this to copy... >>>>>>>> >>>>>>>> Thanks! >>>>>>>> Thiago >>>>>>>> >>>>>>>> 2010/3/15 David Markey >>>>>>>> >>>>>>>> If anyone has feature requests, direct them here. >>>>>>>>> >>>>>>>>> The next feature i'll be working on is supporting kernels loaded >>>>>>>>> from the Dom0. The kernel images will have to be copied to the Xe= nServer/XCP >>>>>>>>> Dom0. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> 2010/3/12 Martinx - =E3=82=B8=E3=82=A7=E3=83=BC=E3=83=A0=E3=82=BA= >>>>>>>>> >>>>>>>>>> Really COOL!!! I'm doing all this work manually until now! >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On 12 March 2010 15:33, David Markey wr= ote: >>>>>>>>>> >>>>>>>>>>> Hi all, >>>>>>>>>>> >>>>>>>>>>> A new python based migration utility for migrating your xend >>>>>>>>>>> virtual machines to XCP is now available at: >>>>>>>>>>> >>>>>>>>>>> http://www.xen.org/products/cloud_projects.html >>>>>>>>>>> >>>>>>>>>>> It can generate XVAs from your xend based HVM and paravirtualis= ed >>>>>>>>>>> virtual machines. >>>>>>>>>>> It can also steam your VM directly to a XenServer/XCP host over >>>>>>>>>>> HTTP or HTTPS. >>>>>>>>>>> >>>>>>>>>>> Please read the README for pointers and guidelines on how to >>>>>>>>>>> prepare your VMs for migration to XCP. Most PV based virtual ma= chines will >>>>>>>>>>> need some preparation work. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks to Stephen Spector and Dave Scott! >>>>>>>>>>> >>>>>>>>>>> Enjoy, >>>>>>>>>>> >>>>>>>>>>> David >>>>>>>>>>> >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> Xen-users mailing list >>>>>>>>>>> Xen-users@lists.xensource.com >>>>>>>>>>> http://lists.xensource.com/xen-users >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Xen-devel mailing list >>>>>>>>>> Xen-devel@lists.xensource.com >>>>>>>>>> http://lists.xensource.com/xen-devel >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > --=20 Marco Sinhoreli --0016e68def6f682ad10481dcbfcf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi David,

Could I migrate a Citrix XenServer VM to XCP a= s well?

Cheers,

= 2010/3/15 David Markey <admin@dmarkey.com>
No im afraid not.

YOU ha= ve to make these changes to menu.lst and fstab before migration.

If your VMs are the exact same, this should be easily script= ed. i.e.

vmdisk=3D"/dev/xen/vm1root"

mount $= vmdisk /mnt/tmp

sed -i.bak -e 's/xvda1/xvda/g&= #39; -e =C2=A0's/xvda2/xvdb/g' /mnt/tmp/etc/fstab /mnt/tmp/etc/fsta= b

umount /mnt/tmp
=





=

2010/3/15 Martinx - =E3=82=B8=E3=82=A7= =E3=83=BC=E3=83=A0=E3=82=BA <thiagocmartinsc@gmail.com>
So, your script can make a new partition sch= eme and a new fstab for my VMs before stream it to the XenServer?
Becaus= e I have more than 100 VMs to copy!=C2=A0 :-/


2010/3/15 David Markey <= span dir=3D"ltr"><admin@dmarkey.com>
Wow, what a pain :)



2010/3/15 Martinx - =E3=82=B8=E3=82=A7=E3=83=BC=E3=83=A0=E3=82=BA <thiagocmartinsc@gmail.com>
Yeah! Sure!

=C2=A0Today I'm doing this work manually... I mean, = to copy a VM from open source Xen to the XenServer I do:

1- stop the= VM on my debian dom0;
2- mount its root file system under /mnt/source;<= br> 3- export it via NFS;
4- At the XenServer, I boot the sysrescuecd (a liv= e system);
5- fdisk the /dev/sda;
6- create the LVM volumes;
7- mo= unt /dev/vg01/root under /mnt/target;
8- mount /dev/sda1 under /mnt/targ= et/boot;
9- mount the debian dom0 nfs server under /mnt/source;
10- cp /mnt/sourc= e/* /mnt/target/
11- edit the /etc/fstab and the grub's menu;
12-= shutdown the VM;
13- Convert it from HVM to PVM;
14- start the VM;


Thanks,
Thiago

2010/3/15 David Mar= key <admin@dmarkey.com>
If you change xvda1 to xvda, change xvda2 to xvdb it will work fine.
Change references in /boot/grub/menu.lst of xvda1 to xvda

Change references in /etc/fstab of xvda1 to xvda, and = xvda2 to xvdb.


Understand?


2010/3/15 Martinx - =E3=82=B8=E3=82= =A7=E3=83=BC=E3=83=A0=E3=82=BA <thiagocmartinsc@gmail.com><= /span>
Exactly!

=C2=A0T= he first one is for my domU hosted at my open source Xen (powered by Debian= ), the second fstab, is the new one, used for my guests hosted at my XenSer= vers.


Thanks!
Thiago

2010/3/15 David Markey <admin@dmarkey.com>
I'm confused,

You supply 2 fstabs there, = one using LVM, one without. Which one is it?


<= /div>


2010/3/15 Martinx - =E3=82=B8= =E3=82=A7=E3=83=BC=E3=83=A0=E3=82=BA <thiagocmartinsc@gmail.com>

Hi David!

=C2=A0= My Xen domU in my open source dom0 (Debian) have this configuration file:
----
bootloader=C2=A0 =3D '/usr/bin/pygrub'
extra=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D 'console=3Dhvc0'
m= emory=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D '64'
disk=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D [
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 'phy:/dev/HyperVG01/guest01-root,xvda1,w= 9;,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 'phy:/dev/HyperVG01/guest01-swap,x= vda2,w',
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 ]
name=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = =3D 'guest01'
vif=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 =3D [ 'mac=3D00:01:64:4b:0d:2e, vifname=3Dguest01-eth0, bridge=3Det= h0' ]
on_poweroff =3D 'destroy'
on_reboot=C2=A0=C2=A0 =3D 'restart= '
on_crash=C2=A0=C2=A0=C2=A0 =3D 'restart'
----

= =C2=A0My guest01 /etc/fstab file:

proc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /proc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 proc=C2=A0=C2=A0=C2=A0 defaults=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0
/dev/xvda1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ext3=C2=A0=C2=A0=C2=A0 = relatime,errors=3Dremount-ro 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1
/de= v/xvda2=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 none=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 swap=C2=A0=C2=A0=C2=A0 sw=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 0

=C2=A0BUT, this is for open source Xen= domU, within the XenServer, the guest01 should be:

proc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = /proc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 proc=C2= =A0=C2=A0=C2=A0 defaults=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0
/dev/xvda1=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 /boot=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ext2= =C2=A0=C2=A0=C2=A0 defaults=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2
/dev/mapper/vdwuaf1-root /=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ext3=C2=A0=C2=A0=C2=A0 errors=3Dremount-ro=20 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1
/dev/mapper/vdwuaf1-swap_1 none= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 swap=C2= =A0=C2=A0=C2=A0 sw=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0

=C2=A0= And the partition table of the guest01:

guest01:~# fdisk -lu /dev/xv= da

Disk /dev/xvda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors
Unit= s =3D sectors of 1 * 512 =3D 512 bytes
Disk identifier: 0x0009c181
=C2=A0=C2=A0=C2=A0 Device Boot=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Start=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 End=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 Blocks=C2=A0=C2=A0 Id=C2=A0 System
/dev/xvda1=C2=A0=C2=A0 *=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 63=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 498014=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 248976=C2=A0=C2=A0 83=C2=A0 Linux<= br> /dev/xvda2=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 498015=C2= =A0=C2=A0=C2=A0 16771859=C2=A0=C2=A0=C2=A0=C2=A0 8136922+=C2=A0 8e=C2=A0 Li= nux LVM

=C2=A0You tool can recreate the partition scheme? Or it just= copy the domU as is?
=C2=A0I have many others domU like this to copy...=

Thanks!
Thiago

2010/3/15 David Markey <= ;admin@dmarkey.com>

If anyone has feature requests, direct them here.

The ne= xt feature i'll be working on is supporting kernels loaded from the Dom= 0. The kernel images will have to be copied to the XenServer/XCP Dom0.





2010/3/12 Martinx - =E3=82=B8=E3=82=A7=E3=83=BC=E3=83=A0=E3=82=BA= <thiagocmartinsc@gmail.com>
Really COOL!!! I'm doing all this work manually until now!


On 12 March 2010 15:33, David Ma= rkey <david.markey@citrix.com> wrote:
Hi all,

A new python based migration utility for migrating your xend virtual machin= es to XCP =C2=A0is now available at:

http://www.xen.org/products/cloud_projects.html

It can generate XVAs from your xend based HVM and paravirtualised virtual m= achines.
It can also steam your VM directly to a XenServer/XCP host over HTTP or HTT= PS.

Please read the README for pointers and guidelines on how to prepare your V= Ms for migration to XCP. Most PV based virtual machines will need some prep= aration work.


Thanks to Stephen Spector and Dave Scott!

Enjoy,

David

_______________________________________________
Xen-users mailing list
Xen-user= s@lists.xensource.com
http://l= ists.xensource.com/xen-users


_______________________________________________=
Xen-devel mailing list
Xen-deve= l@lists.xensource.com
http://l= ists.xensource.com/xen-devel











_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.= com
http://l= ists.xensource.com/xen-devel




--
Marco Sinhoreli
--0016e68def6f682ad10481dcbfcf-- --===============0481908911== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users --===============0481908911==--