WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] migrating with physical device as VBD

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] migrating with physical device as VBD
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Mon, 7 Apr 2008 00:41:15 +0100
Cc: Jan Schulze <schulze@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, Antonio Mauriello <antoniomau@xxxxxxxxx>, "Ross S. W. Walker" <rwalker@xxxxxxxxxxxxx>
Delivery-date: Sun, 06 Apr 2008 16:41:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47F149A6.5050508@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <47F149A6.5050508@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)
> I am wondering, whether it's possible to migrate a DomU from one XEN Host
> to another *without* using shared storage. All HowTos that I found so far,
> are using some kind of shared filesystem or block device.

Well, as others have said, basically you need the block device the guest is 
using to be available at the destination host by the time it gets there...

As others have also noted, that doesn't necessarily mean any horribly crazy 
shared cluster thingy.

I guess there's 3 things you might want and it's worth clarifying which:

1) The /entire contents/ of the VBD moves to be stored on the new machine, the 
old storage can be discarded.
2) When the domU is on its "home" host it can access the block device using 
the normal front<->back connection with high performance.  Some simple remote 
access setup is used when it's migrated to a foreign host; but not using one 
of the very complex shared storage solutions out there.
3) You just don't want to use a complex shared storage solution like a SAN, 
iSCSI or something performance-sapping like files on NFS (which is often bad 
practice anyhow, under Xen)

For 1 there's not currently a particularly easy solution.  The closest is 
probably DRBD, since that avoids copying huge amounts of disk space across 
during the migration!  DRBD has been used with Xen before, some people have 
had good experiences with it.  You could always ask the DRBD mailing lists 
what the status of the multiple-primary support is and whether people have 
had success using it with Xen, if you want to check this option out.

Number 2 could be done by hacking up a new, slightly more intelligent, block 
device setup script that would either use a local blkback if available or go 
to a network server if not.

Number 3 could be done quite simply by running an enbd server to serve disk 
images, then putting something like (if memory serves correctly):

disk = ['enbd:server:port, sda1, w']

in the config file.  The control tools should automatically connect to the 
ENBD server correctly, including setting up a connection during a live 
migration.  This should be quite simple to set up; you might want to test and 
see if the performance is OK for you.

> In case, migrating this DomU won't work, I would have to copy the VM
> manually. Is it possible to access the contents of /dev/sda1 from Dom0?
> Simply shutting down the DomU and mounting /dev/sda1 in Dom0 does not work.

As noted by another responder, simply mounting this won't work because it's a 
whole disk image and not a filesystem image.

I'll just reiterate at this point that one should never ever mount the FS of a 
running (or currently paused / saved!) domU - preferably not even read-only.  
The safest way to mount a domU's filesystem is to make sure the domU is shut 
down cleanly first.  I expect you're aware of it, but it's worth 
emphasising ;-)

Cheers,
Mark

-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

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

<Prev in Thread] Current Thread [Next in Thread>