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-devel

Re: [Xen-devel] live saving of domU

To: "Anthony Liguori" <aliguori@xxxxxxxxxx>
Subject: Re: [Xen-devel] live saving of domU
From: "Jayesh Salvi" <jayeshsalvi@xxxxxxxxx>
Date: Wed, 10 May 2006 20:29:06 -0500
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ewan Mellor <ewan@xxxxxxxxxxxxx>
Delivery-date: Wed, 10 May 2006 18:29:28 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Fj+E/j3fZf1puBISkuDd/7Ym8lSR/YUc2PpP826nLxqkJd/mvVAdr3ZS4nTu6mCOQhCs8ZVjuJjBggJ7oABpmbPElPSut8586LjdeCijpzFrGT5v0Rcy3m8z1Q361LeTuH0tJWQcmwgN5eBVypZYlL7DN0ns9Z8fDlzcbLihvUc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <44623F3A.9040308@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <871640aa0605100840t14a9f9deqf5c9be99f56917b7@xxxxxxxxxxxxxx> <20060510163213.GF4954@xxxxxxxxxxxxxxxxxxxxxx> <44621BDD.9060401@xxxxxxxxxx> <871640aa0605101206h2742f0d1o70c356bad797747c@xxxxxxxxxxxxxx> <44623F3A.9040308@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx


On 5/10/06, Anthony Liguori <aliguori@xxxxxxxxxx> wrote:
Jayesh Salvi wrote:
>
>
> On 5/10/06, *Anthony Liguori* <aliguori@xxxxxxxxxx
> <mailto:aliguori@xxxxxxxxxx>> wrote:
>
>     Guests are aware of the physical addresses of the memory that's been
>     allocated to them.  Because of this, to save a domain's state in a
>     restorable way you need the guest to "canonicalize" itself.  The only
>     way to do this today is through a suspend operation which happens
>     to be
>     a subop of shutdown.  Shutdowns are non-recoverable so you cannot use
>     this as a snapshotting mechanism.
>
>
> Thanks, that was informative. But the shutdown you are refering to
> here is not the traditional shutdown of domU right? I mean 'xm
> shutdown' will do proper shutdown of domU OS, the shutdown you are
> referring while doing 'xm save' is different from that, I hope!

From the perspective of the hypervisor, there isn't a significant
difference between doing an "xm shutdown" or an "xm save".  Don't read
too much into that though b/c the vast majority of both operations are
performed in userspace.  Unfortunately, this lack of distinction in the
hypervisor is what currently prevents light weight check pointing.

You could, theoritically, add another entry point in the guest kernel
and use some xenstore magic to force the domain to spin in a loop after
canonicalizing, pause it, switch a register value, then unpause it.
Something like (in psuedo-code):

while (eax == 0) halt;

Right after canonicalizing.  Then pause, and do a
getvcpuinfo/setvcpuinfo to change eax to 1.  Then unpause.  If you added
another suspend entry point you could probably even avoid tearing down
the devices...

While reading more on the topic of backup of virtual machines, I came across the problems and solutions in VMWare world. You can check out the VMWare consolidated backup (VCB) feature introduced in ESX server. ( http://blog.baeke.info/blog/_archives/2006/3/23/1836968.html).

The VCB addresses some different problems of backups in virtual environment, but points relevant to our current thread of conversation:
VCB does give a mechanism to quiesce the virtual machine. The virtual disk is mounted on something called junction point, there is some windows specific snapshot mechanism using which the snapshot of the disk is taken. Then traditional softwares are used to do backup this shapshot / junction point.

From this I guess, sooner or later we will need such quisceing mechanism working in Xen.

On a little different note, it is amusing to note that VMWare has to do some tricky dance of junction point/snapshot, etc. May be VMWare virtual machines principally use loopback file systems for virtual disk - that's why they have problem in viewing the same file system from dom0 and domU (consistent or inconsistent). Xen allows devices to be used as boot disk. Hence the file system is visible from dom0 and domU the same way (at least RO from dom0). I might be wrong. Correct me if you think so.

Regards,

Anthony Liguori

>     The closest thing you can achieve is a localhost migration.  There are
>     some caveats to this, of course.  The first is that you need to
>     have as
>     much memory as the domain has available since you'll have a copy
>     of the
>     domain created briefly while the migration takes
>     place.  Migrations are
>     also quite intrusive since they involve tearing down and bringing
>     up all
>     the devices.
>
>     I've gotten a lot of requests for light weight checkpointing.  AFAIK,
>     noone is actually working on it though.
>
>     Regards,
>
>     Anthony Liguori
>
>     > If you had a way to snapshot the storage at the same time as the
>     VM, then you
>     > could make live snapshotting of VMs work properly.  As it is,
>     this is not
>     > integrated into Xend at the moment, and not supported because of
>     the danger of
>     > filesystem corruption if you don't know what you are doing.
>     >
>     > Ewan.
>     >
>     > _______________________________________________
>     > Xen-devel mailing list
>     > Xen-devel@xxxxxxxxxxxxxxxxxxx <mailto:Xen-devel@xxxxxxxxxxxxxxxxxxx>
>     > http://lists.xensource.com/xen-devel
>     >
>
>
>
>
> --
> Jayesh
> ------------------------------------------------------------------------
> Everything you can imagine is real




--
Jayesh
------------------------------------------------------------------------
Everything you can imagine is real
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel