From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TibsQ-0007mo-KC for qemu-devel@nongnu.org; Tue, 11 Dec 2012 21:16:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TibsP-0004em-IK for qemu-devel@nongnu.org; Tue, 11 Dec 2012 21:16:50 -0500 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:46658) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TibsP-0004eZ-0C for qemu-devel@nongnu.org; Tue, 11 Dec 2012 21:16:49 -0500 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Dec 2012 12:11:52 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 856842BB004A for ; Wed, 12 Dec 2012 13:16:38 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qBC2Gb0C65667256 for ; Wed, 12 Dec 2012 13:16:38 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qBC2Gbee030786 for ; Wed, 12 Dec 2012 13:16:37 +1100 Message-ID: <50C7E8E6.3060802@linux.vnet.ibm.com> Date: Wed, 12 Dec 2012 10:16:06 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1354955059-14391-1-git-send-email-xiawenc@linux.vnet.ibm.com> <24E144B8C0207547AD09C467A8259F75578601DF@lisa.maurer-it.com> <50C415A6.504@linux.vnet.ibm.com> <24E144B8C0207547AD09C467A8259F7557861427@lisa.maurer-it.com> <50C53CE2.7010707@linux.vnet.ibm.com> <24E144B8C0207547AD09C467A8259F755786FA0E@lisa.maurer-it.com> <50C6DD56.8090001@linux.vnet.ibm.com> <24E144B8C0207547AD09C467A8259F7557871C7B@lisa.maurer-it.com> In-Reply-To: <24E144B8C0207547AD09C467A8259F7557871C7B@lisa.maurer-it.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 0/2] live backup vm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dietmar Maurer Cc: "kwolf@redhat.com" , "aliguori@us.ibm.com" , "stefanha@gmail.com" , "qemu-devel@nongnu.org" , "blauwirbel@gmail.com" , "pbonzini@redhat.com" OK, I'll adjust the code into the upstream framework, thanks for your declaration. > OK, I will try to give a short overview on the functionality. > > First, we decided to use 'internal' snapshots for our 'live snapshot' implementation. > Internal snapshots almost always use some kind of reference counting, making > snapshot action (like 'create/delete snapshot') quite efficient and fast. > > Internal snapshot totally depends on the storage backend. For now we can create > internal snapshots on the following storage backend: > > * qcow2 files > * rbd > * sheepdog > * nexenta iscsi > > As you can see, creating internal snapshots sometimes needs external tool. For example we use the > nexenta API to create snapshots, while we use libiscsi to access them inside qemu. > > So our snapshot implementation uses the following steps: > > 1.) qmp: savevm-start [statefile] > > This save the VM state into [statefile] and then stops the VM. > > 2.) qga freezefs > > 3.) create snapshots: either using external tools or by qmp: snapshot-drive > > 4.) gqa unfreezefs > > 5.) qmp: savevm-end > > This restarts/resumes the VM > >> Have some questions: >> in qmp_savevm_start(), vm_stop(RUN_STATE_SAVE_VM), I think this will >> stop the VM running make it not lively, am I right? > > Yes, we need to halt the VM for a short period of time while we make > snapshots. But that time is usually short. > > - Dietmar > -- Best Regards Wenchao Xia