Skip to contentSkip to conversation

virtio cdrom detected as hard disk

Qemu-devel Serge Hallyn 4 participants 11 messages Mar 16, 2013 – Mar 18, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

I see, misunderstood.

Reproduced with latest git://git.qemu.org/qemu.git as well, so marked as affecting upstream QEMU project.

** Also affects: qemu
Importance: Undecided
Status: New

Signature · 21 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/1155403

Title:
  virtio cdrom detected as hard disk

Status in QEMU:
  New
Status in “qemu” package in Ubuntu:
  Confirmed

Bug description:
  Trying to install Ubuntu or Debian using virtio to emulate the cdrom
  fails.  This appears to be due to the drive appearing to be a hard
  disk, rather than a cdrom, despite the media=cdrom argument to qemu.

  I'm not sure if this is a bug in qemu, or the kernel virtio driver?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1155403/+subscriptions
#2 lore raw
In reply to a message not in the archive

There's no such thing as a virtio-blk CD-ROM, only hard-disks. For installation it shouldn't matter, since .iso images usually can work also as hard-disk images (for putting them on a USB stick).

If you want to test installation from a "real" virtio CD-ROM, use virtio-scsi:

-drive file=/path/to/file.iso,if=none,id=cd -device virtio-scsi-pci -device scsi-cd,drive=cd

or

-drive file=/path/to/file.iso,if=none,media=cdrom,id=cd -device virtio- scsi-pci -device scsi-disk,drive=cd

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

** Changed in: qemu (Ubuntu)
Status: Confirmed => Invalid

Signature · 21 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/1155403

Title:
  virtio cdrom detected as hard disk

Status in QEMU:
  Invalid
Status in “qemu” package in Ubuntu:
  Invalid

Bug description:
  Trying to install Ubuntu or Debian using virtio to emulate the cdrom
  fails.  This appears to be due to the drive appearing to be a hard
  disk, rather than a cdrom, despite the media=cdrom argument to qemu.

  I'm not sure if this is a bug in qemu, or the kernel virtio driver?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1155403/+subscriptions
#3 lore raw
In reply to a message not in the archive

It seems the installer does not consider virtio devices when doing its search. It also seems the installer does not have the virtio-scsi module, and it seems a bit wasteful to go through a layer of scsi emulation.

Shouldn't qemu at least warn you that the media=argument does nothing on virtio devices instead of silently ignoring it? Or better yet, shouldn't it automatically use virtio-scsi instead?

Signature · 21 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/1155403

Title:
  virtio cdrom detected as hard disk

Status in QEMU:
  Invalid
Status in “qemu” package in Ubuntu:
  Invalid

Bug description:
  Trying to install Ubuntu or Debian using virtio to emulate the cdrom
  fails.  This appears to be due to the drive appearing to be a hard
  disk, rather than a cdrom, despite the media=cdrom argument to qemu.

  I'm not sure if this is a bug in qemu, or the kernel virtio driver?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1155403/+subscriptions
#4 lore raw
Quoted 4 lines · Phillip Susi

It seems the installer does not consider virtio devices when doing its search. It also seems the installer does not have the virtio-scsi module, and it seems a bit wasteful to go through a layer of scsi emulation.

virtio-scsi performs just fine.

Quoted 3 lines

Shouldn't qemu at least warn you that the media=argument does nothing on virtio devices instead of silently ignoring it? Or better yet, shouldn't it automatically use virtio-scsi instead?

Incompatible changes. Doesn't mean we can't make them ever, only we better be careful.

If we make incompatible changes to if=virtio, we might be better off going all the way and switching it over to virtio-scsi wholesale.

#5 lore raw
In reply to a message not in the archive

Consider filing a Debian/Ubuntu bug so that their initramfs / installer / live disk comes with virtio-scsi. See eg.
https://bugzilla.redhat.com/show_bug.cgi?id=864012

** Bug watch added: Red Hat Bugzilla #864012
https://bugzilla.redhat.com/show_bug.cgi?id=864012

Signature · 21 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/1155403

Title:
  virtio cdrom detected as hard disk

Status in QEMU:
  Invalid
Status in “qemu” package in Ubuntu:
  Invalid

Bug description:
  Trying to install Ubuntu or Debian using virtio to emulate the cdrom
  fails.  This appears to be due to the drive appearing to be a hard
  disk, rather than a cdrom, despite the media=cdrom argument to qemu.

  I'm not sure if this is a bug in qemu, or the kernel virtio driver?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1155403/+subscriptions
#6 lore raw
In reply to a message not in the archive
Quoted 1 line

It seems the installer does not consider virtio devices when doing its

search.

That's another bug in the installer then.

Quoted 1 line

it seems a bit wasteful to go through a layer of scsi emulation.

Indeed treating the virtio disk similarly to installation from a USB stick is better, but SCSI emulation is actually a very good way to not reinvent the wheel. CD-ROM/DVD-ROM media need a lot of magic (such as subdivision of the medium into tracks, different media formats, etc.) and emulating those in virtio-blk would be even more wasteful.

Quoted 2 lines

Shouldn't qemu at least warn you that the media=argument does nothing on virtio devices instead of silently ignoring it?

Yes, that's a legitimate request.

Quoted 1 line

Or better yet, shouldn't it automatically use virtio-scsi instead?

No, virtio-scsi is relatively new and not all distros have picked it up yet.

Signature · 21 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/1155403

Title:
  virtio cdrom detected as hard disk

Status in QEMU:
  Invalid
Status in “qemu” package in Ubuntu:
  Invalid

Bug description:
  Trying to install Ubuntu or Debian using virtio to emulate the cdrom
  fails.  This appears to be due to the drive appearing to be a hard
  disk, rather than a cdrom, despite the media=cdrom argument to qemu.

  I'm not sure if this is a bug in qemu, or the kernel virtio driver?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1155403/+subscriptions
#7 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Paolo Bonzini
Quoted 2 lines

Or better yet, shouldn't it automatically use virtio-scsi instead?

No, virtio-scsi is relatively new and not all distros have picked it up yet.

And not all distros ship hybrid cd images that their installers are happy with on virtio. Given that either one may or may not work, I think it best to honor the user's request and emulate the cd.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRRyMqAAoJEJrBOlT6nu75oS0H+gKIa82bhNHecAmiBHk2AWxR KqoJRyPffR2BKjjgVgGqLciIBW7ltNkP8Dbqg8I7E7eHtNMX1z5dNScbmMXCHkrM Hbvh/op6fvtFn0x6K+OwIkE8/Sm0AhqgIWdv2FnfR9rRRHxlz99R26Gq/qPJqZD9 Pleo6MhgjDBftGbxwJd3hlzSA5Yw5Q90SC1o2rOwi3KLDMm7zRHmMj/Tm/ScflyJ Ujo+H09tqUsm5VXsLtDsgfnUDxE42CQrczSeS0/c7+4mTPNvulwxoqisztbcY1xI O9F+JC5fz4yoDVX5rz97rN8HSHsLeCV1v6k5f9cD1TjzgqSRKRjyAIItor8Bw44= =Mwf8
-----END PGP SIGNATURE-----

Signature · 21 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/1155403

Title:
  virtio cdrom detected as hard disk

Status in QEMU:
  Invalid
Status in “qemu” package in Ubuntu:
  Invalid

Bug description:
  Trying to install Ubuntu or Debian using virtio to emulate the cdrom
  fails.  This appears to be due to the drive appearing to be a hard
  disk, rather than a cdrom, despite the media=cdrom argument to qemu.

  I'm not sure if this is a bug in qemu, or the kernel virtio driver?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1155403/+subscriptions
#8 lore raw
In reply to a message not in the archive

if=virtio means virtio-blk, not virtio-something.

Also, Linux is perfectly fine with ISO images on virtio, the Ubuntu installer is wrong in not scanning virtio disks. Since Ubuntu wouldn't work either way, they should first fix the installer and then we can re- evaluate if QEMU can do something (probably not, except warning for media=cdrom).

** Also affects: debian-installer (Ubuntu)
Importance: Undecided
Status: New

Signature · 23 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/1155403

Title:
  virtio cdrom detected as hard disk

Status in QEMU:
  Invalid
Status in “debian-installer” package in Ubuntu:
  New
Status in “qemu” package in Ubuntu:
  Invalid

Bug description:
  Trying to install Ubuntu or Debian using virtio to emulate the cdrom
  fails.  This appears to be due to the drive appearing to be a hard
  disk, rather than a cdrom, despite the media=cdrom argument to qemu.

  I'm not sure if this is a bug in qemu, or the kernel virtio driver?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1155403/+subscriptions
#9 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 1 line · Paolo Bonzini

if=virtio means virtio-blk, not virtio-something.

Why do you say that? I would say that virtio means use paravirtualized IO rather than emulating some real hardware. Whether that ends up being done with virtio-blk, or virtio-scsi is an implementation detail. The media argument seems a perfectly natural way to select between the two.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRR0hBAAoJEJrBOlT6nu758/YH/3zkuv+yQuyqVzk98wWGCy6V gQOvYyir86but7EmbO/VoY4i+0Oyza3II/qKFeqW4KnIjQ7aS1sJSUsXGU1Wxjoa lxF9zKYM3A7XRIpgnSrIwIL5CvNDZ+zohhiL5sWEp0NVr+fxqSIwFFxpkAb8K5Yi EZWYmg3bwbCw2Ac5qqIs79j7VvPZfeSpwujlOG/frLwF5tjF73JkvkCOIpqYXaEc 3cDAdsdFofQ/Q7xUy58GStbswUXw9lqkIGJTi7xC8PHqCMq0TKOTw8FDgdmyJ+f9 k8+PkwbhqoZL+5N7ZmVCqj/Zo1Sq0p/QYUx4jBO4Ok6bTNZKnTDbcXo5O2Fg4ss= =Gv0p
-----END PGP SIGNATURE-----

Signature · 23 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/1155403

Title:
  virtio cdrom detected as hard disk

Status in QEMU:
  Invalid
Status in “debian-installer” package in Ubuntu:
  New
Status in “qemu” package in Ubuntu:
  Invalid

Bug description:
  Trying to install Ubuntu or Debian using virtio to emulate the cdrom
  fails.  This appears to be due to the drive appearing to be a hard
  disk, rather than a cdrom, despite the media=cdrom argument to qemu.

  I'm not sure if this is a bug in qemu, or the kernel virtio driver?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1155403/+subscriptions
#10 lore raw
Quoted 7 lines · Phillip Susi
Quoted 1 line · Paolo Bonzini

if=virtio means virtio-blk, not virtio-something.

Why do you say that? I would say that virtio means use paravirtualized IO rather than emulating some real hardware. Whether that ends up being done with virtio-blk, or virtio-scsi is an implementation detail.

Not really, because the "detail" requires different drivers in the guest.

Quoted 2 lines

The media argument seems a perfectly natural
way to select between the two.

"Perfectly natural"? Me thinks you're overstating your case. Having "media=cdrom" select virtio-scsi over virtio-blk is at best a hack. virtio-scsi vs. virtio-blk is *not* about disk vs. CD-ROM. It's about two different mass storage controllers, one of whom happens not to support CD-ROMs today.

#11 lore raw
In reply to a message not in the archive
Quoted 2 lines

The media argument seems a perfectly natural
way to select between the two.

Then how do you distinguish between a virtio-scsi and a virtio-blk hard disk? These may even require changes to the guest, since one becomes /dev/vda and the other becomes /dev/sda.

virtio-scsi will grow more and more functionality, while virtio-blk will likely remain a secondary choice for performance or backwards- compatibility.

Signature · 23 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/1155403

Title:
  virtio cdrom detected as hard disk

Status in QEMU:
  Invalid
Status in “debian-installer” package in Ubuntu:
  New
Status in “qemu” package in Ubuntu:
  Invalid

Bug description:
  Trying to install Ubuntu or Debian using virtio to emulate the cdrom
  fails.  This appears to be due to the drive appearing to be a hard
  disk, rather than a cdrom, despite the media=cdrom argument to qemu.

  I'm not sure if this is a bug in qemu, or the kernel virtio driver?

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