All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yaniv Kaul <ykaul@redhat.com>
To: Jon Watte <jwatte@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: kvm on Ubuntu 8.04 running windows xp sp3: corrupts file system on 	shutdown?
Date: Thu, 02 Jul 2009 18:53:25 +0300	[thread overview]
Message-ID: <4A4CD7F5.6020603@redhat.com> (raw)
In-Reply-To: <c7bcbd620907020850o31f3de23y8504f249022ac66c@mail.gmail.com>

On 7/2/2009 6:50 PM, Jon Watte wrote:
> I'm attempting to set up a Windows XP virtual machine using KVM
> running on 8.04 LTS x64 or a Core 2 Duo (6550). I have updated all
> installed packages to the latest available as of a week ago. This is
> KVM version 0.9.1 (kvm-62) on a kernel version 2.6.24-22-server.
>    
I warmly suggest updating to a later, much newer, KVM version. 
Specifically qcow2 format had corruption bugs similar to what described 
below.
Y.

> I'm creating a 20 GB hard disk image with qemu-img, (on a file system
> that is managed by LVM, and in turn backed by a md0 soft mirror) and
> then starting the VM as follows:
>
> #!/bin/sh
> cd /var/kvm/wxp_build
> kvm -m 1024M \
> -hda wxp_build.img \
> -usb -usbdevice tablet \
> -vnc :1 \
> -localtime \
> -net nic,model=virtio -net user \
> -redir tcp:5555::5555 \
> -daemonize \
> $*
>
> When I install, I pass "-cdrom ../cdrom/wxp_sp3_installer.iso -boot d"
> to boot from the Windows install CD. The reboot as part of the install
> does not take down the VM, and does not cause any problems.
>
> I can go through install just fine. I format the 20 GB image as NTFS,
> using slow format (not quick format).
>
> I can download and install other things fine, too. However, when I
> shut down the virtual machine (using the Windows Shut Down command),
> and wait for the VNC connection to end, the (virtual) hard disk seems
> to get corrupt. When I boot again, one of three things happen:
>
> 1) The boot fails, because some necessary file has gotten corrupted.
>
> 2) The boot succeeds, but when I attempt to run something that I
> installed that worked fine before the shutdown, it doesn't work after
> the shutdown, with missing DLL errors or similar.
>
> 3) The boot kicks into CHKDSK, which finds tons and tons of NTFS file
> system corruption on the virtual hard disk image.
>
> I've tried with both qcow2 and raw disk images, with the same results.
>
> To my mind, it behaves as if the KVM process decides to exit as soon
> as the BIOS power-off signal comes, but the process keeps the hard
> disk write buffer in user-mode RAM, rather than immediately having
> passed it on to the kernel. Thus, when the process exits, whatever was
> buffered will not be committed to disk, and badness ensues. I'm not
> sure at all that this is what actually happens, but that's what it
> feels like. It could be some other kind of image corruption, too, but
> it's clearly related to actually powering off the virtual machine.
>
> Btw: the same corruption happens if I kill the KVM while it's running
> (rather than do a "clean" shut-down). It's slightly more
> understandable under that situation, but not really -- NTFS is a
> journaling file system, and never has those corruption issues on my
> "native" Windows machines, even during power fail.
>
> So... does anyone have a clue what could be causing this, and what I
> can do to fix it?
>
>
>
> --
> Americans might object: there is no way we would sacrifice our living
> standards for the benefit of people in the rest of the world.
> Nevertheless, whether we get there willingly or not, we shall soon
> have lower consumption rates, because our present rates are
> unsustainable.
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>    


  reply	other threads:[~2009-07-02 15:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 15:50 kvm on Ubuntu 8.04 running windows xp sp3: corrupts file system on shutdown? Jon Watte
2009-07-02 15:53 ` Yaniv Kaul [this message]
2009-07-02 16:15   ` Dustin Kirkland
2009-07-02 20:08     ` Jon Watte
2009-07-02 16:40   ` Jon Watte

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=4A4CD7F5.6020603@redhat.com \
    --to=ykaul@redhat.com \
    --cc=jwatte@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.