-
Notifications
You must be signed in to change notification settings - Fork 778
Ask QEMU for virtio-scsi instead of virtio-scsi-pci #4406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| "-drive", "id=cdrom0,if=none,format=raw,readonly=on,file="+filepath.Join(cfg.InstanceDir, filenames.CIDataISO), | ||
| "-device", "virtio-scsi-pci,id=scsi0", | ||
| "-device", "virtio-scsi,id=scsi0", | ||
| "-device", "scsi-cd,bus=scsi0.0,drive=cdrom0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need scsi cdrom?
We can use virtio:
-drive file=cidata.iso,media=cdrom,if=virtio
Or just:
-cdrom cidata.iso
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no preferences what-so-ever. @AkihiroSuda / @afbjorklund What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends on the distribution, I think. And it seems unrelated to this change, with a more portable device.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I recall correctly, it was the matter of /dev/hda vs /dev/sda vs /dev/vda and matching kernel support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC -cdrom is highly arch/machine specific, using IDE on x86(_64), virtio-blk on aarch64 and s390x, spapr-vscsi on ppc64, ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could probably do the same for others, not needed to hardcode "pci" like that.
name "virtio-9p-pci", bus PCI, alias "virtio-9p"
name "virtio-blk-pci", bus PCI, alias "virtio-blk"
name "virtio-scsi-pci", bus PCI, alias "virtio-scsi"
name "virtio-net-pci", bus PCI, alias "virtio-net"
name "virtio-input-host-pci", bus PCI, alias "virtio-input-host"
name "virtio-keyboard-pci", bus PCI, alias "virtio-keyboard"
name "virtio-mouse-pci", bus PCI, alias "virtio-mouse"
name "virtio-serial-pci", bus PCI, alias "virtio-serial"
name "virtio-tablet-pci", bus PCI, alias "virtio-tablet"
name "virtio-gpu-pci", bus PCI, alias "virtio-gpu"
name "virtio-balloon-pci", bus PCI, alias "virtio-balloon"
name "virtio-rng-pci", bus PCI, alias "virtio-rng"
I don't know what to do next now. Should we attempt to drop the "pci" in other places, or wait until it becomes an issue. And should I try to use |
|
I would do a minimal fix for 2.0.3 - just change virtio-scsi-pci to virtio-scsi - it this works on x86 and s390x we are fine. Another option, use virtio-scsi-pci in x86 and virtio-scsi-ccw on s390x. Then open an issue to simplify qemu configuration. I think we should be able to use virtio for everything - this is the most efficient way since virtio is designed to handle virtual devices. Using SCSI or other interfaces is needed only if you have special requirement and unlikely to be need in lima use case. We can ask about it in qemu-discuss or check with qemu folks in SUSE/Red Hat. |
|
I also think you don't need to do anything more here, I was just making an idle comment that most have aliases. |
|
Since all tests are passing and it enables Leap 16 on s390x, I guess I'll merge as-is. Reading the cidata is not really a performance-critical part, so if no other problems are known, maybe this is good enough. I'm going to remove the comment about the s390x image not working from the template though. |
This allows QEMU to pick the specific driver itself. E.g. OpenSUSE Leap 16 for s390x does not have virtio-scsi-pci but does support virtio-scsi-ccw. Signed-off-by: Jan Dubois <jan.dubois@suse.com>
15341f3 to
46465d3
Compare
This allows QEMU to pick the specific driver itself. E.g. OpenSUSE Leap 16 for s390x does not have virtio-scsi-pci but does support virtio-scsi-ccw:
Ref: #4203 (comment)
Ref: https://bugzilla.suse.com/show_bug.cgi?id=1252096#c10