Skip to contentSkip to conversation

qemu does not accept regular disk geometry

Qemu-devel Hadmut Danisch 2 participants 5 messages Aug 4, 2010 – Feb 7, 2017

lore
Share & tools
lore
#0 lore raw

Public bug reported:

Hi,

I am currently hunting a strange bug in qemu/kvm:

I am using an lvm logical volume as a virtual hard disk for a virtual machine.

I use fdisk or parted to create a partition table and partitions, kpartx to generate the device entries for the partitions, then install linux on ext3/ext4 with grub or msdos filesystem with syslinux.

But then, in most cases even the boot process fails or behaves strangely, sometimes even mounting the file system in the virtual machine fails. It seems as if there is a problem with the virtual disk geometry. The problem does not seem to occur if I reboot the host system after creating the partition table on the logical volume. I guess the linux kernel needs to learn the disk geometry by reboot. A blkdev --rereadpt does not work on lvm volumes.

The first approach to test/fix the problem would be to pass the disk geometry to qemu/lvm with the -drive option. Unfortunately, qemu/kvm does not accept the default geometry with 255 heads and 63 sectors. Seems to limit the number of heads to 16, thus limiting the disk size.

** Affects: qemu
Importance: Undecided
Status: New

Signature · 19 lines
qemu does not accept regular disk geometry
https://bugs.launchpad.net/bugs/613529
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
Hi, 

I am currently hunting a strange bug in qemu/kvm:

I am using an lvm logical volume as a virtual hard disk for a virtual machine. 

I use fdisk or parted to create a partition table and partitions, kpartx to generate the device entries for the partitions, then install linux on ext3/ext4 with grub or msdos filesystem with syslinux. 

But then, in most cases even the boot process fails or behaves strangely, sometimes even mounting the file system in the virtual machine fails. It seems as if there is a problem with the virtual disk geometry. The problem does not seem to occur if I reboot the host system after creating the partition table on the logical volume. I guess the linux kernel needs to learn the disk geometry by reboot. A blkdev --rereadpt does not work on lvm volumes. 

The first approach to test/fix the problem would be to pass the disk geometry to qemu/lvm with the -drive option. Unfortunately, qemu/kvm does not accept the default geometry with 255 heads and 63 sectors. Seems to limit the number of heads to 16, thus limiting the disk size.
#1 lore raw

Seems to be the same issue as in
http://qemu-forum.ipi.fi/viewtopic.php?f=4&t=5218

Signature · 19 lines
qemu does not accept regular disk geometry
https://bugs.launchpad.net/bugs/613529
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
Hi, 

I am currently hunting a strange bug in qemu/kvm:

I am using an lvm logical volume as a virtual hard disk for a virtual machine. 

I use fdisk or parted to create a partition table and partitions, kpartx to generate the device entries for the partitions, then install linux on ext3/ext4 with grub or msdos filesystem with syslinux. 

But then, in most cases even the boot process fails or behaves strangely, sometimes even mounting the file system in the virtual machine fails. It seems as if there is a problem with the virtual disk geometry. The problem does not seem to occur if I reboot the host system after creating the partition table on the logical volume. I guess the linux kernel needs to learn the disk geometry by reboot. A blkdev --rereadpt does not work on lvm volumes. 

The first approach to test/fix the problem would be to pass the disk geometry to qemu/lvm with the -drive option. Unfortunately, qemu/kvm does not accept the default geometry with 255 heads and 63 sectors. Seems to limit the number of heads to 16, thus limiting the disk size.
#2 lore raw
In reply to Hadmut Danisch

has been (orally) confirmed by other users.

It is effectively impossible to reliably install a system on an lvm logical device and run it under kvm/qemu

Signature · 19 lines
qemu does not accept regular disk geometry
https://bugs.launchpad.net/bugs/613529
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
Hi, 

I am currently hunting a strange bug in qemu/kvm:

I am using an lvm logical volume as a virtual hard disk for a virtual machine. 

I use fdisk or parted to create a partition table and partitions, kpartx to generate the device entries for the partitions, then install linux on ext3/ext4 with grub or msdos filesystem with syslinux. 

But then, in most cases even the boot process fails or behaves strangely, sometimes even mounting the file system in the virtual machine fails. It seems as if there is a problem with the virtual disk geometry. The problem does not seem to occur if I reboot the host system after creating the partition table on the logical volume. I guess the linux kernel needs to learn the disk geometry by reboot. A blkdev --rereadpt does not work on lvm volumes. 

The first approach to test/fix the problem would be to pass the disk geometry to qemu/lvm with the -drive option. Unfortunately, qemu/kvm does not accept the default geometry with 255 heads and 63 sectors. Seems to limit the number of heads to 16, thus limiting the disk size.
#3 lore raw
In reply to Hadmut Danisch

Which version of QEMU have you been using for your tests? Can you still reproduce this problem with the latest version of QEMU?

** Changed in: qemu
Status: New => Incomplete

Signature · 37 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/613529

Title:
  qemu does not accept regular disk geometry

Status in QEMU:
  Incomplete

Bug description:
  Hi,

  I am currently hunting a strange bug in qemu/kvm:

  I am using an lvm logical volume as a virtual hard disk for a virtual
  machine.

  I use fdisk or parted to create a partition table and partitions,
  kpartx to generate the device entries for the partitions, then install
  linux on ext3/ext4 with grub or msdos filesystem with syslinux.

  But then, in most cases even the boot process fails or behaves
  strangely, sometimes even mounting the file system in the virtual
  machine fails. It seems as if there is a problem with the virtual disk
  geometry. The problem does not seem to occur if I reboot the host
  system after creating the partition table on the logical volume. I
  guess the linux kernel needs to learn the disk geometry by reboot. A
  blkdev --rereadpt does not work on lvm volumes.

  The first approach to test/fix the problem would be to pass the disk
  geometry to qemu/lvm with the -drive option. Unfortunately, qemu/kvm
  does not accept the default geometry with 255 heads and 63 sectors.
  Seems to limit the number of heads to 16, thus limiting the disk size.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/613529/+subscriptions
#4 lore raw
In reply to Hadmut Danisch

[Expired for QEMU because there has been no activity for 60 days.]

** Changed in: qemu
Status: Incomplete => Expired

Signature · 37 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/613529

Title:
  qemu does not accept regular disk geometry

Status in QEMU:
  Expired

Bug description:
  Hi,

  I am currently hunting a strange bug in qemu/kvm:

  I am using an lvm logical volume as a virtual hard disk for a virtual
  machine.

  I use fdisk or parted to create a partition table and partitions,
  kpartx to generate the device entries for the partitions, then install
  linux on ext3/ext4 with grub or msdos filesystem with syslinux.

  But then, in most cases even the boot process fails or behaves
  strangely, sometimes even mounting the file system in the virtual
  machine fails. It seems as if there is a problem with the virtual disk
  geometry. The problem does not seem to occur if I reboot the host
  system after creating the partition table on the logical volume. I
  guess the linux kernel needs to learn the disk geometry by reboot. A
  blkdev --rereadpt does not work on lvm volumes.

  The first approach to test/fix the problem would be to pass the disk
  geometry to qemu/lvm with the -drive option. Unfortunately, qemu/kvm
  does not accept the default geometry with 255 heads and 63 sectors.
  Seems to limit the number of heads to 16, thus limiting the disk size.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/613529/+subscriptions