2020-07-30 00:08:26 +02:00
|
|
|
References: bsc#1174176, bsc#1174139
|
|
|
|
Current libxl does not support adding a floppy. Code is included
|
|
|
|
in this patch anyways to correctly set up a bus if a floppy were
|
|
|
|
added.
|
|
|
|
|
|
|
|
|
2022-11-04 18:04:31 +01:00
|
|
|
Index: virt-manager-4.1.0/virtManager/addhardware.py
|
2020-07-30 00:08:26 +02:00
|
|
|
===================================================================
|
2022-11-04 18:04:31 +01:00
|
|
|
--- virt-manager-4.1.0.orig/virtManager/addhardware.py
|
|
|
|
+++ virt-manager-4.1.0/virtManager/addhardware.py
|
|
|
|
@@ -490,6 +490,9 @@ class vmmAddHardware(vmmGObjectUI):
|
2020-07-30 00:08:26 +02:00
|
|
|
buses = domcaps.devices.disk.get_enum("bus").get_values()
|
|
|
|
else:
|
|
|
|
buses = vmmAddHardware.disk_old_recommended_buses(guest)
|
|
|
|
+ # libxl doesn't support floppy but request one from qemu anyways if specified
|
|
|
|
+ if guest.conn.is_xen() and devtype == "floppy":
|
|
|
|
+ buses.append("fdc")
|
|
|
|
|
|
|
|
bus_map = {
|
|
|
|
"disk": ["ide", "sata", "scsi", "sd", "usb", "virtio", "xen"],
|
2022-11-04 18:04:31 +01:00
|
|
|
@@ -509,6 +512,7 @@ class vmmAddHardware(vmmGObjectUI):
|
2020-09-16 19:23:41 +02:00
|
|
|
"usb": _("USB"),
|
|
|
|
"virtio": _("VirtIO"),
|
|
|
|
"xen": _("Xen"),
|
|
|
|
+ "fdc": _("FDC"),
|
|
|
|
}
|
|
|
|
return bus_mappings.get(bus, bus)
|
2020-07-30 00:08:26 +02:00
|
|
|
|
2022-11-04 18:04:31 +01:00
|
|
|
@@ -676,8 +680,9 @@ class vmmAddHardware(vmmGObjectUI):
|
2020-07-30 00:08:26 +02:00
|
|
|
"drive-harddisk", _("Disk device")])
|
|
|
|
target_model.append([DeviceDisk.DEVICE_CDROM,
|
|
|
|
"media-optical", _("CDROM device")])
|
|
|
|
- target_model.append([DeviceDisk.DEVICE_FLOPPY,
|
|
|
|
- "media-floppy", _("Floppy device")])
|
|
|
|
+ if not self.conn.is_xen():
|
|
|
|
+ target_model.append([DeviceDisk.DEVICE_FLOPPY,
|
|
|
|
+ "media-floppy", _("Floppy device")])
|
|
|
|
if self.conn.is_qemu() or self.conn.is_test():
|
|
|
|
target_model.append([DeviceDisk.DEVICE_LUN,
|
|
|
|
"drive-harddisk", _("LUN Passthrough")])
|