virt-manager/virtman-disallow-adding-floppy-disk.patch
Charles Arnold f88a913443 - jsc#SLE-16582, Upgrade virt-manager >= 3.x
* Slim down filesystem device editor UI
  * Fix TOCTTOU virt-install bugs (Martin Pitt)
  * Several other bug fixes
  virt-manager-3.2.0.tar.bz2
- Drop patches contained in new tarball
  1a1e4580-cloner-Explicitly-reject-network-disks-we-dont-know-how-to-clone.patch
  2773bc35-storagepool-cleanup-volumes-on-pool-cleanup.patch
  b1328202-devices-disk-Skip-check_path_search-for-path.patch
  virtman-append-usr-sbin-to-search-path.patch

- Upstream bug fixes (bsc#1027942)
  1a1e4580-cloner-Explicitly-reject-network-disks-we-dont-know-how-to-clone.patch
  2773bc35-storagepool-cleanup-volumes-on-pool-cleanup.patch
  b1328202-devices-disk-Skip-check_path_search-for-path.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=525
2020-11-16 17:09:49 +00:00

41 lines
1.8 KiB
Diff

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.
Index: virt-manager-3.2.0/virtManager/addhardware.py
===================================================================
--- virt-manager-3.2.0.orig/virtManager/addhardware.py
+++ virt-manager-3.2.0/virtManager/addhardware.py
@@ -480,6 +480,9 @@ class vmmAddHardware(vmmGObjectUI):
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"],
@@ -499,6 +502,7 @@ class vmmAddHardware(vmmGObjectUI):
"usb": _("USB"),
"virtio": _("VirtIO"),
"xen": _("Xen"),
+ "fdc": _("FDC"),
}
return bus_mappings.get(bus, bus)
@@ -680,8 +684,9 @@ class vmmAddHardware(vmmGObjectUI):
"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")])