Bug 1664997 - Restrict floppy device to RHEL-7 machine types
Summary: Restrict floppy device to RHEL-7 machine types
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: 8.0
Assignee: Markus Armbruster
QA Contact: CongLi
URL:
Whiteboard:
Depends On:
Blocks: 1673106
TreeView+ depends on / blocked
 
Reported: 2019-01-10 08:51 UTC by Markus Armbruster
Modified: 2019-05-29 16:05 UTC (History)
18 users (show)

Fixed In Version: qemu-kvm-3.1.0-16.module+el8+2830+fab308bf
Doc Type: Removed functionality
Doc Text:
Not sure we need this one, but here goes anyway... Floppy devices are not available with pc-q35-rhel8.* machine types. For backward compatibility, they're still available with pc-*-rhel7.* machine types.
Clone Of:
: 1673106 (view as bug list)
Environment:
Last Closed: 2019-05-29 16:04:59 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1293 0 None None None 2019-05-29 16:05:20 UTC

Description Markus Armbruster 2019-01-10 08:51:07 UTC
Description of problem:
It's 2018, and we still provide a virtual floppy device for new virtual machines we intend to support for many, many years.

Maintaining the floppy device model in qemu-kvm has been expensive.  After VENOM (CVE-2015-3456), upstream suppressed the floppy controller for modern machine types by default (commit ea96bc629cb), because "It is Very annoying to carry forward an outdatEd coNtroller with a mOdern Machine type."  Users can still get floppy devices, but they have to ask for them.  This is a compromise that makes sense for upstream.

We tried to get rid of floppies in RHEL-7 (released in 2014), but ultimately failed, because RHEV could not move its Windows setup method from floppies to CD-ROMs in time.  If we had succeeded, we would've spared significant work and also embarrassment.

For backward compatibility, we need to continue to support floppies with RHEL-7 machine types.  However, supporting them with new machines makes no sense at all.

Version-Release number of selected component (if applicable):
qemu-kvm-3.1.0-3.el8

How reproducible:
Always

Steps to Reproduce:
1. Run qemu-kvm with RHEL-8 machine type:
$ qemu-kvm -nodefaults -display none -S -M pc-q35-rhel8.0.0 -monitor stdio -device isa-fdc
2. Check devices:
(qemu) info qtree

Actual results:
There is an isa-fdc device:
        bus: isa.0
          type ISA
          dev: isa-fdc, id ""

Expected results:
-device isa-fdc is rejected in step 1.

Alternate reproducer: replace -device isa-fdc by -drive if=floppy.

Additional info:
The isa-fdc device gets created when the user asks for it explicitly with -device isa-fdc or implicitly with -drive if=floppy.

The explicit way is pretty useless actually, because it creates only the floppy controller, and there is no way to connect floppy drives to it (commit 0533a6ee98f makes device "floppy" unavailable with -device).

Comment 1 Martin Tessun 2019-02-05 13:51:05 UTC
I believe floppies are currently used for the following tasks:
- Windows driver disks
- Windows sysprep information
- cloud-init data
- Kickstart information for RHEL

I believe all of these usecases could be replaced by an ISO instead.
@Michal: Do you agree? If we do this, we will need to change RHV 4.4 once we use RHEL8 based machine types. This would also remove the ISA driver from qemu completely.
@Erwan: Does RHOSP use floppies at all?

Comment 2 Erwan Gallen 2019-02-07 09:16:01 UTC
We are not using floppies for the default workloads but we have some remaining floppy devices references in OpenStack code:
https://github.com/openstack/nova/blob/master/nova/objects/fields.py (BlockDeviceType)
https://github.com/openstack/glance/blob/master/etc/metadefs/compute-libvirt-image.json (hw_rescue_device)
https://github.com/openstack/nova/blob/master/nova/tests/unit/virt/libvirt/test_blockinfo.py (testing)

We are starting an OpenStack upstream discussion, a bug has been created to track the status:
https://bugzilla.redhat.com/show_bug.cgi?id=1673106
We will look in detail if we have any Microsoft Windows dependencies.

Comment 3 Stephen Gordon 2019-02-08 23:23:02 UTC
Fabian I am assuming we are not using this in CNV today?

Comment 5 Fabian Deutsch 2019-02-11 09:26:46 UTC
Yes and no:
Yes, we are not using floppies - all high-level CNV features are not depending on floppy support.
No, we are providing a floppy API field - The KubeVirt API does currently support to attach an image as a floppy. But I've opened https://github.com/kubevirt/kubevirt/issues/2016 to get rid of the API field asap.

Comment 6 Michal Skrivanek 2019-02-11 13:20:28 UTC
RHV uses it for
- Windows driver disks
- Windows sysprep information
Work is tracked by bug 1306586. Should be ready before we get to a rhel 8 machine type

this is out of scope I suppose as RHV doesn't not have any integrated feature for that
- Kickstart information for RHEL

Comment 11 Danilo de Paula 2019-02-25 23:12:06 UTC
Fix included in qemu-kvm-3.1.0-16.module+el8+2830+fab308bf

Comment 13 CongLi 2019-03-04 04:58:01 UTC
Reproduced this bug on qemu-kvm-3.1.0-15.module+el8+2792+e33e01a0:
# /usr/libexec/qemu-kvm -nodefaults -display none -S -M pc-q35-rhel8.0.0 -monitor stdio -device isa-fdc
(qemu) info qtree
       bus: isa.0
          type ISA
          dev: isa-fdc, id ""

# /usr/libexec/qemu-kvm -nodefaults -display none -S -M pc-q35-rhel8.0.0 -monitor stdio -drive if=floppy
        bus: isa.0
          type ISA
          dev: isa-fdc, id ""

Verified this bug on qemu-kvm-3.1.0-18.module+el8+2834+fa8bb6e2.x86_64:
# /usr/libexec/qemu-kvm -nodefaults -display none -S -M pc-q35-rhel8.0.0 -monitor stdio -device isa-fdc
QEMU 3.1.0 monitor - type 'help' for more information
(qemu) qemu-kvm: -device isa-fdc: Device isa-fdc is not supported with machine type pc-q35-rhel8.0.0

# /usr/libexec/qemu-kvm -nodefaults -display none -S -M pc-q35-rhel8.0.0 -monitor stdio -drive if=floppy
QEMU 3.1.0 monitor - type 'help' for more information
(qemu) qemu-kvm: Initialization of device isa-fdc failed: Device isa-fdc is not supported with machine type pc-q35-rhel8.0.0


But there is still floppy info in manual with pc-q35-rhel8.0.0.
# /usr/libexec/qemu-kvm -M pc-q35-rhel8.0.0 -device ?
Storage devices:
name "floppy", bus floppy-bus, desc "virtual floppy drive"
name "isa-fdc", bus ISA

# /usr/libexec/qemu-kvm -M pc-q35-rhel8.0.0 -device isa-fdc,?
isa-fdc options:
  bootindexA=<int32>
  bootindexB=<int32>
  dma=<uint32>
  fdtypeB=<FdcDriveType> - FDC drive type, 144/288/120/none/auto
  fdtypeA=<FdcDriveType> - FDC drive type, 144/288/120/none/auto
  check_media_rate=<bool> - on/off
  driveB=<str>           - Node name or ID of a block device to use as a backend
  iobase=<uint32>
  driveA=<str>           - Node name or ID of a block device to use as a backend
  irq=<uint32>
  fallback=<FdcDriveType> - FDC drive type, 144/288/120/none/auto


Hi Markus,

Could you please help confirm if floppy info should be removed from manual too ?

Thanks.

Comment 14 Markus Armbruster 2019-03-04 06:01:24 UTC
No, floppy information should remain.

Help printed by "-device help", "-device D,help", and its legacy forms with "?" instead of "help" completely ignores the machine type by design.  Making help more context-sensitive feels impractical given how things work.

The two floppy devices are still available with RHEL-7 machine types, and help duly shows them.

Aside: "?" is a shell meta-character.  It undergoes filename expansion unless quoted.  This can lead to massive confusion.  Best use "help".

Comment 15 CongLi 2019-03-04 06:11:23 UTC
(In reply to Markus Armbruster from comment #14)
> No, floppy information should remain.
> 
> Help printed by "-device help", "-device D,help", and its legacy forms with
> "?" instead of "help" completely ignores the machine type by design.  Making
> help more context-sensitive feels impractical given how things work.
> 
> The two floppy devices are still available with RHEL-7 machine types, and
> help duly shows them.
> 
> Aside: "?" is a shell meta-character.  It undergoes filename expansion
> unless quoted.  This can lead to massive confusion.  Best use "help".


Thanks Markus for explaining the details.

Based on comment 13 and comment 14, verified this bug.

Thanks.

Comment 17 errata-xmlrpc 2019-05-29 16:04:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1293


Note You need to log in before you can comment on or make changes to this bug.