From: "Jayesh Salvi" Subject: Re: live saving of domU Date: Wed, 10 May 2006 14:00:25 -0500 Message-ID: <871640aa0605101200x33045e3fp33f589bd389a15b5@mail.gmail.com> References: <871640aa0605100840t14a9f9deqf5c9be99f56917b7@mail.gmail.com> <20060510163213.GF4954@leeni.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1420987916==" Return-path: In-Reply-To: <20060510163213.GF4954@leeni.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ewan Mellor Cc: xen-devel List-Id: xen-devel@lists.xenproject.org --===============1420987916== Content-Type: multipart/alternative; boundary="----=_Part_3042_33043551.1147287625105" ------=_Part_3042_33043551.1147287625105 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 5/10/06, Ewan Mellor wrote: > > On Wed, May 10, 2006 at 10:40:31AM -0500, Jayesh Salvi wrote: > > > Hi, > > > > Could anyone tell me, why 'xm save' has live parameter set to false by > > default. From yesterday's patch ([PATCH] [XenD] Migration-related > change) > > i guess this paramter is renamed to network. > > This parameter has not been renamed -- the rename was for a similar flag > passed in to the device migration code, but the live flag for migration > remains. > > > [Snip] > > > > I am interested in saving the state of a virtual machine to a file, but > > want to continue it running. I want to backup the state of the machine, > so > > I want this to be unintrusive operation. I would like to pause the domU > > and save it to file but keeping it still in memory. After save to file > is > > done I will unpause the domU. > > > > I don't see why this shouldn't be possible if live migration works so > > well. > > The reason it's not supported at the moment is this: if you take a > snapshot of > a VM, then run for a bit, and then try and run the snapshot against the > same > filesystem that you were using before, you will inevitably corrupt the > filesystem. > > 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. OK. So as I understand it, we will need a snapshotting mechanism that does snapshot of storage and that of domU state in one single atomic operation. = I will study the suspend, pause , migrate and shutdown semantics and see what would be the best to stop domU from modifying the disk "for a while" - during which we can have a consistent snapshot of storage. If nothing else works an explicit 'xm save' and behind the curtain 'xm restore' will do the job I guess - a bit intrusive solution it will be though. If anyone has further ideas on this line, I am all ears. Thanks! Ewan. > -- Jayesh ------------------------------------------------------------------------ Everything you can imagine is real ------=_Part_3042_33043551.1147287625105 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline

On 5/10/06, Ewan Mellor <ewan@xens= ource.com> wrote:
On Wed, May 10, 2006 at 10:40:31AM -0500, Jayesh Salvi wrote:

> H= i,
>
> Could anyone tell me, why 'xm save' has live parameter s= et to false by
> default. From yesterday's patch ([PATCH] [XenD] Migr= ation-related change)
> i guess this paramter is renamed to network.

This parameter= has not been renamed -- the rename was for a similar flag
passed in to = the device migration code, but the live flag for migration
remains.

> [Snip]
>
> I am interested in saving the state of a vi= rtual machine to a file, but
> want to continue it running. I want to= backup the state of the machine, so
> I want this to be unintrusive = operation. I would like to pause the domU
> and save it to file but keeping it still in memory. After save to = file is
> done I will unpause the domU.
>
> I don't see w= hy this shouldn't be possible if live migration works so
> well.

The reason it's not supported at the moment is this: if you take a snap= shot of
a VM, then run for a bit, and then try and run the snapshot agai= nst the same
filesystem that you were using before, you will inevitably = corrupt the
filesystem.

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 prope= rly.  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.

OK. So as I understand it, we will need a snapshotting mechanism = that does snapshot of storage and that of domU state in one single atomic o= peration. I will study the suspend, pause , migrate and shutdown semantics = and see what would be the best to stop domU from modifying the disk "f= or a while" - during which we can have a consistent snapshot of storag= e. If nothing else works an explicit 'xm save' and behind the curtain 'xm r= estore' will do the job I guess - a bit intrusive solution it will be thoug= h.

If anyone has further ideas on this line, I am all ears.

Tha= nks!

Ewan.



--
Jayesh
----= --------------------------------------------------------------------
Eve= rything you can imagine is real ------=_Part_3042_33043551.1147287625105-- --===============1420987916== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1420987916==--