diff --git a/virt-manager.changes b/virt-manager.changes index 98821a01..68e6a88d 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Tue Nov 23 10:11:44 MST 2021 - carnold@suse.com + +- jsc#SLE-17764 - Dev: Support Oracle Linux as a guest VM. See also + bsc#1192238 [Build58.2][KVM] The latest supported OracleLinux as + guest versions are not included anywhere + add-missing-oracle-linux-versions.patch + +------------------------------------------------------------------- +Thu Oct 28 16:09:36 MDT 2021 - carnold@suse.com + +- bsc#1188223 - L3: Sles12sp3 DomU won't boot after adding phys + hard drive + virtinst-xenbus-disk-index-fix.patch + +------------------------------------------------------------------- +Tue Oct 26 07:20:07 MDT 2021 - carnold@suse.com + +- jsc#SLE-21540 Dev: Prefer UEFI when creating new virtual machines. + Add a preferences option to allow users to default to UEFI when + creating a new VM. Libvirt decides which firmware file to use. + virtman-add-firmware-preferences.patch +- Renamed patch virtinst-modify-gui-defaults.patch to + virtman-modify-gui-defaults.patch + ------------------------------------------------------------------- Fri Oct 22 10:09:51 MDT 2021 - carnold@suse.com diff --git a/virt-manager.spec b/virt-manager.spec index d40dcbb4..5217c2a2 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -51,17 +51,18 @@ Patch76: virtinst-set-qemu-emulator.patch # Features or Enhancements Patch103: virtman-load-stored-uris.patch Patch104: virtman-add-tooltip-to-firmware.patch +Patch105: virtman-modify-gui-defaults.patch +Patch106: virtman-add-firmware-preferences.patch Patch120: virtinst-default-xen-to-qcow2-format.patch Patch121: virtinst-detect-oes-distros.patch -Patch122: virtinst-modify-gui-defaults.patch -Patch123: virtinst-vol-default-nocow.patch -Patch124: virtinst-set-cache-mode-unsafe-for-install.patch -Patch125: virtinst-s390x-disable-graphics.patch -Patch126: virtinst-add-caasp-support.patch -Patch127: virtinst-add-sle15-detection-support.patch -Patch128: virtinst-add-pvh-support.patch -Patch129: virtinst-media-detection.patch -Patch130: virtinst-graphics-add-check-for-qemu-modules-in-spice-graphic.patch +Patch122: virtinst-vol-default-nocow.patch +Patch123: virtinst-set-cache-mode-unsafe-for-install.patch +Patch124: virtinst-s390x-disable-graphics.patch +Patch125: virtinst-add-caasp-support.patch +Patch126: virtinst-add-sle15-detection-support.patch +Patch127: virtinst-add-pvh-support.patch +Patch128: virtinst-media-detection.patch +Patch129: virtinst-graphics-add-check-for-qemu-modules-in-spice-graphic.patch # Bug Fixes Patch151: virtman-increase-setKeepAlive-count.patch Patch152: virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch @@ -88,6 +89,7 @@ Patch179: virtinst-smbios-unsupported-for-xenpv.patch Patch180: virtinst-keep-iso-for-xenpv.patch Patch181: virtinst-add-slem-detection-support.patch Patch182: virtinst-add-sle-hpc-support.patch +Patch183: virtinst-add-oracle-linux-support.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -185,6 +187,8 @@ machine). # Enhancements %patch103 -p1 %patch104 -p1 +%patch105 -p1 +%patch106 -p1 %patch120 -p1 %patch121 -p1 %patch122 -p1 @@ -195,7 +199,6 @@ machine). %patch127 -p1 %patch128 -p1 %patch129 -p1 -%patch130 -p1 # Bug Fixes %patch151 -p1 %patch152 -p1 @@ -222,6 +225,7 @@ machine). %patch180 -p1 %patch181 -p1 %patch182 -p1 +%patch183 -p1 %build %if %{default_hvs} diff --git a/virtinst-add-oracle-linux-support.patch b/virtinst-add-oracle-linux-support.patch new file mode 100644 index 00000000..2733ed62 --- /dev/null +++ b/virtinst-add-oracle-linux-support.patch @@ -0,0 +1,37 @@ +References: bsc#1192238, jsc#SLE-17764 + +--- virt-manager-3.2.0/virtinst/install/urldetect.py.orig 2021-11-23 15:06:47.451081946 -0700 ++++ virt-manager-3.2.0/virtinst/install/urldetect.py 2021-11-23 15:07:43.539083283 -0700 +@@ -723,6 +723,24 @@ class _OESDistro(_SuseDistro): + famregex = ".*Open Enterprise Server.*" + + ++class _OLDistro(_DistroTree): ++ PRETTY_NAME = "Oracle Linux" ++ matching_distros = ["ol"] ++ _variant_prefix = "ol" ++ ++ @classmethod ++ def is_valid(cls, cache): ++ famregex = ".*Oracle Linux.*" ++ if cache.treeinfo_family_regex(famregex): ++ return True ++ ++ def _detect_version(self): ++ if self.cache.treeinfo_version: # pragma: no cover ++ olname = self._variant_prefix + self.cache.treeinfo_version ++ if OSDB.lookup_os(olname): ++ return olname ++ ++ + class _DebianDistro(_DistroTree): + # ex. http://ftp.egr.msu.edu/debian/dists/sarge/main/installer-i386/ + # daily builds: https://d-i.debian.org/daily-images/amd64/ +@@ -949,6 +967,7 @@ def _build_distro_list(osobj): + _FedoraDistro, + _RHELDistro, + _CentOSDistro, ++ _OLDistro, + _SLEDistro, + _SLESDistro, + _SLEHPCDistro, diff --git a/virtinst-add-pvh-support.patch b/virtinst-add-pvh-support.patch index 722931b4..378347ff 100644 --- a/virtinst-add-pvh-support.patch +++ b/virtinst-add-pvh-support.patch @@ -5,7 +5,7 @@ Index: virt-manager-3.2.0/virtManager/createvm.py =================================================================== --- virt-manager-3.2.0.orig/virtManager/createvm.py +++ virt-manager-3.2.0/virtManager/createvm.py -@@ -836,6 +836,9 @@ class vmmCreateVM(vmmGObjectUI): +@@ -839,6 +839,9 @@ class vmmCreateVM(vmmGObjectUI): break if label is None: continue diff --git a/virtinst-xenbus-disk-index-fix.patch b/virtinst-xenbus-disk-index-fix.patch index 4098d4da..827c5fc4 100644 --- a/virtinst-xenbus-disk-index-fix.patch +++ b/virtinst-xenbus-disk-index-fix.patch @@ -28,7 +28,7 @@ Index: virt-manager-3.2.0/virtinst/devices/disk.py skip_targets = [t for t in skip_targets if t and t.startswith(prefix)] skip_targets.sort() -@@ -903,7 +914,12 @@ class DeviceDisk(Device): +@@ -903,11 +914,18 @@ class DeviceDisk(Device): first_found = None for i in range(maxnode): @@ -42,3 +42,9 @@ Index: virt-manager-3.2.0/virtinst/devices/disk.py if gen_t in skip_targets: skip_targets.remove(gen_t) continue + if not skip_targets: ++ if first_found: ++ return first_found + return gen_t + elif not first_found: + first_found = gen_t diff --git a/virtman-add-firmware-preferences.patch b/virtman-add-firmware-preferences.patch new file mode 100644 index 00000000..fbbfbe07 --- /dev/null +++ b/virtman-add-firmware-preferences.patch @@ -0,0 +1,187 @@ +From d30b50139e60afc6e5da1e38f130b27859d31a83 Mon Sep 17 00:00:00 2001 +From: Charles Arnold +Date: Mon, 25 Oct 2021 16:16:06 -0600 +Subject: [PATCH 1/1] virt-manager: Add firmware preferences for creating a new + VM + +See https://bugzilla.redhat.com/show_bug.cgi?id=1997882 + +--- + .../org.virt-manager.virt-manager.gschema.xml | 6 +++++ + ui/preferences.ui | 26 +++++++++++++++++++ + virtManager/config.py | 11 ++++++++ + virtManager/createvm.py | 4 +++ + virtManager/preferences.py | 20 ++++++++++++++ + 5 files changed, 67 insertions(+) + +Index: virt-manager-3.2.0/data/org.virt-manager.virt-manager.gschema.xml +=================================================================== +--- virt-manager-3.2.0.orig/data/org.virt-manager.virt-manager.gschema.xml ++++ virt-manager-3.2.0/data/org.virt-manager.virt-manager.gschema.xml +@@ -265,6 +265,12 @@ + CPU setting to use for new VMs. Limited to VMs matching the host architecture. Possible values: default (virt-manager default), hv-default (qemu's default), host-model-only (just the model, not the additional features), host-model (libvirt's host-model setting), host-passthrough (libvirt's host-passthrough setting). + + ++ ++ 'default' ++ Use selected firmware for new VM booting ++ Firmware used for new VMs. Possible values are BIOS (default) and UEFI. The firmware used is determined by libvirt unless a specific firmware is selected from the Customize dialog. ++ ++ + + + 2 + + ++ ++ ++ True ++ False ++ Default Firmware for new VMs. Boot using either BIOS or UEFI. ++ start ++ _Firmware default: ++ True ++ prefs-firmware-default ++ ++ ++ 0 ++ 3 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ ++ 1 ++ 3 ++ ++ + + + +Index: virt-manager-3.2.0/virtManager/config.py +=================================================================== +--- virt-manager-3.2.0.orig/virtManager/config.py ++++ virt-manager-3.2.0/virtManager/config.py +@@ -221,6 +221,7 @@ class vmmConfig(object): + + self.default_storage_format_from_config = "qcow2" + self.default_console_resizeguest = 0 ++ self.default_firmware_from_config = "bios" + + self._objects = [] + self.color_insensitive = None +@@ -532,6 +533,16 @@ class vmmConfig(object): + def set_default_cpu_setting(self, val): + self.conf.set("/new-vm/cpu-default", val.lower()) + ++ def get_default_firmware_setting(self, raw=False): ++ ret = self.conf.get("/new-vm/firmware") ++ if ret not in ["default", "bios", "uefi"]: ++ ret = "default" # pragma: no cover ++ if ret == "default" and not raw: ++ return self.default_firmware_from_config ++ return ret ++ def set_firmware_setting(self, val): ++ self.conf.set("/new-vm/firmware", val.lower()) ++ + + # URL/Media path history + def _url_add_helper(self, gsettings_path, url): +Index: virt-manager-3.2.0/virtManager/createvm.py +=================================================================== +--- virt-manager-3.2.0.orig/virtManager/createvm.py ++++ virt-manager-3.2.0/virtManager/createvm.py +@@ -105,6 +105,7 @@ class _GuestData: + self.os_variant = None + self.uefi_path = None + self.name = None ++ self.firmware = None + + self.vcpus = None + self.memory = None +@@ -159,6 +160,8 @@ class _GuestData: + guest.currentMemory = self.currentMemory + if self.memory: + guest.memory = self.memory ++ if self.firmware == "uefi": ++ guest.os.firmware = "efi" + + return guest + +@@ -1507,6 +1510,7 @@ class vmmCreateVM(vmmGObjectUI): + + gdata.default_graphics_type = self.config.get_graphics_type() + gdata.x86_cpu_default = self.config.get_default_cpu_setting() ++ gdata.firmware = self.config.get_default_firmware_setting() + + return gdata + +Index: virt-manager-3.2.0/virtManager/preferences.py +=================================================================== +--- virt-manager-3.2.0.orig/virtManager/preferences.py ++++ virt-manager-3.2.0/virtManager/preferences.py +@@ -46,6 +46,7 @@ class vmmPreferences(vmmGObjectUI): + self.refresh_graphics_type() + self.refresh_storage_format() + self.refresh_cpu_default() ++ self.refresh_firmware_default() + self.refresh_cpu_poll() + self.refresh_disk_poll() + self.refresh_net_poll() +@@ -73,6 +74,7 @@ class vmmPreferences(vmmGObjectUI): + "on_prefs_graphics_type_changed": self.change_graphics_type, + "on_prefs_storage_format_changed": self.change_storage_format, + "on_prefs_cpu_default_changed": self.change_cpu_default, ++ "on_prefs_firmware_default_changed": self.change_firmware_default, + "on_prefs_stats_enable_cpu_toggled": self.change_cpu_poll, + "on_prefs_stats_enable_disk_toggled": self.change_disk_poll, + "on_prefs_stats_enable_net_toggled": self.change_net_poll, +@@ -175,6 +177,17 @@ class vmmPreferences(vmmGObjectUI): + combo.set_model(model) + uiutil.init_combo_text_column(combo, 1) + ++ combo = self.widget("prefs-firmware-default") ++ # [gsettings value, string] ++ model = Gtk.ListStore(str, str) ++ for row in [["default", _("System default (%s)") % ++ self.config.default_firmware_from_config], ++ ["bios", "BIOS"], ++ ["uefi", "UEFI"]]: ++ model.append(row) ++ combo.set_model(model) ++ uiutil.init_combo_text_column(combo, 1) ++ + if not vmmInspection.libguestfs_installed(): # pragma: no cover + self.widget("prefs-libguestfs").set_sensitive(False) + self.widget("prefs-libguestfs").set_tooltip_text( +@@ -234,6 +247,10 @@ class vmmPreferences(vmmGObjectUI): + combo = self.widget("prefs-cpu-default") + val = self.config.get_default_cpu_setting() + uiutil.set_list_selection(combo, val) ++ def refresh_firmware_default(self): ++ combo = self.widget("prefs-firmware-default") ++ val = self.config.get_default_firmware_setting(raw=True) ++ uiutil.set_list_selection(combo, val) + + def refresh_cpu_poll(self): + self.widget("prefs-stats-enable-cpu").set_active( +@@ -374,6 +391,9 @@ class vmmPreferences(vmmGObjectUI): + def change_cpu_default(self, src): + typ = uiutil.get_list_selection(src) or "default" + self.config.set_default_cpu_setting(typ.lower()) ++ def change_firmware_default(self, src): ++ typ = uiutil.get_list_selection(src) or "default" ++ self.config.set_firmware_setting(typ.lower()) + + def change_cpu_poll(self, src): + self.config.set_stats_enable_cpu_poll(src.get_active()) diff --git a/virtman-allow-creating-i686-vm.patch b/virtman-allow-creating-i686-vm.patch index ed27d26a..853e02b0 100644 --- a/virtman-allow-creating-i686-vm.patch +++ b/virtman-allow-creating-i686-vm.patch @@ -1,11 +1,11 @@ References: bsc#919692 Because openSUSE repos combine 32 and 64 bit sources we need to continue showing the 'Architecture' pop-up. -Index: virt-manager-3.1.0/virtManager/createvm.py +Index: virt-manager-3.2.0/virtManager/createvm.py =================================================================== ---- virt-manager-3.1.0.orig/virtManager/createvm.py -+++ virt-manager-3.1.0/virtManager/createvm.py -@@ -861,11 +861,6 @@ class vmmCreateVM(vmmGObjectUI): +--- virt-manager-3.2.0.orig/virtManager/createvm.py ++++ virt-manager-3.2.0/virtManager/createvm.py +@@ -864,11 +864,6 @@ class vmmCreateVM(vmmGObjectUI): for guest in self.conn.caps.guests: if guest.os_type == self._capsinfo.os_type: archs.append(guest.arch) diff --git a/virtinst-modify-gui-defaults.patch b/virtman-modify-gui-defaults.patch similarity index 100% rename from virtinst-modify-gui-defaults.patch rename to virtman-modify-gui-defaults.patch