From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9YGo-0005Q2-RN for qemu-devel@nongnu.org; Fri, 30 Sep 2011 04:16:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9YGn-000453-Fq for qemu-devel@nongnu.org; Fri, 30 Sep 2011 04:16:34 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:56752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9YGn-00044z-A1 for qemu-devel@nongnu.org; Fri, 30 Sep 2011 04:16:33 -0400 Received: by wyh22 with SMTP id 22so957011wyh.4 for ; Fri, 30 Sep 2011 01:16:32 -0700 (PDT) Date: Fri, 30 Sep 2011 09:16:27 +0100 From: Stefan Hajnoczi Message-ID: <20110930081627.GA12834@stefanha-thinkpad.localdomain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] QEMU Live Snapshots / Commiting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Robert P Cc: qemu-devel@nongnu.org On Thu, Sep 29, 2011 at 09:07:19PM +0200, Robert P wrote: > Hello, > > I still have a problem with the "Live Snapshot" feature of QEMU .... and > before migrating to XEN, VMware or something similare, a quick post here: > > OS: Ubuntu Natty 64bit > > First, i'm starting my KVM Machine with an image like this: > qemu-img create -f qcow2 -o backing_file= > > If i stop the KVM Machine later, and i commit into > , all the new changes are in the . > That would be ok. > > --- > > The Problem: > > Actually i'm trying to create "live snapshots" periodically while the > machine is running, like this (host2Qemu is just a special function of mine > (it works), to send a string to qemu-monitor). > > host2Qemu "cont" > host2Qemu "guest-agent-fsfreeze" > host2Qemu "stop" > > host2Qemu "info block" > host2Qemu "snapshot_blkdev ide0-hd0 > qcow2" > > host2Qemu "cont" > host2Qemu "guest-agent-fsthaw" > > My idea is, to commit them one by one afterwards, when the KVM Machine is > down into the BaseImage. > > So, the Snapshots are beeing written, and everytime i call that function new > data is beeing written to the new "alllocated" snapshot. > BUT, committing of that live-snapshots fails, and i've no idea why ?! > > I would commit it like that: > qemu-img commit -f qcow2 > qemu-img commit -f qcow2 > qemu-img commit -f qcow2 > ... > and so on. > > So in that constellation, only changes from the Snapshot, with KVM was > started are in the Base-Image. I'm not 100% clear that you know qemu-img commit cannot be used while QEMU is running and has the disk image file open. It's simply not safe to modify the image file with qemu-img while QEMU is running. > And another question: I have a Windows XP Guest also in KVM, but the write > performance into the (qcow2 Image) (scp, rsync, e.g) Guest seems to be > pretty poor - Are there any hints or is there a special Parameter to avoid > this? > The write Performance to a Linux Guest with a similar configuration and also > qcow2 seems to very close to the "native" Performance. Are you using the virtio drivers for Windows? Stefan