From: Avi Kivity <avi@redhat.com>
To: Kenni Lund <kenni@kelu.dk>
Cc: kvm@vger.kernel.org
Subject: Re: SIGTERM to qemu-kvm process destroys qcow2 image?
Date: Thu, 17 Dec 2009 07:34:39 +0200 [thread overview]
Message-ID: <4B29C2EF.5010606@redhat.com> (raw)
In-Reply-To: <3b1f68ef0912161652l94ad986lc3f3ee380614c108@mail.gmail.com>
On 12/17/2009 02:52 AM, Kenni Lund wrote:
> Hi
>
> Sorry if this is a stupid question, but is it expected behaviour that
> a qcow2 image will/can get damaged by killing the qemu-kvm process
> with a SIGTERM signal?
>
>
If it does, that's a serious bug. qcow2 should survive SIGTERM,
SIGKILL, and host power loss.
> I would expect data on filesystems within the virtual machine to
> potentially get damaged if it's in use, but I though that the qemu-kvm
> process would take care of finishing its writes correctly to the qcow2
> image before shutting down, ensuring the integrity of the qcow2 image.
>
No, it uses O_SYNC writes to ensure all writes are completed, and orders
writes carefully so the image is consistent at all times.
> Yesterday I entered an invalid boot device as an argument to my
> qemu-kvm command for my Windows XP machine, causing an error about a
> missing boot device in the qemu BIOS/POST. As I didn't have any
> filesystems mounted inside the virtual machine (since it was stuck at
> the BIOS asking for a device to boot), I did a kill $pid, fixed the
> boot device in the qemu-kvm command and tried booting again...but with
> no luck, whatever I try now with qemu-kvm gives me the error:
> qemu: could not open disk image /data/virtualization/WindowsXP.img
>
> And qemu-img (check, convert, etc) gives me:
> qemu-img: Could not open 'WindowsXP.img'
>
Can you post the first 4K of the image? It shouldn't contain private
data, but go over it (or don't post) if you sensitive information there.
> Is this expected behaviour? Luckily I do have backups of the most
> important data on this machine, I'm just happy this didn't happen to
> any of my critical machines :-/
>
>
It is not.
> I'm on qemu-kvm 0.11.0 with kernel modules from 2.6.31.6.
>
Should be recent enough.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
next prev parent reply other threads:[~2009-12-17 5:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 0:52 SIGTERM to qemu-kvm process destroys qcow2 image? Kenni Lund
2009-12-17 5:34 ` Avi Kivity [this message]
2009-12-17 9:38 ` Kenni Lund
2009-12-17 10:23 ` Avi Kivity
2009-12-17 10:52 ` Kevin Wolf
2009-12-18 14:13 ` Kenni Lund
2009-12-18 14:22 ` Avi Kivity
2009-12-18 14:30 ` Kevin Wolf
2009-12-18 14:35 ` Kenni Lund
2009-12-20 6:21 ` Avi Kivity
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=4B29C2EF.5010606@redhat.com \
--to=avi@redhat.com \
--cc=kenni@kelu.dk \
--cc=kvm@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).