KVM + partition-as-a-disk

Loïc Grenié loic.grenie at gmail.com
Thu Dec 3 08:23:05 UTC 2009


     Hi,

     I'm trying to use a partition of my laptop's (Dell E6500) hard-disk
  as the disk of a kvm virtual machine. I use

kvm -m 1200 -usbdevice tablet -hda /dev/sda7 -cdrom ubuntu.iso -boot d

  to start the virtual machine. It appears that some data written to
  the virtual /dev/sda does not go to the real /dev/sda7. More precisely,
  I've tried to execute the following in the virtual machine:

dd if=/dev/zero of=/dev/sda bs=1M

  and then (after completion of the write on the virtual machine)

cmp /dev/sda7 /dev/zero

  on the real machine. After 4GB, there starts to be non-zero bytes
  (precisely the problem appeared at 4294999552=4GB+32768-512
  on the first try and around the same byte, maybe slightly after on
  second try). Between 4GB and 7GB the bytes on the partition are
  nearly all 0. After the 7GB mark, the bytes are "random". It's not
  a cache problem: the bytes are exactly the same on the virtual
  machine...

    Is there a known problem for that kind of configuration ?

      Thanks,

            Loïc




More information about the ubuntu-users mailing list