arm64/qemu: Fails to detect ISO image attached to QEMU via -cdrom
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
debian-installer (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
While the installer will boot in the QEMU virt model when an Ubuntu Server ISO is attached via QEMU's -cdrom parameter, the installer will fail at the "Detect and mount CD-ROM" step. This appears to be because the -cdrom parameter in QEMU emulates what looks to be a disk to the VM (virtio block device), and not a CD-ROM.
One reason for this is that the virtio-blk module is missing from the installer. It is in the block-modules udeb, so we could easily add it. Though this will allow the block device to appear in the installer environment, it is not sufficient.
cdrom-detect calls 'list-devices cd' to scan for available CDs, which in turn calls 'udevadm info' on each device to look for ID_CDROM= attributes. But, virtio-blk devices do not have this attribute.
I suspect that -cdrom on for qemu-system-x86 actually emulates a cdrom in the guest instead of a disk, so this isn't an issue for QEMU installs on x86. It is arguably a QEMU bug that this is different on arm64 and, perhaps, -cdrom on arm64 should be changed to emulate an actual CDROM (like can be done w/ a virtio-
I'm not sure what the correct way to fix this is. Should we even be supporting this in the cdrom build, or should we be building an hd-media image for arm64, and does that somehow need to be integrate on the server ISO? How does this work, say, for x86 in the case where you dd an ISO to a usb stick?
Meanwhile, a workaround for this is to attach the device as a virtio-scsi-device, as shown here:
https:/
Here's a slightly modified test case from Ciro Santilli of ARM.