From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNP0W-00088q-4c for qemu-devel@nongnu.org; Fri, 20 May 2011 08:40:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNP0V-0003on-9m for qemu-devel@nongnu.org; Fri, 20 May 2011 08:40:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNP0V-0003nt-16 for qemu-devel@nongnu.org; Fri, 20 May 2011 08:40:43 -0400 Message-ID: <4DD66100.7000108@redhat.com> Date: Fri, 20 May 2011 14:39:28 +0200 From: Jes Sorensen MIME-Version: 1.0 References: <4DC7EEB0.3040007@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] live snapshot, live merge, live block migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Anthony Liguori , dlaor@redhat.com, Marcelo Tosatti , qemu-devel , Mingming Cao , Avi Kivity , Stefan Hajnoczi , Badari Pulavarty , Jiri Denemark , Eric Blake On 05/20/11 14:19, Stefan Hajnoczi wrote: > I'm interested in what the API for snapshots would look like. I presume you're talking external snapshots here? The API is really what should be defined by libvirt, so you get a unified API that can work both on QEMU level snapshots as well as enterprise storage, host file system snapshots etc. > Specifically how does user software do the following: > 1. Create a snapshot There's a QMP patch out already that is still not applied, but it is pretty simple, similar to the hmp command. Alternatively you can do it the evil way by pre-creating the snapshot image file and feeding that the snapshot command. In this case QEMU won't create the snapshot file. > 2. Delete a snapshot This is still to be defined. > 3. List snapshots Again this is tricky as it depends on the type of snapshot. For QEMU level ones they are files, so 'ls' is your friend :) > 4. Access data from a snapshot You boot the snapshot file. > 5. Restore a VM from a snapshot We're talking snapshots not checkpointing here, so you cannot restore a VM from a snapshot. > 6. Get the dirty blocks list (for incremental backup) Good question > We've discussed image format-level approaches but I think the scope of > the API should cover several levels at which snapshots are > implemented: > 1. Image format - image file snapshot (Jes, Jagane) > 2. Host file system - ext4 and btrfs snapshots > 3. Storage system - LVM or SAN volume snapshots > > It will be hard to take advantage of more efficient host file system > or storage system snapshots if they are not designed in now. > > Is anyone familiar enough with the libvirt storage APIs to draft an > extension that adds snapshot support? I will take a stab at it if no > one else want to try it. I believe the libvirt guys are already looking at this. Adding to the CC list. Cheers, Jes