Comment 2 for bug 613619

Revision history for this message
Hadmut Danisch (hadmut) wrote : Re: qem/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
http://ubuntuforums.org/showthread.php?t=1425421

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.