avocado-vt icon indicating copy to clipboard operation
avocado-vt copied to clipboard

Outdated floppy device

Open pevogam opened this issue 2 years ago • 3 comments

It seems that some of the newest Qemu versions (here tested 6.1.0) have problem installing Windows machines or in general running unattended install tests with floppy drives:

[stdlog] 2022-06-18 12:43:01,247 client           L0606 INFO | [qemu output] qemu-system-x86_64: can't apply global isa-fdc.driveA=drive_fl: Property 'isa-fdc.driveA' not found

Background might be the following deprecation:

https://www.mail-archive.com/[email protected]/msg68098.html

Looking at the Avocado VT source code, I can find these floppy bus classes (QFloppyBus and and even older QOldFloppyBus):

class QFloppyBus(QDenseBus):

    """
    Floppy bus (-global isa-fdc.drive?=$drive)
    """

So it might be that I am missing something but can we use the new -device floppy,unit=1,drive=... in some way instead of the old -global isa-fdc.driveA=...?

@PaulYuuu @chunfuwen @luckyh What do you think?

pevogam avatar Jun 20 '22 05:06 pevogam

@pevogam, good point. Actually I never test floppy devices, but if it was introduced very early, I think we can re-design this part directly. Replace it to use QPCIBus should not a big task.

PaulYuuu avatar Jun 24 '22 09:06 PaulYuuu

@pevogam, good point. Actually I never test floppy devices, but if it was introduced very early, I think we can re-design this part directly. Replace it to use QPCIBus should not a big task.

I guess what is a bit more elaborate is to keep backward compatibility with older Qemu versions too, not sure what is the current Qemu version that most Avocado VT members are using.

pevogam avatar Jun 28 '22 02:06 pevogam

I guess what is a bit more elaborate is to keep backward compatibility with older Qemu versions too, not sure what is the current Qemu version that most Avocado VT members are using.

It seems to be easy to support both together with the capabilities utility. Let me take the command line expression of virtual block devices as an example, legacy qemu would use -drive to represent image files while modern qemu would use -blockdev instead, therefore we had the following code snippets to probe the capability and choose the most appropriate expression to format the command line. I think we can apply a similar flow for floppy devices as well.

https://github.com/avocado-framework/avocado-vt/blob/8d98e23d8ad7451e77d45a915106dd5a2184b6ad/virttest/qemu_devices/qcontainer.py#L278-L283 https://github.com/avocado-framework/avocado-vt/blob/8d98e23d8ad7451e77d45a915106dd5a2184b6ad/virttest/qemu_devices/qcontainer.py#L2076-L2144

luckyh avatar Jun 28 '22 04:06 luckyh

Closing via #3719.

pevogam avatar Aug 22 '23 18:08 pevogam