virt-manager/virtinst-change-location-for-grub_xen.patch
Charles Arnold 849b03f9b9 - bsc#1155197 - [xen][virt-manager] Fail to boot up installed
sles15sp2 PV guest
  virtinst-pvgrub2-bootloader.patch
  virtinst-change-location-for-grub_xen.patch
- Upstream bug fixes (bsc#1027942)
  9465da41-urlfetcher-Deal-with-file-in-_LocalURLFetcher.patch
  651e5b6d-devices-video-Simplify-model-hvm-check.patch
  d9736db9-addhardware-Add-bochs-display-to-the-video-list.patch
  8f4c53ea-video-Prefer-bochs-when-its-supported..patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=484
2019-10-28 17:01:55 +00:00

32 lines
1.5 KiB
Diff

References: fate#326960, bsc#1123942
Index: virt-manager-2.2.1/virtinst/install/installer.py
===================================================================
--- virt-manager-2.2.1.orig/virtinst/install/installer.py
+++ virt-manager-2.2.1/virtinst/install/installer.py
@@ -445,7 +445,10 @@ class Installer(object):
guest.bootloader = "pygrub"
else:
guest.bootloader = None
- self._treemedia_bootconfig = ("/usr/lib/grub2/x86_64-xen/grub.xen", "", "")
+ if os.path.exists("/usr/share/grub2/x86_64-xen/grub.xen"):
+ self._treemedia_bootconfig = ("/usr/share/grub2/x86_64-xen/grub.xen", "", "")
+ else:
+ self._treemedia_bootconfig = ("/usr/lib/grub2/x86_64-xen/grub.xen", "", "")
log.debug("Using grub.xen to boot guest")
self._alter_bootconfig(guest)
final_xml = guest.get_xml()
Index: virt-manager-2.2.1/virtManager/delete.py
===================================================================
--- virt-manager-2.2.1.orig/virtManager/delete.py
+++ virt-manager-2.2.1/virtManager/delete.py
@@ -246,7 +246,7 @@ def populate_storage_list(storage_list,
diskdata.append(("dtb", vm.get_xmlobj().os.dtb, True, False, True))
for target, path, ro, shared, is_media in diskdata:
- if not path or path == "/usr/lib/grub2/x86_64-xen/grub.xen":
+ if not path or "grub.xen" in path:
continue
# There are a few pieces here