[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: [Xen-users] XCP/XenServer Migration utility now available at xen.org



If your OSS Xen VMs don't have LVM, then they wont have LVM in XenServer after they are migrated.



2010/3/15 Martinx - ããããã <thiagocmartinsc@xxxxxxxxx>
Okay but, and my partition scheme?
Remember that within the XenServer, my domUs have its own LVM...
I can change the fstab and grub's menu files before run xva.py but, how to make the partitions and the LVM vg / lv on the new domU?


2010/3/15 David Markey <admin@xxxxxxxxxxx>
Sorry,

sed -i.bak -e 's/xvda1/xvda/g' -e Â's/xvda2/xvdb/g' /mnt/tmp/etc/fstab /mnt/tmp/boot/grub/menu.lst (or grub.conf)



2010/3/15 David Markey <admin@xxxxxxxxxxx>
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="/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 - ããããã <thiagocmartinsc@xxxxxxxxx>
So, your script can make a new partition scheme and a new fstab for my VMs before stream it to the XenServer?
Because I have more than 100 VMs to copy! :-/


2010/3/15 David Markey <admin@xxxxxxxxxxx>
Wow, what a pain :)



2010/3/15 Martinx - ããããã <thiagocmartinsc@xxxxxxxxx>
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 <admin@xxxxxxxxxxx>
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 - ããããã <thiagocmartinsc@xxxxxxxxx>
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 <admin@xxxxxxxxxxx>
I'm confused,

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




2010/3/15 Martinx - ããããã <thiagocmartinsc@xxxxxxxxx>

Hi David!

ÂMy Xen domU in my open source dom0 (Debian) have this configuration file:

----
bootloader = '/usr/bin/pygrub'
extraÂÂÂÂÂÂ = 'console=hvc0'
memoryÂÂÂÂÂ = '64'
diskÂÂÂÂÂÂÂ = [
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 'phy:/dev/HyperVG01/guest01-root,xvda1,w',
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 'phy:/dev/HyperVG01/guest01-swap,xvda2,w',
ÂÂÂÂÂÂÂÂÂÂÂÂÂ ]
nameÂÂÂÂÂÂÂ = 'guest01'
vifÂÂÂÂÂÂÂÂ = [ 'mac=00:01:64:4b:0d:2e, vifname=guest01-eth0, bridge=eth0' ]
>on_rebootÂÂ = 'restart'
on_crashÂÂÂ = 'restart'
----

ÂMy guest01 /etc/fstab file:

procÂÂÂÂÂÂÂÂÂÂÂ /procÂÂÂÂÂÂÂÂÂÂ procÂÂÂ defaultsÂÂÂÂÂÂÂ 0ÂÂÂÂÂÂ 0
/dev/xvda1ÂÂÂÂÂ /ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ ext3ÂÂÂ relatime,errors=remount-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=remount-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 sectors
Units = sectors of 1 * 512 = 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 <admin@xxxxxxxxxxx>

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 XenServer/XCP Dom0.





2010/3/12 Martinx - ããããã <thiagocmartinsc@xxxxxxxxx>
Really COOL!!! I'm doing all this work manually until now!


On 12 March 2010 15:33, David Markey <david.markey@xxxxxxxxxx> wrote:
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 paravirtualised 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 machines will need some preparation work.


Thanks to Stephen Spector and Dave Scott!

Enjoy,

David

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel













_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.