From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sylvain Bauza Subject: Re: Win2003 disk corruption with kvm-1.0. and virtio Date: Tue, 12 Mar 2013 16:48:55 +0100 Message-ID: <513F4E67.7080300@digimind.com> References: <511A520D.4@digimind.com> <20130213090317.GA12049@stefanha-thinkpad.redhat.com> <511B628A.3040005@digimind.com> <20130214081543.GA3809@stefanha-thinkpad.redhat.com> <511CB855.9090803@digimind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: Stefan Hajnoczi Return-path: Received: from mail-ea0-f176.google.com ([209.85.215.176]:35465 "EHLO mail-ea0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753910Ab3CLPtK (ORCPT ); Tue, 12 Mar 2013 11:49:10 -0400 Received: by mail-ea0-f176.google.com with SMTP id h10so1770670eaj.7 for ; Tue, 12 Mar 2013 08:49:08 -0700 (PDT) In-Reply-To: <511CB855.9090803@digimind.com> Sender: kvm-owner@vger.kernel.org List-ID: Long lasting bug and huge update, but I think I got the root cause. =46YI, Windows 2003 is having a write cache enabled by default on disk=20 drivers. Even with virtio (see driver details, policies). As a consequence, any DLL which is open could be corrupted if we try a=20 simple 'qemu-img convert' against the VM. The proper way to do a live snapshot is to disable the writecache (and=20 goodbye good perfs!) and do the convert. The other way is to stop the VM, perform a 'qemu-img snapshot', then=20 convert the snapshot. Hope it can help other people. -Sylvain Le 14/02/2013 11:11, Sylvain Bauza a =E9crit : > Interesting point you mention. Even if qcow2 is read only, the image=20 > is changing (especially, I'm running IIS with ASP support and VB DLLs= )=20 > while the snapshot is taken. > > As asked in a second post, I'm running with latest Windows virtio=20 > drivers, but I only apply a virtio driver update *after* running an=20 > instance, not before taking the snapshot. > > What I'll try : run an instance, update the driver, stop the instance= ,=20 > do a qemu-img convert once the instance is stopped. > > > Le 14/02/2013 09:15, Stefan Hajnoczi a =E9crit : >> On Wed, Feb 13, 2013 at 10:53:14AM +0100, Sylvain Bauza wrote: >>> As per documentation, Nova (Openstack Compute layer) is doing a >>> 'qemu-img convert -s' against a running instance. >>> http://docs.openstack.org/trunk/openstack-compute/admin/content/cre= ating-images-from-running-instances.html=20 >>> >> That command will not corrupt the running instance because it opens = the >> image read-only. >> >> It is possible that the new image is corrupted since qemu-img is rea= ding >> from a qcow2 file that is changing underneath it. However, the chan= ce >> is small as long as the snapshot isn't deleted while qemu-img conver= t is >> running. >> >> So this doesn't sound like the cause of the problems you are seeing. >> >> Stefan >