qemu-kvm misinterprets LVM volume geometry
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu-kvm (Ubuntu) |
Expired
|
Medium
|
Unassigned |
Bug Description
Binary package hint: qemu-kvm
Hi,
when running qemu/kvm with kvm logical volumes as virtual disks, there's a severe problem, maybe with disk geometry.
When partitioning the lvm volume with fdisk or parted, generating the partition device entries with kpartx, creating filesystems (ext3, fat16,..) and installing a linux with debootstrap, there's quite often the problem that the virtual machine then has problems accessing the virtual disk, resulting in read errors (usually misinterpreting dos filesystems, beeing unable to mount or fsck an ext3 and so on).
Looks like the same problem as reported on http://
Sometimes the problem did not occur when I use fdisk in dos compatibilty mode and/or rebooting the host after creating the partition table.
Maybe that's a problem of disk geometry. Linux does not maintain a disk geometry for LVM volumes, so most tools like partition and filesystem generation tools use a default geometry of 255 heads and 63 sectors. On the other hand, the -drive option of qemu/kvm does not accept this geometry. The number of heads seems to be limited to 16. This is a severe problem since it can crash virtual machines and destroy data.
regards
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: qemu (not installed)
ProcVersionSign
Uname: Linux 2.6.32-24-generic i686
Architecture: i386
Date: Wed Aug 4 22:21:59 2010
KvmCmdLine: Error: command ['ps', '-C', 'kvm', '-F'] failed with exit code 1: UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
MachineType: TOSHIBA Satellite L300
ProcCmdLine: BOOT_IMAGE=
ProcEnviron:
PATH=(custom, user)
LANG=de_DE.utf8
SHELL=/bin/tcsh
SourcePackage: qemu-kvm
dmi.bios.date: 03/19/2008
dmi.bios.vendor: INSYDE
dmi.bios.version: 1.30
dmi.board.
dmi.board.name: Base Board Product Name
dmi.board.vendor: Intel Corp.
dmi.board.version: Base Board Version
dmi.chassis.
dmi.chassis.type: 1
dmi.chassis.vendor: Chassis Manufacturer
dmi.chassis.
dmi.modalias: dmi:bvnINSYDE:
dmi.product.name: Satellite L300
dmi.product.
dmi.sys.vendor: TOSHIBA
Changed in qemu-kvm (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
summary: |
- qem/kvm misinterprets LVM volume geometry + qemu-kvm misinterprets LVM volume geometry |
Here are some discussions where I found problems mentioned that seem to be the same or closely related problem:
http:// www.howtoforge. com/forums/ archive/ index.php/ t-30329. html ubuntuforums. org/showthread. php?t=1425421
http://
I am not sure yet what exactly the reason is, but I experienced similar problems on several hosts, both with kvm and qemu. You can install a system on a partitioned lvm volume from the host, but once you boot it, the virtual machine can't mount it (or generates rubbish like reading files that have been deleted under FAT16).
Interestingly one of the commenters in the ubuntu discussion above mentioned that it worked when leaving space at the beginning of the lvm. I once tried to convert a regular ubuntu machine into an almost identical virtual copy for backup reasons. I first used fdisk -c with -u command (which results in different positions for the partitions), and when I bootet that virtual machine, it could mount only the first two partitions, but then ran into severe trouble when trying to mount the third filesystem (beeing unable to display file permissions or contents and such things). When I repeated everything with a regular old-fashioned fdisk (without -c and -u) it worked. But that was obviously some luck, since repeating this with lvm volumes of different size was not possible.
For some reason the virtual disk looks somehow different from inside (virtual machine) than from outside (host), and it might be related to the the beginning of the lvm volume.