- 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
This commit is contained in:
Charles Arnold 2019-10-28 17:01:55 +00:00 committed by Git OBS Bridge
parent 7a4cac2ed8
commit 849b03f9b9
8 changed files with 159 additions and 19 deletions

View File

@ -0,0 +1,35 @@
Subject: devices: video: Simplify model hvm check
From: Cole Robinson crobinso@redhat.com Thu Oct 3 15:41:44 2019 -0400
Date: Thu Oct 3 15:41:44 2019 -0400:
Git: 651e5b6d753930a2e7536efa4e6d20f57b038e80
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtinst/devices/video.py b/virtinst/devices/video.py
index 3d8ab939..3ebc561f 100644
--- a/virtinst/devices/video.py
+++ b/virtinst/devices/video.py
@@ -27,6 +27,8 @@ class DeviceVideo(Device):
@staticmethod
def default_model(guest):
+ if not guest.os.is_hvm():
+ return None
if guest.os.is_pseries():
return "vga"
if guest.os.is_arm_machvirt() or guest.os.is_riscv_virt():
@@ -37,11 +39,9 @@ class DeviceVideo(Device):
if guest.has_gl():
return "virtio"
return "qxl"
- if guest.os.is_hvm():
- if guest.conn.is_qemu():
- return "qxl"
- return "vga"
- return None
+ if guest.conn.is_qemu():
+ return "qxl"
+ return "vga"
def set_defaults(self, guest):
if not self.model:

View File

@ -0,0 +1,27 @@
Subject: video: Prefer "bochs" when it's supported.
From: Fabiano Fidêncio fidencio@redhat.com Thu Oct 3 10:50:34 2019 +0200
Date: Fri Oct 4 11:17:10 2019 -0400:
Git: 8f4c53ea960459516794ba533060a176cc26f121
Preferring "bochs" display device is the way to go when dealing with a
Linux guest using UEFI and that's quite well described here:
https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/
https://bugzilla.redhat.com/show_bug.cgi?id=1753644
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
diff --git a/virtinst/devices/video.py b/virtinst/devices/video.py
index 3ebc561f..fcca91b6 100644
--- a/virtinst/devices/video.py
+++ b/virtinst/devices/video.py
@@ -39,6 +39,9 @@ class DeviceVideo(Device):
if guest.has_gl():
return "virtio"
return "qxl"
+ if (guest.is_uefi() and
+ guest.lookup_domcaps().supports_video_bochs()):
+ return "bochs"
if guest.conn.is_qemu():
return "qxl"
return "vga"

View File

@ -0,0 +1,37 @@
Subject: urlfetcher: Deal with 'file://' in _LocalURLFetcher()
From: Fabiano Fidêncio fidencio@redhat.com Tue Sep 24 14:26:43 2019 +0200
Date: Wed Oct 2 11:58:34 2019 -0400:
Git: 9465da4174e778e7607908f18d74fd8aa2cba2fe
osinfo-db may contain files pointing to local paths, which will have the
format 'file:///usr/share/...'.
With the current code, virt-install would just bail as it doesn't
understand the 'file://' schema. Let's start using urllib (which is
already imported in the very same file) and parse the URL so both
'file:///usr/share/...' and '/usr/share/...' would work.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
diff --git a/virtinst/install/urlfetcher.py b/virtinst/install/urlfetcher.py
index 6084bf01..e52efc8e 100644
--- a/virtinst/install/urlfetcher.py
+++ b/virtinst/install/urlfetcher.py
@@ -365,11 +365,13 @@ class _LocalURLFetcher(_URLFetcher):
For grabbing files from a local directory
"""
def _hasFile(self, url):
- return os.path.exists(url)
+ parsed = urllib.parse.urlparse(url)
+ return os.path.exists(parsed.path)
def _grabber(self, url):
- urlobj = open(url, "rb")
- size = os.path.getsize(url)
+ parsed = urllib.parse.urlparse(url)
+ urlobj = open(parsed.path, "rb")
+ size = os.path.getsize(parsed.path)
return urlobj, size

View File

@ -0,0 +1,22 @@
Subject: addhardware: Add "bochs" display to the video list
From: Fabiano Fidêncio fidencio@redhat.com Wed Oct 2 10:45:28 2019 +0200
Date: Fri Oct 4 11:17:14 2019 -0400:
Git: d9736db9d983d01c03929de226365dbf56a791a3
https://bugzilla.redhat.com/show_bug.cgi?id=1753644
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
index 842eada1..881f0e02 100644
--- a/virtManager/addhardware.py
+++ b/virtManager/addhardware.py
@@ -663,7 +663,7 @@ class vmmAddHardware(vmmGObjectUI):
if guest.conn.is_xen():
return ["xen", "vga"]
if guest.conn.is_qemu() or guest.conn.is_test():
- return ["vga", "qxl", "virtio"]
+ return ["vga", "bochs", "qxl", "virtio"]
return []
@staticmethod

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Mon Oct 28 07:35:25 MDT 2019 - carnold@suse.com
- 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
-------------------------------------------------------------------
Tue Aug 27 13:54:23 MDT 2019 - carnold@suse.com

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@ -37,6 +37,10 @@ Patch2: 0c223ab2-guest-Dont-set-default-uefi-if-firmware-is-set.patch
Patch3: 414ffa5e-virt-install-Use-minutes-instead-of-seconds-on-get_time_string.patch
Patch4: 53245827-urlfetcher-Force-a-flush-after-writing-to-a-file.patch
Patch5: 3009888a-urlfetcher-Dont-override-fullurl-when-its-explicitly-set.patch
Patch6: 9465da41-urlfetcher-Deal-with-file-in-_LocalURLFetcher.patch
Patch7: 651e5b6d-devices-video-Simplify-model-hvm-check.patch
Patch8: d9736db9-addhardware-Add-bochs-display-to-the-video-list.patch
Patch9: 8f4c53ea-video-Prefer-bochs-when-its-supported..patch
# SUSE Only
Patch70: virtman-desktop.patch
Patch71: virtman-kvm.patch
@ -174,6 +178,10 @@ machine).
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
# SUSE Only
%patch70 -p1
%patch71 -p1

View File

@ -1,25 +1,25 @@
References: fate#326960, bsc#1123942
Index: virt-manager-2.2.0/virtinst/install/installer.py
Index: virt-manager-2.2.1/virtinst/install/installer.py
===================================================================
--- virt-manager-2.2.0.orig/virtinst/install/installer.py
+++ virt-manager-2.2.0/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._install_kernel = "/usr/lib/grub2/x86_64-xen/grub.xen"
- self._treemedia_bootconfig = ("/usr/lib/grub2/x86_64-xen/grub.xen", "", "")
+ if os.path.exists("/usr/share/grub2/x86_64-xen/grub.xen"):
+ self._install_kernel = "/usr/share/grub2/x86_64-xen/grub.xen"
+ self._treemedia_bootconfig = ("/usr/share/grub2/x86_64-xen/grub.xen", "", "")
+ else:
+ self._install_kernel = "/usr/lib/grub2/x86_64-xen/grub.xen"
self._install_initrd = None
self.extraargs = None
+ self._treemedia_bootconfig = ("/usr/lib/grub2/x86_64-xen/grub.xen", "", "")
log.debug("Using grub.xen to boot guest")
Index: virt-manager-2.2.0/virtManager/delete.py
self._alter_bootconfig(guest)
final_xml = guest.get_xml()
Index: virt-manager-2.2.1/virtManager/delete.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/delete.py
+++ virt-manager-2.2.0/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))

View File

@ -2,11 +2,11 @@ Reference: bnc#863821
grub.xen is required to boot PV VMs that use the BTRFS filesystem.
This patch forces the use of grub.xen (instead of using pygrub) for
suse distros SLE12GA, openSUSE 13.2, and newer.
Index: virt-manager-2.2.0/virtinst/install/installer.py
Index: virt-manager-2.2.1/virtinst/install/installer.py
===================================================================
--- virt-manager-2.2.0.orig/virtinst/install/installer.py
+++ virt-manager-2.2.0/virtinst/install/installer.py
@@ -436,6 +436,20 @@ class Installer(object):
--- virt-manager-2.2.1.orig/virtinst/install/installer.py
+++ virt-manager-2.2.1/virtinst/install/installer.py
@@ -436,6 +436,18 @@ class Installer(object):
install_xml = None
if self.has_install_phase():
install_xml = self._get_install_xml(guest, meter)
@ -19,9 +19,7 @@ Index: virt-manager-2.2.0/virtinst/install/installer.py
+ guest.bootloader = "pygrub"
+ else:
+ guest.bootloader = None
+ self._install_kernel = "/usr/lib/grub2/x86_64-xen/grub.xen"
+ self._install_initrd = None
+ self.extraargs = None
+ 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()