public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sylvain Bauza <sylvain.bauza@digimind.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: Win2003 disk corruption with kvm-1.0. and virtio
Date: Tue, 12 Mar 2013 16:48:55 +0100	[thread overview]
Message-ID: <513F4E67.7080300@digimind.com> (raw)
In-Reply-To: <511CB855.9090803@digimind.com>

Long lasting bug and huge update, but I think I got the root cause.
FYI, Windows 2003 is having a write cache enabled by default on disk 
drivers. Even with virtio (see driver details, policies).

As a consequence, any DLL which is open could be corrupted if we try a 
simple 'qemu-img convert' against the VM.
The proper way to do a live snapshot is to disable the writecache (and 
goodbye good perfs!) and do the convert.
The other way is to stop the VM, perform a 'qemu-img snapshot', then 
convert the snapshot.

Hope it can help other people.
-Sylvain


Le 14/02/2013 11:11, Sylvain Bauza a écrit :
> Interesting point you mention. Even if qcow2 is read only, the image 
> is changing (especially, I'm running IIS with ASP support and VB DLLs) 
> while the snapshot is taken.
>
> As asked in a second post, I'm running with latest Windows virtio 
> drivers, but I only apply a virtio driver update *after* running an 
> instance, not before taking the snapshot.
>
> What I'll try : run an instance, update the driver, stop the instance, 
> do a qemu-img convert once the instance is stopped.
>
>
> Le 14/02/2013 09:15, Stefan Hajnoczi a écrit :
>> 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/creating-images-from-running-instances.html 
>>>
>> 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 reading
>> from a qcow2 file that is changing underneath it.  However, the chance
>> is small as long as the snapshot isn't deleted while qemu-img convert is
>> running.
>>
>> So this doesn't sound like the cause of the problems you are seeing.
>>
>> Stefan
>


  reply	other threads:[~2013-03-12 15:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 14:30 Win2003 disk corruption with kvm-1.0. and virtio Sylvain Bauza
2013-02-13  7:21 ` Philipp Hahn
2013-02-13  9:56   ` Sylvain Bauza
2013-02-13 16:03     ` weber
2013-02-14  5:27       ` Michael Tokarev
2013-02-14  8:23   ` Sylvain Bauza
2013-02-13  9:03 ` Stefan Hajnoczi
2013-02-13  9:53   ` Sylvain Bauza
2013-02-14  8:15     ` Stefan Hajnoczi
2013-02-14 10:11       ` Sylvain Bauza
2013-03-12 15:48         ` Sylvain Bauza [this message]
2013-03-12 21:10           ` Jorge Armando Medina
2013-02-14  8:17 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513F4E67.7080300@digimind.com \
    --to=sylvain.bauza@digimind.com \
    --cc=kvm@vger.kernel.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox