This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-users] migrate virtual machine to another server

To: Ivan Bolognani <bolognani@xxxxxxxxxx>
Subject: Re: [Xen-users] migrate virtual machine to another server
From: Joseph Glanville <joseph.glanville@xxxxxxxxxxxxxx>
Date: Sat, 14 May 2011 01:55:06 +1000
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 13 May 2011 08:56:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C9F31CFA.2872%bolognani@xxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <C9F31CFA.2872%bolognani@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx

If the devices are in /dev/mapper you are probably using LVM.
You can use these commands to move the disks to server2 substituting
in the names of the LVM logical volume names.

# copy the LV to an image file
dd if=/dev/mapper/<vgname>-<lvname> of=/tmp/<vmname>.img bs=1M

#transfer the image file
scp <user>@server2:/tmp/<vmname>.img

#create a new LV assuming the volume group is already setup
lvcreate -n<lvname> -L<sizeofdisk> <vgname>

#copy the image onto the newly created lv
dd if=/tmp/<vmname>.img of=/dev/mapper/<vgname>-<lvname>

You should now be able to start the VM with the same configuration
file assuming networking etc is setup the same as server1.


On 14 May 2011 01:38, Ivan Bolognani <bolognani@xxxxxxxxxx> wrote:
> Good morning.
> I have a question can you help me?
> I must migrate a virtual machine from server1  to server2 but I do not know
> where to start
> files are all in / dev / mapper / but I do not understand how to move
> Can you help me posting the procedure  to do to migrate the virtual server
> Sorry for my english
> Thanks
> Ivan
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users

Kind regards,
Founder | Director
Orion Virtualisation Solutions | www.orionvm.com.au | Phone: 1300 56
99 52 | Mobile: 0428 754 846

Xen-users mailing list