- bsc#1196202 - virt-install crashes on a time-of-check time-of-use
(TOCTOU) race condition Resolved by upgrade to version 4.0.0 (jsc#SLE-16582) virt-manager-4.0.0.tar.gz - Other features and bug fixes (bsc#1027942) virt-install –os-variant/–osinfo is now a hard requirement for most cases Add ‘Enable shared memory’ UI checkbox (Lin Ma) add UI preference to default to UEFI for new VMs (Charles Arnold) Add virtiofs filesystem driver UI option Fill in all –cputune, –cpu, –shmem, –input, and –boot suboptions (Hugues Fafard) virt-* mdev improvements (Shalini Chellathurai Saroja) bhyve improvments (Roman Bogorodskiy) Revive network portgroup UI enable a TPM by default when UEFI is used (Daniel P. Berrangé) Use cpu host-passthrough by default on qemu x86 use virtio-gpu video for most modern distros Default to extra pcie root ports for q35 set discard=unmap by default for sparse disks and block devices We now require xorissofs for –location ISO We now use setuptools rather than just plain distutils - Add virtman-revert-use-of-AyatanaAppIndicator3.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=558
This commit is contained in:
parent
da27da592b
commit
0b51f8ff5d
@ -1,151 +0,0 @@
|
||||
Subject: virt-manager: enable MDEV support
|
||||
From: Shalini Chellathurai Saroja shalini@linux.ibm.com Mon Jun 7 11:34:21 2021 +0200
|
||||
Date: Tue Jun 8 09:58:50 2021 -0400:
|
||||
Git: 0e15cd51dfbdaa09f7d34ed1edce2f5416130361
|
||||
|
||||
Enable virt-manager GUI to support add, edit, remove, hot-plug and
|
||||
hot-unplug of mediated devices (like DASDs, APQNs and PCIs) in virtual
|
||||
server.
|
||||
|
||||
It is not possible to edit MDEV when a virtual server is in
|
||||
running state, as this is not supported by libvirt.
|
||||
|
||||
Reviewed-by: Cole Robinson <crobinso@redhat.com>
|
||||
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
|
||||
|
||||
diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml
|
||||
index b8d67bac..5875732a 100644
|
||||
--- a/tests/data/testdriver/testdriver.xml
|
||||
+++ b/tests/data/testdriver/testdriver.xml
|
||||
@@ -3645,6 +3645,27 @@ ba</description>
|
||||
</capability>
|
||||
</device>
|
||||
|
||||
+<device>
|
||||
+ <name>css_0_0_0023</name>
|
||||
+ <path>/sys/devices/css0/0.0.0023</path>
|
||||
+ <parent>computer</parent>
|
||||
+ <driver>
|
||||
+ <name>vfio_ccw</name>
|
||||
+ </driver>
|
||||
+ <capability type='css'>
|
||||
+ <cssid>0x0</cssid>
|
||||
+ <ssid>0x0</ssid>
|
||||
+ <devno>0x0023</devno>
|
||||
+ <capability type='mdev_types'>
|
||||
+ <type id='vfio_ccw-io'>
|
||||
+ <name>I/O subchannel (Non-QDIO)</name>
|
||||
+ <deviceAPI>vfio-ccw</deviceAPI>
|
||||
+ <availableInstances>0</availableInstances>
|
||||
+ </type>
|
||||
+ </capability>
|
||||
+ </capability>
|
||||
+</device>
|
||||
+
|
||||
<device>
|
||||
<name>mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110</name>
|
||||
<path>/sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110</path>
|
||||
@@ -3658,6 +3679,24 @@ ba</description>
|
||||
</capability>
|
||||
</device>
|
||||
|
||||
+<device>
|
||||
+ <name>ap_matrix</name>
|
||||
+ <path>/sys/devices/vfio_ap/matrix</path>
|
||||
+ <parent>computer</parent>
|
||||
+ <driver>
|
||||
+ <name>vfio_ap</name>
|
||||
+ </driver>
|
||||
+ <capability type='ap_matrix'>
|
||||
+ <capability type='mdev_types'>
|
||||
+ <type id='vfio_ap-passthrough'>
|
||||
+ <name>VFIO AP Passthrough Device</name>
|
||||
+ <deviceAPI>vfio-ap</deviceAPI>
|
||||
+ <availableInstances>65536</availableInstances>
|
||||
+ </type>
|
||||
+ </capability>
|
||||
+ </capability>
|
||||
+</device>
|
||||
+
|
||||
<device>
|
||||
<name>mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9</name>
|
||||
<path>/sys/devices/vfio_ap/matrix/11f92c9d-b0b0-4016-b306-a8071277f8b9</path>
|
||||
diff --git a/tests/uitests/test_addhardware.py b/tests/uitests/test_addhardware.py
|
||||
index ce3da57c..56acc2fa 100644
|
||||
--- a/tests/uitests/test_addhardware.py
|
||||
+++ b/tests/uitests/test_addhardware.py
|
||||
@@ -459,6 +459,12 @@ def testAddHosts(app):
|
||||
app.click_alert_button("device is already in use by", "Yes")
|
||||
lib.utils.check(lambda: details.active)
|
||||
|
||||
+ # Add MDEV device
|
||||
+ _open_addhw(app, details)
|
||||
+ tab = _select_hw(addhw, "MDEV Host Device", "host-tab")
|
||||
+ tab.find_fuzzy("mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110",
|
||||
+ "table cell").click()
|
||||
+ _finish(addhw, check=details)
|
||||
|
||||
|
||||
def testAddChars(app):
|
||||
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
|
||||
index cbf19f58..13b899c3 100644
|
||||
--- a/virtManager/addhardware.py
|
||||
+++ b/virtManager/addhardware.py
|
||||
@@ -249,6 +249,10 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
add_hw_option(_("PCI Host Device"), "system-run", PAGE_HOSTDEV,
|
||||
nodedev_enabled, nodedev_errstr, "pci")
|
||||
|
||||
+ add_hw_option(_("MDEV Host Device"), "system-run", PAGE_HOSTDEV,
|
||||
+ self.conn.support.conn_nodedev(),
|
||||
+ _("Connection does not support host device enumeration"),
|
||||
+ "mdev")
|
||||
add_hw_option(_("Video"), "video-display", PAGE_VIDEO, True,
|
||||
_("Libvirt version does not support video devices."))
|
||||
add_hw_option(_("Watchdog"), "device_pci", PAGE_WATCHDOG,
|
||||
@@ -656,6 +660,9 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
(dehex(hostdev.domain), dehex(hostdev.bus),
|
||||
dehex(hostdev.slot), dehex(hostdev.function)))
|
||||
|
||||
+ elif hostdev.uuid:
|
||||
+ label += " %s" % (str(hostdev.uuid))
|
||||
+
|
||||
return label
|
||||
|
||||
|
||||
@@ -775,6 +782,12 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
if dev.xmlobj.name == subdev.xmlobj.parent:
|
||||
prettyname += " (%s)" % subdev.pretty_name()
|
||||
|
||||
+ if devtype == "mdev":
|
||||
+ for parentdev in self.conn.list_nodedevs():
|
||||
+ if dev.xmlobj.parent == parentdev.xmlobj.name:
|
||||
+ prettyname = "%s %s" % (
|
||||
+ parentdev.pretty_name(), prettyname)
|
||||
+
|
||||
model.append([dev.xmlobj, prettyname])
|
||||
|
||||
if len(model) == 0:
|
||||
@@ -981,11 +994,13 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
|
||||
if page == PAGE_HOSTDEV:
|
||||
# Need to do this here, since we share the hostdev page
|
||||
- # between two different HW options
|
||||
+ # between different HW options
|
||||
row = self._get_hw_selection()
|
||||
devtype = "usb_device"
|
||||
if row and row[5] == "pci":
|
||||
devtype = "pci"
|
||||
+ if row and row[5] == "mdev":
|
||||
+ devtype = "mdev"
|
||||
self._populate_hostdev_model(devtype)
|
||||
|
||||
if page == PAGE_CONTROLLER:
|
||||
@@ -1036,6 +1051,8 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
row = self._get_hw_selection()
|
||||
if row and row[5] == "pci":
|
||||
return _("PCI Device")
|
||||
+ if row and row[5] == "mdev":
|
||||
+ return _("MDEV Device")
|
||||
return _("USB Device")
|
||||
|
||||
raise RuntimeError("Unknown page %s" % page) # pragma: no cover
|
@ -1,24 +0,0 @@
|
||||
Subject: virtinst: fix error message format string
|
||||
From: Roman Bogorodskiy bogorodskiy@gmail.com Wed Feb 10 17:54:10 2021 +0400
|
||||
Date: Wed Feb 10 10:26:23 2021 -0500:
|
||||
Git: 143c6befc33ee507379fd7eca8cf5e5bd1685799
|
||||
|
||||
Fix a regression introduced by commit 71f034d6b where
|
||||
format string expects kwarg "domain", but "vm" is passed instead.
|
||||
|
||||
Reviewed-by: Cole Robinson <crobinso@redhat.com>
|
||||
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
|
||||
|
||||
diff --git a/virtinst/virtxml.py b/virtinst/virtxml.py
|
||||
index bd2b4282..0c8da37e 100644
|
||||
--- a/virtinst/virtxml.py
|
||||
+++ b/virtinst/virtxml.py
|
||||
@@ -251,7 +251,7 @@ def start_domain_transient(conn, xmlobj, devs, action, confirm):
|
||||
dom = conn.createXML(xmlobj.get_xml())
|
||||
except libvirt.libvirtError as e:
|
||||
fail(_("Failed starting domain '%(domain)s': %(error)s") % {
|
||||
- "vm": xmlobj.name,
|
||||
+ "domain": xmlobj.name,
|
||||
"error": e,
|
||||
})
|
||||
else:
|
@ -1,36 +0,0 @@
|
||||
Subject: virtinst: Fix TOCTOU in domain enumeration
|
||||
From: Martin Pitt martin@piware.de Tue Nov 24 14:24:06 2020 +0100
|
||||
Date: Tue Dec 1 13:56:30 2020 -0500:
|
||||
Git: 4d0e323227f18e58283c45be4d240b506faacb22
|
||||
|
||||
Similar to commit 49a01b5482, _fetch_all_domains_raw() has a race
|
||||
condition where a domain may disappear (from parallel libvirt
|
||||
operations) in between enumerating and inspecting the objects.
|
||||
|
||||
Ignore these missing domains instead of crashing.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1901081
|
||||
|
||||
diff --git a/virtinst/connection.py b/virtinst/connection.py
|
||||
index fec273b7..06bc60ad 100644
|
||||
--- a/virtinst/connection.py
|
||||
+++ b/virtinst/connection.py
|
||||
@@ -182,8 +182,16 @@ class VirtinstConnection(object):
|
||||
def _fetch_all_domains_raw(self):
|
||||
dummy1, dummy2, ret = pollhelpers.fetch_vms(
|
||||
self, {}, lambda obj, ignore: obj)
|
||||
- return [Guest(weakref.proxy(self), parsexml=obj.XMLDesc(0))
|
||||
- for obj in ret]
|
||||
+ domains = []
|
||||
+ for obj in ret:
|
||||
+ # TOCTOU race: a domain may go away in between enumeration and inspection
|
||||
+ try:
|
||||
+ xml = obj.XMLDesc(0)
|
||||
+ except libvirt.libvirtError as e: # pragma: no cover
|
||||
+ log.debug("Fetching domain XML failed: %s", e)
|
||||
+ continue
|
||||
+ domains.append(Guest(weakref.proxy(self), parsexml=xml))
|
||||
+ return domains
|
||||
|
||||
def _build_pool_raw(self, poolobj):
|
||||
return StoragePool(weakref.proxy(self),
|
@ -1,46 +0,0 @@
|
||||
Subject: console: Don't block console reconnect for non-error
|
||||
From: Cole Robinson crobinso@redhat.com Thu Jan 20 14:14:54 2022 -0500
|
||||
Date: Fri Jan 21 11:03:23 2022 -0500:
|
||||
Git: 8bb64ad5afd5eb1bb15c25affc5544a3acefe48f
|
||||
|
||||
https://listman.redhat.com/archives/virt-tools-list/2022-January/msg00012.html
|
||||
|
||||
On xen, a guest reboot will trigger a non-error viewer-disconnected
|
||||
signal, but we treat it like an error, which makes it difficult to
|
||||
reconnect to the VM console.
|
||||
|
||||
If there's no error message raised, treat the disconnect like a
|
||||
non-error cases.
|
||||
|
||||
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
--- a/virtManager/details/console.py
|
||||
+++ b/virtManager/details/console.py
|
||||
@@ -824,14 +824,23 @@ class vmmConsolePages(vmmGObjectUI):
|
||||
return
|
||||
|
||||
msg = _("Viewer was disconnected.")
|
||||
+ errmsg = ""
|
||||
if errdetails:
|
||||
- msg += "\n" + errdetails
|
||||
+ errmsg += "\n" + errdetails
|
||||
if ssherr:
|
||||
log.debug("SSH tunnel error output: %s", ssherr)
|
||||
- msg += "\n\n"
|
||||
- msg += _("SSH tunnel error output: %s") % ssherr
|
||||
+ errmsg += "\n\n"
|
||||
+ errmsg += _("SSH tunnel error output: %s") % ssherr
|
||||
|
||||
- self._activate_gfx_unavailable_page(msg)
|
||||
+ if errmsg:
|
||||
+ self._activate_gfx_unavailable_page(msg + errmsg)
|
||||
+ return
|
||||
+
|
||||
+ # If no error message was reported, this isn't a clear graphics
|
||||
+ # error that should block reconnecting. So use the top level
|
||||
+ # 'VM unavailable' page which makes it easier for the user to
|
||||
+ # reconnect.
|
||||
+ self._activate_vm_unavailable_page(msg)
|
||||
|
||||
def _viewer_disconnected(self, ignore, errdetails, ssherr):
|
||||
self._activate_gfx_unavailable_page(_("Viewer disconnected."))
|
@ -1,66 +0,0 @@
|
||||
Subject: virt-xml: add support for mediated devices
|
||||
From: Shalini Chellathurai Saroja shalini@linux.ibm.com Mon May 31 21:54:26 2021 +0200
|
||||
Date: Tue Jun 1 17:07:36 2021 -0400:
|
||||
Git: 9363e1e692bb0d01184ecc7991d61c95542f690b
|
||||
|
||||
Provide support to add/remove MDEV in a guest domain, which is in
|
||||
shut-off or running state (hotplug/unplug). Also support update of
|
||||
already existing MDEV device, when the guest domain is in shut-off
|
||||
state. Please note that libvirt does not support update of MDEV
|
||||
device, when the guest domain is in running state.
|
||||
|
||||
Reviewed-by: Cole Robinson <crobinso@redhat.com>
|
||||
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
|
||||
|
||||
diff --git a/virtinst/nodedev.py b/virtinst/nodedev.py
|
||||
index 97841794..f54a311c 100644
|
||||
--- a/virtinst/nodedev.py
|
||||
+++ b/virtinst/nodedev.py
|
||||
@@ -5,6 +5,7 @@
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
import os
|
||||
+import uuid
|
||||
|
||||
from .logger import log
|
||||
from .xmlbuilder import XMLBuilder, XMLProperty, XMLChildProperty
|
||||
@@ -25,6 +26,16 @@ def _compare_int(nodedev_val, hostdev_val):
|
||||
return (nodedev_val == hostdev_val or hostdev_val == -1)
|
||||
|
||||
|
||||
+def _compare_uuid(nodedev_val, hostdev_val):
|
||||
+ try:
|
||||
+ nodedev_val = uuid.UUID(nodedev_val)
|
||||
+ hostdev_val = uuid.UUID(hostdev_val)
|
||||
+ except Exception: # pragma: no cover
|
||||
+ return -1
|
||||
+
|
||||
+ return (nodedev_val == hostdev_val)
|
||||
+
|
||||
+
|
||||
class DevNode(XMLBuilder):
|
||||
XML_NAME = "devnode"
|
||||
|
||||
@@ -82,6 +93,9 @@ class NodeDevice(XMLBuilder):
|
||||
parent = XMLProperty("./parent")
|
||||
device_type = XMLProperty("./capability/@type")
|
||||
|
||||
+ def get_mdev_uuid(self):
|
||||
+ return self.name[5:].replace('_', '-')
|
||||
+
|
||||
def compare_to_hostdev(self, hostdev):
|
||||
if self.device_type == "pci":
|
||||
if hostdev.type != "pci":
|
||||
@@ -101,6 +115,12 @@ class NodeDevice(XMLBuilder):
|
||||
_compare_int(self.bus, hostdev.bus) and
|
||||
_compare_int(self.device, hostdev.device))
|
||||
|
||||
+ if self.device_type == "mdev":
|
||||
+ if hostdev.type != "mdev":
|
||||
+ return False
|
||||
+
|
||||
+ return _compare_uuid(self.get_mdev_uuid(), hostdev.uuid)
|
||||
+
|
||||
return False
|
||||
|
||||
|
@ -1,240 +0,0 @@
|
||||
Subject: virt-install: add mediated device
|
||||
From: Shalini Chellathurai Saroja shalini@linux.ibm.com Wed Apr 14 17:18:55 2021 +0200
|
||||
Date: Tue May 18 18:36:03 2021 -0400:
|
||||
Git: 965480e8bc85caf8a4f36b4a2f07963067b63cf6
|
||||
|
||||
Add support to install a virtual server with passed-through mediated
|
||||
device. Mediated device can be created using vGPU attached to
|
||||
vfio_pci driver or DASD attached to vfio_ccw driver or APQNs attached
|
||||
to vfio_ap driver.
|
||||
|
||||
Reviewed-by: Cole Robinson <crobinso@redhat.com>
|
||||
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
|
||||
|
||||
Index: virt-manager-3.2.0/tests/data/cli/compare/virt-install-many-devices.xml
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/tests/data/cli/compare/virt-install-many-devices.xml
|
||||
+++ virt-manager-3.2.0/tests/data/cli/compare/virt-install-many-devices.xml
|
||||
@@ -592,6 +592,25 @@
|
||||
<char>/dev/pty7</char>
|
||||
</source>
|
||||
</hostdev>
|
||||
+ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
|
||||
+ <address type="ccw" cssid="0xfe" ssid="0x1" devno="0x0008"/>
|
||||
+ <source>
|
||||
+ <address uuid="8e37ee90-2b51-45e3-9b25-bf8283c03110"/>
|
||||
+ </source>
|
||||
+ </hostdev>
|
||||
+ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ap">
|
||||
+ <source>
|
||||
+ <address uuid="11f92c9d-b0b0-4016-b306-a8071277f8b9"/>
|
||||
+ </source>
|
||||
+ </hostdev>
|
||||
+ <hostdev mode="subsystem" type="mdev" managed="yes" model="vfio-pci" display="off" ramfb="off">
|
||||
+ <address type="pci" domain="0" bus="1" slot="1" function="0">
|
||||
+ <zpci uid="0x0001" fid="0x00000001"/>
|
||||
+ </address>
|
||||
+ <source>
|
||||
+ <address uuid="4b20d080-1b54-4048-85b3-a6a62d165c01"/>
|
||||
+ </source>
|
||||
+ </hostdev>
|
||||
<redirdev bus="usb" type="spicevmc"/>
|
||||
<redirdev bus="usb" type="tcp">
|
||||
<source host="localhost" service="4000"/>
|
||||
Index: virt-manager-3.2.0/tests/data/testdriver/testdriver.xml
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/tests/data/testdriver/testdriver.xml
|
||||
+++ virt-manager-3.2.0/tests/data/testdriver/testdriver.xml
|
||||
@@ -3645,5 +3645,45 @@ ba</description>
|
||||
</capability>
|
||||
</device>
|
||||
|
||||
+<device>
|
||||
+ <name>mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110</name>
|
||||
+ <path>/sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110</path>
|
||||
+ <parent>css_0_0_0023</parent>
|
||||
+ <driver>
|
||||
+ <name>vfio_mdev</name>
|
||||
+ </driver>
|
||||
+ <capability type='mdev'>
|
||||
+ <type id='vfio_ccw-io'/>
|
||||
+ <iommuGroup number='0'/>
|
||||
+ </capability>
|
||||
+</device>
|
||||
+
|
||||
+<device>
|
||||
+ <name>mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9</name>
|
||||
+ <path>/sys/devices/vfio_ap/matrix/11f92c9d-b0b0-4016-b306-a8071277f8b9</path>
|
||||
+ <parent>ap_matrix</parent>
|
||||
+ <driver>
|
||||
+ <name>vfio_mdev</name>
|
||||
+ </driver>
|
||||
+ <capability type='mdev'>
|
||||
+ <type id='vfio_ap-passthrough'/>
|
||||
+ <iommuGroup number='2'/>
|
||||
+ <attr name='assign_adapter' value='1'/>
|
||||
+ <attr name='assign_domain' value='2'/>
|
||||
+ </capability>
|
||||
+</device>
|
||||
+
|
||||
+<device>
|
||||
+ <name>mdev_4b20d080_1b54_4048_85b3_a6a62d165c01</name>
|
||||
+ <path>/sys/devices/pci0000:00/0000:00:02.0/4b20d080-1b54-4048-85b3-a6a62d165c01</path>
|
||||
+ <parent>pci_0000_06_00_0</parent>
|
||||
+ <driver>
|
||||
+ <name>vfio_mdev</name>
|
||||
+ </driver>
|
||||
+ <capability type='mdev'>
|
||||
+ <type id='nvidia-11'/>
|
||||
+ <iommuGroup number='12'/>
|
||||
+ </capability>
|
||||
+</device>
|
||||
|
||||
</node>
|
||||
Index: virt-manager-3.2.0/tests/test_cli.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/tests/test_cli.py
|
||||
+++ virt-manager-3.2.0/tests/test_cli.py
|
||||
@@ -675,6 +675,9 @@ source.reservations.managed=no,source.re
|
||||
--hostdev wlan0,type=net
|
||||
--hostdev /dev/vdz,type=storage
|
||||
--hostdev /dev/pty7,type=misc
|
||||
+--hostdev mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110,address.type=ccw,address.cssid=0xfe,address.ssid=0x1,address.devno=0x0008
|
||||
+--hostdev mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9
|
||||
+--hostdev mdev_4b20d080_1b54_4048_85b3_a6a62d165c01,address.type=pci,address.domain=0x0000,address.bus=0x01,address.slot=0x01,address.function=0x0,address.zpci.uid=0x0001,address.zpci.fid=0x00000001
|
||||
|
||||
|
||||
--filesystem /source,/target,alias.name=testfsalias,driver.ats=on,driver.iommu=off,driver.packed=on
|
||||
Index: virt-manager-3.2.0/tests/test_nodedev.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/tests/test_nodedev.py
|
||||
+++ virt-manager-3.2.0/tests/test_nodedev.py
|
||||
@@ -126,6 +126,36 @@ def testDRMDevice():
|
||||
assert dev.get_devnode("frob")
|
||||
|
||||
|
||||
+def testDASDMdev():
|
||||
+ conn = utils.URIs.open_testdriver_cached()
|
||||
+ devname = "mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110"
|
||||
+ dev = _nodeDevFromName(conn, devname)
|
||||
+ assert dev.name == devname
|
||||
+ assert dev.parent == "css_0_0_0023"
|
||||
+ assert dev.device_type == "mdev"
|
||||
+ assert dev.type_id == "vfio_ccw-io"
|
||||
+
|
||||
+
|
||||
+def testAPQNMdev():
|
||||
+ conn = utils.URIs.open_testdriver_cached()
|
||||
+ devname = "mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9"
|
||||
+ dev = _nodeDevFromName(conn, devname)
|
||||
+ assert dev.name == devname
|
||||
+ assert dev.parent == "ap_matrix"
|
||||
+ assert dev.device_type == "mdev"
|
||||
+ assert dev.type_id == "vfio_ap-passthrough"
|
||||
+
|
||||
+
|
||||
+def testPCIMdev():
|
||||
+ conn = utils.URIs.open_testdriver_cached()
|
||||
+ devname = "mdev_4b20d080_1b54_4048_85b3_a6a62d165c01"
|
||||
+ dev = _nodeDevFromName(conn, devname)
|
||||
+ assert dev.name == devname
|
||||
+ assert dev.parent == "pci_0000_06_00_0"
|
||||
+ assert dev.device_type == "mdev"
|
||||
+ assert dev.type_id == "nvidia-11"
|
||||
+
|
||||
+
|
||||
# NodeDevice 2 Device XML tests
|
||||
|
||||
def testNodeDev2USB1():
|
||||
Index: virt-manager-3.2.0/virtinst/devices/hostdev.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/devices/hostdev.py
|
||||
+++ virt-manager-3.2.0/virtinst/devices/hostdev.py
|
||||
@@ -4,6 +4,8 @@
|
||||
# This work is licensed under the GNU GPLv2 or later.
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
+import re
|
||||
+
|
||||
from .device import Device
|
||||
from ..nodedev import NodeDevice
|
||||
from ..xmlbuilder import XMLProperty
|
||||
@@ -53,16 +55,45 @@ class DeviceHostdev(Device):
|
||||
self.scsi_unit = nodedev.lun
|
||||
self.managed = False
|
||||
|
||||
+ elif nodedev.device_type == nodedev.CAPABILITY_TYPE_MDEV:
|
||||
+ self.type = "mdev"
|
||||
+
|
||||
+ if nodedev.type_id == "vfio_ccw-io":
|
||||
+ self.model = "vfio-ccw"
|
||||
+ self.managed = "no"
|
||||
+
|
||||
+ elif nodedev.type_id == "vfio_ap-passthrough":
|
||||
+ self.model = "vfio-ap"
|
||||
+ self.managed = "no"
|
||||
+
|
||||
+ elif (re.match("^nvidia-[0-9]{2}", nodedev.type_id) or
|
||||
+ re.match("^i915-GVTg_V[0-9]_[0-9]", nodedev.type_id)):
|
||||
+ self.model = "vfio-pci"
|
||||
+ self.managed = "yes"
|
||||
+ self.display = "off"
|
||||
+ self.ramfb = "off"
|
||||
+
|
||||
+ else:
|
||||
+ raise ValueError( # pragma: no cover
|
||||
+ _("Don't know how to generate nodedev for mdev type id '%s'") %
|
||||
+ nodedev.type_id)
|
||||
+
|
||||
+ self.uuid = nodedev.name[5:].replace('_', '-')
|
||||
+
|
||||
else:
|
||||
raise ValueError(_("Unknown node device type %s") % nodedev)
|
||||
|
||||
|
||||
_XML_PROP_ORDER = ["mode", "type", "managed", "vendor", "product",
|
||||
- "domain", "bus", "slot", "function"]
|
||||
+ "domain", "bus", "slot", "function", "model",
|
||||
+ "display", "ramfb"]
|
||||
|
||||
mode = XMLProperty("./@mode")
|
||||
type = XMLProperty("./@type")
|
||||
managed = XMLProperty("./@managed", is_yesno=True)
|
||||
+ model = XMLProperty("./@model")
|
||||
+ display = XMLProperty("./@display")
|
||||
+ ramfb = XMLProperty("./@ramfb")
|
||||
|
||||
vendor = XMLProperty("./source/vendor/@id")
|
||||
product = XMLProperty("./source/product/@id")
|
||||
@@ -92,6 +123,9 @@ class DeviceHostdev(Device):
|
||||
# type=misc handling
|
||||
storage_block = XMLProperty("./source/block")
|
||||
|
||||
+ # type=mdev
|
||||
+ uuid = XMLProperty("./source/address/@uuid")
|
||||
+
|
||||
|
||||
##################
|
||||
# Default config #
|
||||
Index: virt-manager-3.2.0/virtinst/nodedev.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/nodedev.py
|
||||
+++ virt-manager-3.2.0/virtinst/nodedev.py
|
||||
@@ -40,6 +40,7 @@ class NodeDevice(XMLBuilder):
|
||||
CAPABILITY_TYPE_SCSIBUS = "scsi_host"
|
||||
CAPABILITY_TYPE_SCSIDEV = "scsi"
|
||||
CAPABILITY_TYPE_DRM = "drm"
|
||||
+ CAPABILITY_TYPE_MDEV = "mdev"
|
||||
|
||||
@staticmethod
|
||||
def lookupNodedevFromString(conn, idstring):
|
||||
@@ -168,6 +169,9 @@ class NodeDevice(XMLBuilder):
|
||||
if len(self.devnodes) > 0:
|
||||
return self.devnodes[0]
|
||||
|
||||
+ # type='mdev' options
|
||||
+ type_id = XMLProperty("./capability/type/@id")
|
||||
+
|
||||
|
||||
def _AddressStringToHostdev(conn, addrstr):
|
||||
from .devices import DeviceHostdev
|
@ -1,185 +0,0 @@
|
||||
Subject: tests: verify MDEV support
|
||||
From: Shalini Chellathurai Saroja shalini@linux.ibm.com Mon May 31 21:54:28 2021 +0200
|
||||
Date: Tue Jun 1 17:07:36 2021 -0400:
|
||||
Git: 9d4002ee0f7088c490748ffb3144c006f4e39c68
|
||||
|
||||
Add tests to verify add, edit and remove features of mediated
|
||||
devices.
|
||||
|
||||
Reviewed-by: Cole Robinson <crobinso@redhat.com>
|
||||
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
|
||||
|
||||
--- /dev/null
|
||||
+++ b/tests/data/cli/compare/virt-xml-add-hostdev-mdev-start.xml
|
||||
@@ -0,0 +1,12 @@
|
||||
+ <model type="cirrus" vram="16384" heads="1" primary="yes"/>
|
||||
+ </video>
|
||||
+ <memballoon model="virtio"/>
|
||||
++ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
|
||||
++ <source>
|
||||
++ <address uuid="8e37ee90-2b51-45e3-9b25-bf8283c03110"/>
|
||||
++ </source>
|
||||
++ </hostdev>
|
||||
+ </devices>
|
||||
+ </domain>
|
||||
+
|
||||
+Domain 'test-state-shutoff' started successfully.
|
||||
--- /dev/null
|
||||
+++ b/tests/data/cli/compare/virt-xml-add-hostdev-mdev.xml
|
||||
@@ -0,0 +1,14 @@
|
||||
+ <vsock model="virtio">
|
||||
+ <cid auto="no" address="5"/>
|
||||
+ </vsock>
|
||||
++ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
|
||||
++ <source>
|
||||
++ <address uuid="8e37ee90-2b51-45e3-9b25-bf8283c03110"/>
|
||||
++ </source>
|
||||
++ </hostdev>
|
||||
+ </devices>
|
||||
+ <seclabel type="dynamic" model="selinux" relabel="yes"/>
|
||||
+ <keywrap>
|
||||
+
|
||||
+Domain 'test-for-virtxml' defined successfully.
|
||||
+Changes will take effect after the domain is fully powered off.
|
||||
--- a/tests/data/cli/compare/virt-xml-edit-all.xml
|
||||
+++ b/tests/data/cli/compare/virt-xml-edit-all.xml
|
||||
@@ -10,6 +10,13 @@
|
||||
<rom bar="off"/>
|
||||
+ <driver name="vfio"/>
|
||||
</hostdev>
|
||||
+ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
|
||||
+ <source>
|
||||
+ <address uuid="b1ae8bf6-38b0-4c81-9d44-78ce3f520496"/>
|
||||
+ </source>
|
||||
+ <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0002"/>
|
||||
++ <driver name="vfio"/>
|
||||
+ </hostdev>
|
||||
<redirdev bus="usb" type="tcp">
|
||||
<source mode="connect" host="localhost" service="4000"/>
|
||||
|
||||
--- /dev/null
|
||||
+++ b/tests/data/cli/compare/virt-xml-edit-hostdev-mdev.xml
|
||||
@@ -0,0 +1,11 @@
|
||||
+ <source>
|
||||
+ <address uuid="b1ae8bf6-38b0-4c81-9d44-78ce3f520496"/>
|
||||
+ </source>
|
||||
+- <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0002"/>
|
||||
++ <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0008"/>
|
||||
+ </hostdev>
|
||||
+ <redirdev bus="usb" type="tcp">
|
||||
+ <source mode="connect" host="localhost" service="4000"/>
|
||||
+
|
||||
+Domain 'test-for-virtxml' defined successfully.
|
||||
+Changes will take effect after the domain is fully powered off.
|
||||
--- a/tests/data/cli/compare/virt-xml-edit-simple-redirdev.xml
|
||||
+++ b/tests/data/cli/compare/virt-xml-edit-simple-redirdev.xml
|
||||
@@ -1,5 +1,5 @@
|
||||
</source>
|
||||
- <rom bar="off"/>
|
||||
+ <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0002"/>
|
||||
</hostdev>
|
||||
- <redirdev bus="usb" type="tcp">
|
||||
- <source mode="connect" host="localhost" service="4000"/>
|
||||
--- /dev/null
|
||||
+++ b/tests/data/cli/compare/virt-xml-remove-hostdev-mdev.xml
|
||||
@@ -0,0 +1,15 @@
|
||||
+ </source>
|
||||
+ <rom bar="off"/>
|
||||
+ </hostdev>
|
||||
+- <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
|
||||
+- <source>
|
||||
+- <address uuid="b1ae8bf6-38b0-4c81-9d44-78ce3f520496"/>
|
||||
+- </source>
|
||||
+- <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0002"/>
|
||||
+- </hostdev>
|
||||
+ <redirdev bus="usb" type="tcp">
|
||||
+ <source mode="connect" host="localhost" service="4000"/>
|
||||
+ <protocol type="raw"/>
|
||||
+
|
||||
+Domain 'test-for-virtxml' defined successfully.
|
||||
+Changes will take effect after the domain is fully powered off.
|
||||
--- a/tests/data/testdriver/testsuite.xml
|
||||
+++ b/tests/data/testdriver/testsuite.xml
|
||||
@@ -259,6 +259,12 @@
|
||||
</source>
|
||||
<rom bar='off'/>
|
||||
</hostdev>
|
||||
+ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
|
||||
+ <source>
|
||||
+ <address uuid="b1ae8bf6-38b0-4c81-9d44-78ce3f520496"/>
|
||||
+ </source>
|
||||
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
|
||||
+ </hostdev>
|
||||
|
||||
<serial type='null'/>
|
||||
|
||||
@@ -737,5 +743,31 @@
|
||||
</capability>
|
||||
</device>
|
||||
|
||||
+<device>
|
||||
+ <name>mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110</name>
|
||||
+ <path>/sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110</path>
|
||||
+ <parent>css_0_0_0023</parent>
|
||||
+ <driver>
|
||||
+ <name>vfio_mdev</name>
|
||||
+ </driver>
|
||||
+ <capability type='mdev'>
|
||||
+ <type id='vfio_ccw-io'/>
|
||||
+ <iommuGroup number='0'/>
|
||||
+ </capability>
|
||||
+</device>
|
||||
+
|
||||
+<device>
|
||||
+ <name>mdev_b1ae8bf6_38b0_4c81_9d44_78ce3f520496</name>
|
||||
+ <path>/sys/devices/css0/0.0.0023/b1ae8bf6-38b0-4c81-9d44-78ce3f520496</path>
|
||||
+ <parent>css_0_0_0023</parent>
|
||||
+ <driver>
|
||||
+ <name>vfio_mdev</name>
|
||||
+ </driver>
|
||||
+ <capability type='mdev'>
|
||||
+ <type id='vfio_ccw-io'/>
|
||||
+ <iommuGroup number='0'/>
|
||||
+ </capability>
|
||||
+</device>
|
||||
+
|
||||
|
||||
</node>
|
||||
--- a/tests/test_cli.py
|
||||
+++ b/tests/test_cli.py
|
||||
@@ -1274,6 +1274,7 @@ c.add_compare("--edit mac=00:11:7f:33:44
|
||||
c.add_compare("--edit target=hda --disk boot_order=1", "edit-select-disk-bootorder")
|
||||
c.add_compare("--edit path=/dev/null --disk path=,target=fdb,boot_order=12", "edit-disk-unset") # --disk matching, using empty value to unset path
|
||||
c.add_compare("--edit --memballoon none", "edit-disable-memballoon")
|
||||
+c.add_compare("--edit address.devno=0x0002 --hostdev address.devno=0x0008", "edit-hostdev-mdev")
|
||||
|
||||
c = vixml.add_category("edit and start selection", "test-state-shutoff --print-diff --start")
|
||||
c.add_compare("--define --edit target=vda --disk boot_order=1", "start-select-disk-bootorder")
|
||||
@@ -1308,6 +1309,8 @@ c.add_compare("--remove-device --disk /d
|
||||
c.add_compare("--remove-device --video all", "remove-video-all")
|
||||
c.add_compare("--remove-device --host-device 0x04b3:0x4485", "remove-hostdev-name")
|
||||
c.add_compare("--remove-device --memballoon all", "remove-memballoon")
|
||||
+c.add_compare("--add-device --hostdev mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110", "add-hostdev-mdev")
|
||||
+c.add_compare("--remove-device --hostdev mdev_b1ae8bf6_38b0_4c81_9d44_78ce3f520496", "remove-hostdev-mdev")
|
||||
|
||||
c = vixml.add_category("add/rm devices and start", "test-state-shutoff --print-diff --start")
|
||||
c.add_invalid("--add-device --pm suspend_to_disk=yes") # --add-device without a device
|
||||
@@ -1318,6 +1321,7 @@ c.add_compare("--define --add-device --h
|
||||
c.add_compare("--add-device --disk %(EXISTIMG1)s,bus=virtio,target=vdf", "add-disk-basic-start")
|
||||
c.add_compare("--add-device --disk %(NEWIMG1)s,size=.01", "add-disk-create-storage-start")
|
||||
c.add_compare("--remove-device --disk /dev/null", "remove-disk-path-start")
|
||||
+c.add_compare("--add-device --hostdev mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110", "add-hostdev-mdev-start")
|
||||
|
||||
c = vixml.add_category("add/rm devices OS KVM", "--connect %(URI-KVM)s test --print-diff --define")
|
||||
c.add_compare("--add-device --disk %(EXISTIMG1)s", "kvm-add-disk-os-from-xml") # Guest OS (none) from XML
|
||||
--- a/tests/utils.py
|
||||
+++ b/tests/utils.py
|
||||
@@ -231,7 +231,7 @@ def diff_compare(actual_out, filename=No
|
||||
open(filename, "w").write(actual_out)
|
||||
expect_out = open(filename).read()
|
||||
|
||||
- diff = xmlutil.diff(expect_out, actual_out,
|
||||
+ diff = xmlutil.diff(expect_out.rstrip(), actual_out.rstrip(),
|
||||
filename or '', "Generated output")
|
||||
if diff:
|
||||
raise AssertionError("Conversion outputs did not match.\n%s" % diff)
|
@ -1,39 +0,0 @@
|
||||
Subject: console: fix error with old pygobject
|
||||
From: Pavel Hrdina phrdina@redhat.com Fri Feb 5 12:15:46 2021 +0100
|
||||
Date: Fri Feb 5 12:15:46 2021 +0100:
|
||||
Git: cf93e2dbff28fe05d6d45364c579f923b157beb1
|
||||
|
||||
The code doesn't work as expected. From python documentation:
|
||||
|
||||
x and y
|
||||
|
||||
is the same as
|
||||
|
||||
x if not x or y
|
||||
|
||||
so in the code if for some reasone `dev` is None the value stored in
|
||||
`sensitive` will be None as well.
|
||||
|
||||
No the code itself works with pygobject >= 3.31.3 where they allowed
|
||||
None as a valid boolean value, but with older versions it will fail
|
||||
with this error message:
|
||||
|
||||
TypeError: Argument 1 does not allow None as a value
|
||||
|
||||
Resolves: https://github.com/virt-manager/virt-manager/issues/226
|
||||
|
||||
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
||||
|
||||
diff --git a/virtManager/details/console.py b/virtManager/details/console.py
|
||||
index c4ed478e..18f9ddd9 100644
|
||||
--- a/virtManager/details/console.py
|
||||
+++ b/virtManager/details/console.py
|
||||
@@ -258,7 +258,7 @@ class _ConsoleMenu:
|
||||
|
||||
cb = toggled_cb
|
||||
cbdata = dev
|
||||
- sensitive = dev and not tooltip
|
||||
+ sensitive = bool(dev and not tooltip)
|
||||
|
||||
active = False
|
||||
if oldlabel is None and sensitive:
|
@ -1,27 +0,0 @@
|
||||
Subject: volumeupload: Use 1MiB read size
|
||||
From: Cole Robinson crobinso@redhat.com Wed Feb 3 14:02:32 2021 -0500
|
||||
Date: Wed Feb 3 14:15:57 2021 -0500:
|
||||
Git: d3c627f189dc107f22d0b614537fd0a8937c65a9
|
||||
|
||||
Rather than 1K. This drastically speeds up the volumeupload case
|
||||
for a local URI for the cost of some higher runtime memory but
|
||||
I think that's worth it
|
||||
|
||||
Fixes: #221
|
||||
|
||||
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
diff --git a/virtinst/install/volumeupload.py b/virtinst/install/volumeupload.py
|
||||
index 02634f95..431e848c 100644
|
||||
--- a/virtinst/install/volumeupload.py
|
||||
+++ b/virtinst/install/volumeupload.py
|
||||
@@ -108,8 +108,7 @@ def _upload_file(conn, meter, destpool, src):
|
||||
meter.start(size=size,
|
||||
text=_("Transferring %s") % os.path.basename(src))
|
||||
while True:
|
||||
- # blocksize = (1024 ** 2)
|
||||
- blocksize = 1024
|
||||
+ blocksize = 1024 * 1024 # 1 MiB
|
||||
data = fileobj.read(blocksize)
|
||||
if not data:
|
||||
break
|
@ -1,29 +0,0 @@
|
||||
Subject: Fix forgetting password from keyring
|
||||
From: WGH wgh@torlan.ru Sun Mar 21 20:44:02 2021 +0300
|
||||
Date: Tue Apr 6 18:30:08 2021 -0400:
|
||||
Git: d9b5090e061e9fad9738359a8b1f86f16eac45cf
|
||||
|
||||
First, Item.Delete never accepted any arguments, so this code likely
|
||||
never worked.
|
||||
|
||||
Second, Item.Delete might return a Prompt object, which client
|
||||
is supposed to call if keyring wants to confirm deletion.
|
||||
|
||||
diff --git a/virtManager/lib/keyring.py b/virtManager/lib/keyring.py
|
||||
index 203886dc..c0f50142 100644
|
||||
--- a/virtManager/lib/keyring.py
|
||||
+++ b/virtManager/lib/keyring.py
|
||||
@@ -87,7 +87,12 @@ class vmmKeyring(vmmGObject):
|
||||
iface = Gio.DBusProxy.new_sync(self._dbus, 0, None,
|
||||
"org.freedesktop.secrets", path,
|
||||
"org.freedesktop.Secret.Item", None)
|
||||
- iface.Delete("(s)", "/")
|
||||
+ prompt = iface.Delete()
|
||||
+ if prompt != "/":
|
||||
+ iface = Gio.DBusProxy.new_sync(self._dbus, 0, None,
|
||||
+ "org.freedesktop.secrets", prompt,
|
||||
+ "org.freedesktop.Secret.Prompt", None)
|
||||
+ iface.Prompt("(s)", "")
|
||||
except Exception:
|
||||
log.exception("Failed to delete keyring secret")
|
||||
|
@ -1,23 +0,0 @@
|
||||
Subject: addstorage: Don't pass None to widget.set_active()
|
||||
From: Cole Robinson crobinso@redhat.com Sat Nov 21 17:17:33 2020 -0500
|
||||
Date: Sat Nov 21 17:17:33 2020 -0500:
|
||||
Git: e7222b5058c8874b15fbfd998e5eeb233f571075
|
||||
|
||||
Older pygobject can't handle it. Mentioned here:
|
||||
https://github.com/virt-manager/virt-manager/issues/188
|
||||
|
||||
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
diff --git a/virtManager/device/addstorage.py b/virtManager/device/addstorage.py
|
||||
index dee0160c..49d0b693 100644
|
||||
--- a/virtManager/device/addstorage.py
|
||||
+++ b/virtManager/device/addstorage.py
|
||||
@@ -310,7 +310,7 @@ class vmmAddStorage(vmmGObjectUI):
|
||||
detect_zeroes = disk.driver_detect_zeroes
|
||||
ro = disk.read_only
|
||||
share = disk.shareable
|
||||
- removable = disk.removable
|
||||
+ removable = bool(disk.removable)
|
||||
serial = disk.serial
|
||||
|
||||
self.set_disk_bus(disk.bus)
|
@ -1,22 +0,0 @@
|
||||
Subject: hostdev: use method get_mdev_uuid()
|
||||
From: Shalini Chellathurai Saroja shalini@linux.ibm.com Mon May 31 21:54:27 2021 +0200
|
||||
Date: Tue Jun 1 17:07:36 2021 -0400:
|
||||
Git: f87e96d3d40891f1403601abc389c24800ba1069
|
||||
|
||||
Use method get_mdev_uuid() to retrieve the UUID of MDEV node device
|
||||
object.
|
||||
|
||||
Reviewed-by: Cole Robinson <crobinso@redhat.com>
|
||||
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
|
||||
|
||||
--- a/virtinst/devices/hostdev.py
|
||||
+++ b/virtinst/devices/hostdev.py
|
||||
@@ -78,7 +78,7 @@ class DeviceHostdev(Device):
|
||||
_("Don't know how to generate nodedev for mdev type id '%s'") %
|
||||
nodedev.type_id)
|
||||
|
||||
- self.uuid = nodedev.name[5:].replace('_', '-')
|
||||
+ self.uuid = nodedev.get_mdev_uuid()
|
||||
|
||||
else:
|
||||
raise ValueError(_("Unknown node device type %s") % nodedev)
|
@ -1,29 +0,0 @@
|
||||
Subject: createnet: Remove some unnecessary max_length annotations
|
||||
From: Cole Robinson crobinso@redhat.com Tue Apr 6 13:35:15 2021 -0400
|
||||
Date: Tue Apr 6 13:35:15 2021 -0400:
|
||||
Git: fe8722e763928980315467ef185a27dbf07d3d15
|
||||
|
||||
Fixes: #238
|
||||
|
||||
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
diff --git a/ui/createnet.ui b/ui/createnet.ui
|
||||
index a70ec7e2..18a1795f 100644
|
||||
--- a/ui/createnet.ui
|
||||
+++ b/ui/createnet.ui
|
||||
@@ -229,7 +229,6 @@
|
||||
<object class="GtkEntry" id="net-name">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
- <property name="max_length">16</property>
|
||||
<property name="width_chars">25</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="net-name-atkobject">
|
||||
@@ -730,7 +729,6 @@
|
||||
<object class="GtkEntry" id="net-domain-name">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
- <property name="max_length">20</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="width_chars">20</property>
|
||||
<child internal-child="accessible">
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e858f393b74593dace3e19503a2e6b50e41fd512ee20545c0475199d912fb31e
|
||||
size 1636046
|
3
virt-manager-4.0.0.tar.gz
Normal file
3
virt-manager-4.0.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:515aaa2021a4bf352b0573098fe6958319b1ba8ec508ea37e064803f97f17086
|
||||
size 3096236
|
@ -1,3 +1,28 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 2 21:11:58 MST 2022 - carnold@suse.com
|
||||
|
||||
- bsc#1196202 - virt-install crashes on a time-of-check time-of-use
|
||||
(TOCTOU) race condition
|
||||
Resolved by upgrade to version 4.0.0 (jsc#SLE-16582)
|
||||
virt-manager-4.0.0.tar.gz
|
||||
- Other features and bug fixes (bsc#1027942)
|
||||
virt-install –os-variant/–osinfo is now a hard requirement for most cases
|
||||
Add ‘Enable shared memory’ UI checkbox (Lin Ma)
|
||||
add UI preference to default to UEFI for new VMs (Charles Arnold)
|
||||
Add virtiofs filesystem driver UI option
|
||||
Fill in all –cputune, –cpu, –shmem, –input, and –boot suboptions (Hugues Fafard)
|
||||
virt-* mdev improvements (Shalini Chellathurai Saroja)
|
||||
bhyve improvments (Roman Bogorodskiy)
|
||||
Revive network portgroup UI
|
||||
enable a TPM by default when UEFI is used (Daniel P. Berrangé)
|
||||
Use cpu host-passthrough by default on qemu x86
|
||||
use virtio-gpu video for most modern distros
|
||||
Default to extra pcie root ports for q35
|
||||
set discard=unmap by default for sparse disks and block devices
|
||||
We now require xorissofs for –location ISO
|
||||
We now use setuptools rather than just plain distutils
|
||||
- Add virtman-revert-use-of-AyatanaAppIndicator3.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 20 15:46:02 MST 2022 - carnold@suse.com
|
||||
|
||||
|
@ -21,30 +21,17 @@
|
||||
%global default_hvs "qemu,xen,lxc"
|
||||
|
||||
Name: virt-manager
|
||||
Version: 3.2.0
|
||||
Version: 4.0.0
|
||||
Release: 0
|
||||
Summary: Virtual Machine Manager
|
||||
License: GPL-2.0-or-later
|
||||
Group: System/Monitoring
|
||||
URL: http://virt-manager.org/
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: virt-install.rb
|
||||
Source2: virt-install.desktop
|
||||
Source3: virt-manager-supportconfig
|
||||
# Upstream Patches
|
||||
Patch1: e7222b50-addstorage-Dont-pass-None-to-widget.set_active.patch
|
||||
Patch2: 4d0e3232-virtinst-Fix-TOCTOU-in-domain-enumeration.patch
|
||||
Patch3: d3c627f1-volumeupload-Use-1MiB-read-size.patch
|
||||
Patch4: cf93e2db-console-fix-error-with-old-pygobject.patch
|
||||
Patch5: 143c6bef-virtinst-fix-error-message-format-string.patch
|
||||
Patch6: fe8722e7-createnet-Remove-some-unnecessary-max_length-annotations.patch
|
||||
Patch7: d9b5090e-Fix-forgetting-password-from-keyring.patch
|
||||
Patch8: 965480e8-virt-install-add-mediated-device.patch
|
||||
Patch9: 9363e1e6-virt-xml-add-support-for-mediated-devices.patch
|
||||
Patch10: f87e96d3-hostdev-use-method-get_mdev_uuid.patch
|
||||
Patch11: 9d4002ee-tests-verify-MDEV-support.patch
|
||||
Patch12: 0e15cd51-virt-manager-enable-MDEV-support.patch
|
||||
Patch13: 8bb64ad5-console-Dont-block-console-reconnect-for-non-error.patch
|
||||
# SUSE Only
|
||||
Patch70: virtman-desktop.patch
|
||||
Patch71: virtman-kvm.patch
|
||||
@ -57,7 +44,6 @@ Patch76: virtinst-set-qemu-emulator.patch
|
||||
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-vol-default-nocow.patch
|
||||
@ -67,7 +53,6 @@ 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
|
||||
@ -78,8 +63,7 @@ Patch156: virtman-dont-specify-gtksource-version.patch
|
||||
Patch157: virtman-fix-restore-vm-menu-selection.patch
|
||||
Patch158: virtman-disallow-adding-floppy-disk.patch
|
||||
Patch159: virtman-register-delete-event-for-details-dialog.patch
|
||||
Patch160: virtman-show-no-firmware-for-xenpv.patch
|
||||
Patch161: virtman-legacy-bios-support.patch
|
||||
Patch160: virtman-revert-use-of-AyatanaAppIndicator3.patch
|
||||
Patch170: virtinst-xen-drive-type.patch
|
||||
Patch171: virtinst-xenbus-disk-index-fix.patch
|
||||
Patch172: virtinst-refresh_before_fetch_pool.patch
|
||||
@ -112,6 +96,7 @@ Recommends: python3-SpiceClientGtk
|
||||
Requires: virt-install
|
||||
Requires: virt-manager-common = %{verrel}
|
||||
Requires: typelib(GtkSource)
|
||||
Recommends: xorriso
|
||||
|
||||
%if %{with_guestfs}
|
||||
Requires: python3-libguestfs
|
||||
@ -120,6 +105,7 @@ Requires: python3-libguestfs
|
||||
BuildRequires: gettext
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-docutils
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
%description
|
||||
Virtual Machine Manager provides a graphical tool for administering virtual
|
||||
@ -128,7 +114,6 @@ connect to a graphical or serial console, and see resource usage statistics
|
||||
for existing VMs on local or remote machines. Uses libvirt as the backend
|
||||
management API.
|
||||
|
||||
|
||||
%package common
|
||||
Summary: Common files used by the different Virtual Machine Manager interfaces
|
||||
Group: System/Monitoring
|
||||
@ -151,7 +136,6 @@ BuildRequires: gobject-introspection
|
||||
Common files used by the different virt-manager interfaces, as well as
|
||||
virt-install related tools.
|
||||
|
||||
|
||||
%package -n virt-install
|
||||
Summary: Utilities for installing virtual machines
|
||||
Group: System/Monitoring
|
||||
@ -169,23 +153,9 @@ Package includes several command line utilities, including virt-install
|
||||
(build and install new VMs) and virt-clone (clone an existing virtual
|
||||
machine).
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
# Upstream Patches
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
# SUSE Only
|
||||
%patch70 -p1
|
||||
%patch71 -p1
|
||||
@ -198,7 +168,6 @@ machine).
|
||||
%patch103 -p1
|
||||
%patch104 -p1
|
||||
%patch105 -p1
|
||||
%patch106 -p1
|
||||
%patch120 -p1
|
||||
%patch121 -p1
|
||||
%patch122 -p1
|
||||
@ -208,7 +177,6 @@ machine).
|
||||
%patch126 -p1
|
||||
%patch127 -p1
|
||||
%patch128 -p1
|
||||
%patch129 -p1
|
||||
# Bug Fixes
|
||||
%patch151 -p1
|
||||
%patch152 -p1
|
||||
@ -220,7 +188,6 @@ machine).
|
||||
%patch158 -p1
|
||||
%patch159 -p1
|
||||
%patch160 -p1
|
||||
%patch161 -p1
|
||||
%patch170 -p1
|
||||
%patch171 -p1
|
||||
%patch172 -p1
|
||||
|
@ -1,10 +1,10 @@
|
||||
References: bsc#1010060
|
||||
|
||||
Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-3.0.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
@@ -277,6 +277,12 @@ class _SUSEContent(object):
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
@@ -278,6 +278,12 @@ class _SUSEContent(object):
|
||||
self.product_name.strip().rsplit(' ')[5][2])
|
||||
distro_version = sle_version
|
||||
|
||||
@ -17,7 +17,7 @@ Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
return distro_version
|
||||
|
||||
|
||||
@@ -563,6 +569,9 @@ class _SuseDistro(_RHELDistro):
|
||||
@@ -564,6 +570,9 @@ class _SuseDistro(_RHELDistro):
|
||||
|
||||
version = distro_version.split('.', 1)[0].strip()
|
||||
|
||||
@ -27,7 +27,7 @@ Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
if str(self._variant_prefix).startswith(("sles", "sled", "oes")):
|
||||
sp_version = ""
|
||||
if len(distro_version.split('.', 1)) == 2:
|
||||
@@ -632,6 +641,14 @@ class _OpensuseDistro(_SuseDistro):
|
||||
@@ -633,6 +642,14 @@ class _OpensuseDistro(_SuseDistro):
|
||||
famregex = ".*openSUSE.*"
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
class _OESDistro(_SuseDistro):
|
||||
PRETTY_NAME = "OES"
|
||||
matching_distros = ["oes"]
|
||||
@@ -869,6 +886,7 @@ def _build_distro_list(osobj):
|
||||
@@ -870,6 +887,7 @@ def _build_distro_list(osobj):
|
||||
_SLESDistro,
|
||||
_SLEDDistro,
|
||||
_OpensuseDistro,
|
||||
|
@ -1,10 +1,10 @@
|
||||
References: bsc#1192238, jsc#SLE-17764
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
@@ -723,6 +723,26 @@ class _OESDistro(_SuseDistro):
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
@@ -724,6 +724,26 @@ class _OESDistro(_SuseDistro):
|
||||
famregex = ".*Open Enterprise Server.*"
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ Index: virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
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 +969,7 @@ def _build_distro_list(osobj):
|
||||
@@ -950,6 +970,7 @@ def _build_distro_list(osobj):
|
||||
_FedoraDistro,
|
||||
_RHELDistro,
|
||||
_CentOSDistro,
|
||||
|
@ -1,11 +1,11 @@
|
||||
References: fate#326698 - Add pvh support to virt-manager
|
||||
At this time support is disabled in this patch.
|
||||
|
||||
Index: virt-manager-3.2.0/virtManager/createvm.py
|
||||
Index: virt-manager-4.0.0/virtManager/createvm.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtManager/createvm.py
|
||||
+++ virt-manager-3.2.0/virtManager/createvm.py
|
||||
@@ -839,6 +839,9 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
--- virt-manager-4.0.0.orig/virtManager/createvm.py
|
||||
+++ virt-manager-4.0.0/virtManager/createvm.py
|
||||
@@ -844,6 +844,9 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
break
|
||||
if label is None:
|
||||
continue
|
||||
@ -15,11 +15,11 @@ Index: virt-manager-3.2.0/virtManager/createvm.py
|
||||
|
||||
# Determine if this is the default given by guest_lookup
|
||||
if (gtype == self._capsinfo.os_type and
|
||||
Index: virt-manager-3.2.0/virtinst/domain/os.py
|
||||
Index: virt-manager-4.0.0/virtinst/domain/os.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/domain/os.py
|
||||
+++ virt-manager-3.2.0/virtinst/domain/os.py
|
||||
@@ -32,6 +32,8 @@ class DomainOs(XMLBuilder):
|
||||
--- virt-manager-4.0.0.orig/virtinst/domain/os.py
|
||||
+++ virt-manager-4.0.0/virtinst/domain/os.py
|
||||
@@ -46,6 +46,8 @@ class DomainOs(XMLBuilder):
|
||||
return self.os_type == "hvm"
|
||||
def is_xenpv(self):
|
||||
return self.os_type in ["xen", "linux"]
|
||||
@ -28,24 +28,24 @@ Index: virt-manager-3.2.0/virtinst/domain/os.py
|
||||
def is_container(self):
|
||||
return self.os_type == "exe"
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/guest.py
|
||||
Index: virt-manager-4.0.0/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-3.2.0/virtinst/guest.py
|
||||
@@ -814,7 +814,7 @@ class Guest(XMLBuilder):
|
||||
--- virt-manager-4.0.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-4.0.0/virtinst/guest.py
|
||||
@@ -886,7 +886,7 @@ class Guest(XMLBuilder):
|
||||
|
||||
usb_tablet = False
|
||||
usb_keyboard = False
|
||||
- if self.os.is_x86() and not self.os.is_xenpv():
|
||||
+ if self.os.is_x86() and not self.os.is_xenpv() and not self.os.is_xenpvh():
|
||||
usb_tablet = self.osinfo.supports_usbtablet()
|
||||
usb_tablet = True
|
||||
if (self.os.is_arm_machvirt() or
|
||||
self.os.is_riscv_virt() or
|
||||
Index: virt-manager-3.2.0/virtManager/object/domain.py
|
||||
Index: virt-manager-4.0.0/virtManager/object/domain.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtManager/object/domain.py
|
||||
+++ virt-manager-3.2.0/virtManager/object/domain.py
|
||||
@@ -1219,6 +1219,8 @@ class vmmDomain(vmmLibvirtObject):
|
||||
--- virt-manager-4.0.0.orig/virtManager/object/domain.py
|
||||
+++ virt-manager-4.0.0/virtManager/object/domain.py
|
||||
@@ -1274,6 +1274,8 @@ class vmmDomain(vmmLibvirtObject):
|
||||
return self.get_xmlobj().os.is_xenpv()
|
||||
def is_hvm(self):
|
||||
return self.get_xmlobj().os.is_hvm()
|
||||
@ -54,10 +54,10 @@ Index: virt-manager-3.2.0/virtManager/object/domain.py
|
||||
|
||||
def get_uuid(self):
|
||||
if self._uuid is None:
|
||||
Index: virt-manager-3.2.0/virtManager/connection.py
|
||||
Index: virt-manager-4.0.0/virtManager/connection.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtManager/connection.py
|
||||
+++ virt-manager-3.2.0/virtManager/connection.py
|
||||
--- virt-manager-4.0.0.orig/virtManager/connection.py
|
||||
+++ virt-manager-4.0.0/virtManager/connection.py
|
||||
@@ -211,6 +211,8 @@ class vmmConnection(vmmGObject):
|
||||
label = "xen (paravirt)"
|
||||
elif gtype == "hvm":
|
||||
|
@ -1,10 +1,10 @@
|
||||
References: bsc#1190215
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
@@ -273,12 +273,17 @@ class _SUSEContent(object):
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
@@ -274,12 +274,17 @@ class _SUSEContent(object):
|
||||
if "Enterprise" in self.product_name or "SLES" in self.product_name:
|
||||
if " SAP " in self.product_name:
|
||||
sle_version = self.product_name.strip().rsplit(' ')[7]
|
||||
@ -22,7 +22,7 @@ Index: virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
else:
|
||||
sle_version = (sle_version + '.' +
|
||||
self.product_name.strip().rsplit(' ')[5][2])
|
||||
@@ -670,6 +675,14 @@ class _SLESDistro(_SuseDistro):
|
||||
@@ -671,6 +676,14 @@ class _SLESDistro(_SuseDistro):
|
||||
famregex = ".*SUSE Linux Enterprise.*"
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ Index: virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
class _SLEDDistro(_SuseDistro):
|
||||
PRETTY_NAME = "SLED"
|
||||
matching_distros = ["sled"]
|
||||
@@ -938,6 +951,7 @@ def _build_distro_list(osobj):
|
||||
@@ -939,6 +952,7 @@ def _build_distro_list(osobj):
|
||||
_CentOSDistro,
|
||||
_SLEDistro,
|
||||
_SLESDistro,
|
||||
|
@ -1,10 +1,10 @@
|
||||
References: bsc#1054986
|
||||
|
||||
Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-3.0.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
@@ -596,6 +596,10 @@ class _SuseDistro(_RHELDistro):
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
@@ -597,6 +597,10 @@ class _SuseDistro(_RHELDistro):
|
||||
if re.search("openSUSE Tumbleweed", self.cache.treeinfo_name):
|
||||
return "opensusetumbleweed"
|
||||
|
||||
@ -15,7 +15,7 @@ Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
version, update = self.cache.split_version()
|
||||
base = self._variant_prefix + str(version)
|
||||
while update >= 0:
|
||||
@@ -603,7 +607,10 @@ class _SuseDistro(_RHELDistro):
|
||||
@@ -604,7 +608,10 @@ class _SuseDistro(_RHELDistro):
|
||||
# SLE doesn't use '.0' for initial releases in
|
||||
# osinfo-db (sles11, sles12, etc)
|
||||
if update > 0 or not base.startswith('sle'):
|
||||
@ -27,7 +27,7 @@ Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
if OSDB.lookup_os(tryvar):
|
||||
return tryvar
|
||||
update -= 1
|
||||
@@ -617,6 +624,14 @@ class _SuseDistro(_RHELDistro):
|
||||
@@ -618,6 +625,14 @@ class _SuseDistro(_RHELDistro):
|
||||
return var
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
class _SLESDistro(_SuseDistro):
|
||||
PRETTY_NAME = "SLES"
|
||||
matching_distros = ["sles"]
|
||||
@@ -883,6 +898,7 @@ def _build_distro_list(osobj):
|
||||
@@ -884,6 +899,7 @@ def _build_distro_list(osobj):
|
||||
_FedoraDistro,
|
||||
_RHELDistro,
|
||||
_CentOSDistro,
|
||||
|
@ -1,11 +1,11 @@
|
||||
Add support for detecting SUSE Linux Enterprise Micro.
|
||||
See also the osinfo-db package for the description file.
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
@@ -275,7 +275,7 @@ class _SUSEContent(object):
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
@@ -276,7 +276,7 @@ class _SUSEContent(object):
|
||||
sle_version = self.product_name.strip().rsplit(' ')[7]
|
||||
else:
|
||||
sle_version = self.product_name.strip().rsplit(' ')[4]
|
||||
@ -14,7 +14,7 @@ Index: virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
if " SAP " in self.product_name:
|
||||
sle_version = (sle_version + '.' +
|
||||
self.product_name.strip().rsplit(' ')[8][2])
|
||||
@@ -596,6 +596,9 @@ class _SuseDistro(_RHELDistro):
|
||||
@@ -597,6 +597,9 @@ class _SuseDistro(_RHELDistro):
|
||||
|
||||
version = distro_version.split('.', 1)[0].strip()
|
||||
|
||||
@ -24,7 +24,7 @@ Index: virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
if self._variant_prefix.startswith(("caasp")):
|
||||
return self._variant_prefix + distro_version
|
||||
|
||||
@@ -683,6 +686,14 @@ class _OpensuseDistro(_SuseDistro):
|
||||
@@ -684,6 +687,14 @@ class _OpensuseDistro(_SuseDistro):
|
||||
famregex = ".*openSUSE.*"
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ Index: virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
class _CAASPDistro(_SuseDistro):
|
||||
PRETTY_NAME = "SLES"
|
||||
matching_distros = ["caasp"]
|
||||
@@ -929,6 +940,7 @@ def _build_distro_list(osobj):
|
||||
@@ -930,6 +941,7 @@ def _build_distro_list(osobj):
|
||||
_SLESDistro,
|
||||
_SLEDDistro,
|
||||
_OpensuseDistro,
|
||||
|
@ -1,10 +1,10 @@
|
||||
References: fate#326960, bsc#1123942
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/install/installer.py
|
||||
Index: virt-manager-4.0.0/virtinst/install/installer.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/install/installer.py
|
||||
+++ virt-manager-3.2.0/virtinst/install/installer.py
|
||||
@@ -604,7 +604,10 @@ class Installer(object):
|
||||
--- virt-manager-4.0.0.orig/virtinst/install/installer.py
|
||||
+++ virt-manager-4.0.0/virtinst/install/installer.py
|
||||
@@ -592,7 +592,10 @@ class Installer(object):
|
||||
guest.bootloader = "pygrub"
|
||||
else:
|
||||
guest.bootloader = None
|
||||
@ -16,11 +16,11 @@ Index: virt-manager-3.2.0/virtinst/install/installer.py
|
||||
log.debug("Using grub.xen to boot guest")
|
||||
on_reboot_value = guest.on_reboot
|
||||
self._alter_bootconfig(guest)
|
||||
Index: virt-manager-3.2.0/virtManager/delete.py
|
||||
Index: virt-manager-4.0.0/virtManager/delete.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtManager/delete.py
|
||||
+++ virt-manager-3.2.0/virtManager/delete.py
|
||||
@@ -458,7 +458,7 @@ def _populate_storage_list(storage_list,
|
||||
--- virt-manager-4.0.0.orig/virtManager/delete.py
|
||||
+++ virt-manager-4.0.0/virtManager/delete.py
|
||||
@@ -459,7 +459,7 @@ def _populate_storage_list(storage_list,
|
||||
model.clear()
|
||||
|
||||
for diskdata in diskdatas:
|
||||
|
@ -1,10 +1,10 @@
|
||||
Enhancement to correctly detect Open Enterprise Server media is
|
||||
selected as the installation source.
|
||||
Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-3.0.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
@@ -563,7 +563,7 @@ class _SuseDistro(_RHELDistro):
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
@@ -564,7 +564,7 @@ class _SuseDistro(_RHELDistro):
|
||||
|
||||
version = distro_version.split('.', 1)[0].strip()
|
||||
|
||||
@ -13,7 +13,7 @@ Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
sp_version = ""
|
||||
if len(distro_version.split('.', 1)) == 2:
|
||||
sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
|
||||
@@ -632,6 +632,14 @@ class _OpensuseDistro(_SuseDistro):
|
||||
@@ -633,6 +633,14 @@ class _OpensuseDistro(_SuseDistro):
|
||||
famregex = ".*openSUSE.*"
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
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/
|
||||
@@ -861,6 +869,7 @@ def _build_distro_list(osobj):
|
||||
@@ -862,6 +870,7 @@ def _build_distro_list(osobj):
|
||||
_SLESDistro,
|
||||
_SLEDDistro,
|
||||
_OpensuseDistro,
|
||||
|
@ -12,12 +12,12 @@ It should be noted that selecting "Customize configuration before install"
|
||||
and "CPUs" -> "Copy host CPU definition" also inserts 'host-model' so
|
||||
this change mirrors what is already done there.
|
||||
|
||||
Index: virt-manager-3.0.0/virtinst/domain/cpu.py
|
||||
Index: virt-manager-3.3.0/virtinst/domain/cpu.py
|
||||
===================================================================
|
||||
--- virt-manager-3.0.0.orig/virtinst/domain/cpu.py
|
||||
+++ virt-manager-3.0.0/virtinst/domain/cpu.py
|
||||
@@ -122,12 +122,16 @@ class DomainCpu(XMLBuilder):
|
||||
val = self.SPECIAL_MODE_HOST_MODEL
|
||||
--- virt-manager-3.3.0.orig/virtinst/domain/cpu.py
|
||||
+++ virt-manager-3.3.0/virtinst/domain/cpu.py
|
||||
@@ -282,7 +282,8 @@ class DomainCpu(XMLBuilder):
|
||||
log.debug("Using default cpu mode=%s", val)
|
||||
|
||||
if (val == self.SPECIAL_MODE_HOST_MODEL or
|
||||
- val == self.SPECIAL_MODE_HOST_PASSTHROUGH):
|
||||
@ -26,11 +26,13 @@ Index: virt-manager-3.0.0/virtinst/domain/cpu.py
|
||||
self.model = None
|
||||
self.vendor = None
|
||||
self.model_fallback = None
|
||||
@@ -290,6 +291,9 @@ class DomainCpu(XMLBuilder):
|
||||
self.check = None
|
||||
for f in self.features:
|
||||
self.remove_child(f)
|
||||
+ if val == self.SPECIAL_MODE_HOST_COPY:
|
||||
+ val = self.SPECIAL_MODE_HOST_MODEL
|
||||
+ self.match = "exact"
|
||||
self.mode = val
|
||||
elif val == self.SPECIAL_MODE_HOST_COPY:
|
||||
self.copy_host_cpu(guest)
|
||||
elif (val == self.SPECIAL_MODE_HV_DEFAULT or
|
||||
val == self.SPECIAL_MODE_CLEAR):
|
||||
|
@ -1,68 +0,0 @@
|
||||
From dc5e834199e19ad09de17ac13e9834d3f17bd112 Mon Sep 17 00:00:00 2001
|
||||
From: Bruce Rogers <brogers@suse.com>
|
||||
Date: Wed, 25 Nov 2020 10:34:56 -0700
|
||||
Subject: [PATCH] graphics: add check for qemu modules in spice graphics
|
||||
detection
|
||||
|
||||
For SLE and openSUSE qemu, starting with v5.1, spice and spice related
|
||||
qemu modules have been split away from the main system emulator and
|
||||
are packaged as Recommends, meaning that they may not be present.
|
||||
Up to now virt-manager has assumed spice is available for x86 qemu, but
|
||||
that is no longer the case. Unfortunately the standard libvirt feature
|
||||
detection can't yet help us out here, so we leapfrog libvirt by doing
|
||||
our own detection of whether the qemu modules needed to support the
|
||||
default guest install using spice, usb redirection, and qxl video are
|
||||
present.
|
||||
With v5.2, some additional qemu modules are also required, so we add
|
||||
a separate detection for that version, and add corresponding additional
|
||||
module checks.
|
||||
|
||||
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
||||
---
|
||||
virtinst/devices/graphics.py | 19 +++++++++++++++++++
|
||||
virtinst/support.py | 2 ++
|
||||
2 files changed, 21 insertions(+)
|
||||
|
||||
Index: virt-manager-3.1.0/virtinst/devices/graphics.py
|
||||
===================================================================
|
||||
--- virt-manager-3.1.0.orig/virtinst/devices/graphics.py
|
||||
+++ virt-manager-3.1.0/virtinst/devices/graphics.py
|
||||
@@ -135,6 +135,25 @@ class DeviceGraphics(Device):
|
||||
# Spice has issues on some host arches, like ppc, so allow it
|
||||
if self.conn.caps.host.cpu.arch not in ["i686", "x86_64"]:
|
||||
return False
|
||||
+ if self.conn.support.conn_spice_modular1():
|
||||
+ if self.conn.caps.host.cpu.arch in ["x86_64"]:
|
||||
+ if not (os.path.exists("/usr/lib64/qemu/hw-usb-redirect.so") and
|
||||
+ os.path.exists("/usr/lib64/qemu/hw-display-qxl.so")):
|
||||
+ return False
|
||||
+ if self.conn.support.conn_spice_modular2():
|
||||
+ if not (os.path.exists("/usr/lib64/qemu/chardev-spice.so") and
|
||||
+ os.path.exists("/usr/lib64/qemu/ui-spice-core.so") and
|
||||
+ os.path.exists("/usr/lib64/qemu/ui-opengl.so")):
|
||||
+ return False
|
||||
+ else:
|
||||
+ if not (os.path.exists("/usr/lib/qemu/hw-usb-redirect.so") and
|
||||
+ os.path.exists("/usr/lib/qemu/hw-display-qxl.so")):
|
||||
+ return False
|
||||
+ if self.conn.support.conn_spice_modular2():
|
||||
+ if not (os.path.exists("/usr/lib/qemu/chardev-spice.so") and
|
||||
+ os.path.exists("/usr/lib/qemu/ui-spice-core.so") and
|
||||
+ os.path.exists("/usr/lib/qemu/ui-opengl.so")):
|
||||
+ return False
|
||||
return True
|
||||
|
||||
def _listen_need_port(self):
|
||||
Index: virt-manager-3.1.0/virtinst/support.py
|
||||
===================================================================
|
||||
--- virt-manager-3.1.0.orig/virtinst/support.py
|
||||
+++ virt-manager-3.1.0/virtinst/support.py
|
||||
@@ -282,6 +282,8 @@ class SupportCache:
|
||||
conn_disk_driver_name_qemu = _make(
|
||||
hv_version={"qemu": 0, "xen": "4.2.0"},
|
||||
hv_libvirt_version={"qemu": 0, "xen": "1.1.0"})
|
||||
+ conn_spice_modular1 = _make(hv_version={"qemu": "5.1.0", "test": 0})
|
||||
+ conn_spice_modular2 = _make(hv_version={"qemu": "5.2.0", "test": 0})
|
||||
|
||||
# Domain checks
|
||||
domain_xml_inactive = _make(function="virDomain.XMLDesc", run_args=(),
|
@ -2,11 +2,11 @@ Older SLE guests have a two stage installation that need the ISO.
|
||||
Newer SLE PV guests hang when a cdrom device is attached without
|
||||
an ISO file.
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/install/installer.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/installer.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/install/installer.py
|
||||
+++ virt-manager-3.2.0/virtinst/install/installer.py
|
||||
@@ -167,7 +167,8 @@ class Installer(object):
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/installer.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/installer.py
|
||||
@@ -168,7 +168,8 @@ class Installer(object):
|
||||
def _remove_install_cdrom_media(self, guest):
|
||||
if not self._install_cdrom_device_added:
|
||||
return
|
||||
|
@ -2,11 +2,11 @@ References: bsc#1180897
|
||||
Removing the cdrom iso file from the device prevents booting
|
||||
with a qemu error.
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/install/installer.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/installer.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/install/installer.py
|
||||
+++ virt-manager-3.2.0/virtinst/install/installer.py
|
||||
@@ -174,8 +174,9 @@ class Installer(object):
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/installer.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/installer.py
|
||||
@@ -175,8 +175,9 @@ class Installer(object):
|
||||
for disk in guest.devices.disk:
|
||||
if (disk.is_cdrom() and
|
||||
disk.get_source_path() == self._cdrom_path()):
|
||||
|
@ -2,11 +2,11 @@ When both the content file and .treeinfo file are missing from the media
|
||||
look in the media.1/products and media.1/media files for information.
|
||||
Caasp 4.0 has not content or .treeinfo file on the media
|
||||
|
||||
Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-3.0.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
@@ -504,8 +504,23 @@ class _SuseDistro(_RHELDistro):
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
@@ -505,8 +505,23 @@ class _SuseDistro(_RHELDistro):
|
||||
cache.checked_for_suse_content = True
|
||||
content_str = cache.acquire_file_content("content")
|
||||
if content_str is None:
|
||||
|
@ -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-3.2.0/virtinst/install/installer.py
|
||||
Index: virt-manager-4.0.0/virtinst/install/installer.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/install/installer.py
|
||||
+++ virt-manager-3.2.0/virtinst/install/installer.py
|
||||
@@ -220,7 +220,8 @@ class Installer(object):
|
||||
--- virt-manager-4.0.0.orig/virtinst/install/installer.py
|
||||
+++ virt-manager-4.0.0/virtinst/install/installer.py
|
||||
@@ -222,7 +222,8 @@ class Installer(object):
|
||||
|
||||
def _alter_treemedia_bootconfig(self, guest):
|
||||
if not self._treemedia:
|
||||
@ -16,10 +16,10 @@ Index: virt-manager-3.2.0/virtinst/install/installer.py
|
||||
|
||||
kernel, initrd, kernel_args = self._treemedia_bootconfig
|
||||
if kernel:
|
||||
@@ -594,6 +595,20 @@ class Installer(object):
|
||||
install_xml = None
|
||||
if self.has_install_phase():
|
||||
install_xml = self._get_install_xml(guest, meter)
|
||||
@@ -582,6 +583,21 @@ class Installer(object):
|
||||
final_xml = guest.get_xml()
|
||||
if self._requires_postboot_xml_changes():
|
||||
initial_xml, final_xml = self._build_postboot_xml(final_xml, meter)
|
||||
+ if (guest.os.is_xenpv() and
|
||||
+ not guest.os.kernel):
|
||||
+ os_ver = guest.osinfo.name
|
||||
@ -34,6 +34,7 @@ Index: virt-manager-3.2.0/virtinst/install/installer.py
|
||||
+ on_reboot_value = guest.on_reboot
|
||||
+ self._alter_bootconfig(guest)
|
||||
+ guest.on_reboot = on_reboot_value
|
||||
final_xml = self._pre_reinstall_xml or guest.get_xml()
|
||||
+ final_xml = guest.get_xml()
|
||||
final_xml = self._pre_reinstall_xml or final_xml
|
||||
|
||||
log.debug("Generated install XML: %s",
|
||||
log.debug("Generated initial_xml: %s",
|
||||
|
@ -1,10 +1,10 @@
|
||||
Reference: bnc#869024
|
||||
Disable graphics on s390x
|
||||
Index: virt-manager-3.0.0/virtinst/guest.py
|
||||
Index: virt-manager-4.0.0/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-3.0.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-3.0.0/virtinst/guest.py
|
||||
@@ -195,7 +195,10 @@ class Guest(XMLBuilder):
|
||||
--- virt-manager-4.0.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-4.0.0/virtinst/guest.py
|
||||
@@ -198,7 +198,10 @@ class Guest(XMLBuilder):
|
||||
self.skip_default_channel = False
|
||||
self.skip_default_sound = False
|
||||
self.skip_default_usbredir = False
|
||||
@ -14,9 +14,9 @@ Index: virt-manager-3.0.0/virtinst/guest.py
|
||||
+ else:
|
||||
+ self.skip_default_graphics = False
|
||||
self.skip_default_rng = False
|
||||
self.skip_default_tpm = False
|
||||
self.x86_cpu_default = self.cpu.SPECIAL_MODE_APP_DEFAULT
|
||||
|
||||
@@ -337,7 +340,7 @@ class Guest(XMLBuilder):
|
||||
@@ -347,7 +350,7 @@ class Guest(XMLBuilder):
|
||||
if not os_support:
|
||||
return False
|
||||
|
||||
@ -25,7 +25,7 @@ Index: virt-manager-3.0.0/virtinst/guest.py
|
||||
return True
|
||||
|
||||
return False # pragma: no cover
|
||||
@@ -854,7 +857,7 @@ class Guest(XMLBuilder):
|
||||
@@ -933,7 +936,7 @@ class Guest(XMLBuilder):
|
||||
self.add_device(dev)
|
||||
|
||||
def _add_default_video_device(self):
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.2.0/virtinst/install/urldetect.py
|
||||
@@ -271,9 +271,16 @@ class _SUSEContent(object):
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
@@ -272,9 +272,16 @@ class _SUSEContent(object):
|
||||
distro_version = distro_version.strip()
|
||||
|
||||
if "Enterprise" in self.product_name or "SLES" in self.product_name:
|
||||
|
@ -1,29 +1,37 @@
|
||||
Set cache mode for target installation disk to unsafe for better
|
||||
performance.
|
||||
Index: virt-manager-3.2.0/virtinst/install/installer.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/installer.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/install/installer.py
|
||||
+++ virt-manager-3.2.0/virtinst/install/installer.py
|
||||
@@ -580,11 +580,22 @@ class Installer(object):
|
||||
guest.memory) = data
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/installer.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/installer.py
|
||||
@@ -567,16 +567,29 @@ class Installer(object):
|
||||
|
||||
def _get_install_xml(self, guest, meter):
|
||||
def _build_postboot_xml(self, final_xml, meter):
|
||||
initial_guest = Guest(self.conn, parsexml=final_xml)
|
||||
+ # At install time set the target disk to 'unsafe' for
|
||||
+ # better performance if the target is not a block device
|
||||
+ saved_cache = "None"
|
||||
+ if guest.devices.disk:
|
||||
+ target_disk = guest.devices.disk[0]
|
||||
+ if initial_guest.devices.disk:
|
||||
+ target_disk = initial_guest.devices.disk[0]
|
||||
+ saved_cache = target_disk.driver_cache
|
||||
+ if target_disk.type != DeviceDisk.TYPE_BLOCK and target_disk.driver_io != "native":
|
||||
+ target_disk.driver_cache = DeviceDisk.CACHE_MODE_UNSAFE
|
||||
+
|
||||
data = self._prepare_get_install_xml(guest)
|
||||
try:
|
||||
self._alter_bootconfig(guest)
|
||||
self._alter_install_resources(guest, meter)
|
||||
ret = guest.get_xml()
|
||||
self._alter_bootconfig(initial_guest)
|
||||
self._alter_install_resources(initial_guest, meter)
|
||||
if self.has_cloudinit():
|
||||
initial_guest.set_smbios_serial_cloudinit()
|
||||
|
||||
+ install_xml = initial_guest.get_xml()
|
||||
+ if saved_cache != "None":
|
||||
+ target_disk.driver_cache = saved_cache
|
||||
return ret
|
||||
finally:
|
||||
self._remove_install_cdrom_media(guest)
|
||||
+
|
||||
final_guest = Guest(self.conn, parsexml=final_xml)
|
||||
self._remove_install_cdrom_media(final_guest)
|
||||
self._remove_unattended_install_cdrom_device(final_guest)
|
||||
|
||||
- return initial_guest.get_xml(), final_guest.get_xml()
|
||||
+ return install_xml, final_guest.get_xml()
|
||||
|
||||
def _build_xml(self, guest, meter):
|
||||
initial_xml = None
|
||||
|
@ -1,11 +1,11 @@
|
||||
References: bsc#1172356, bsc#1177620
|
||||
Libvirt doesn't accept "Hypervisor default" as a model name
|
||||
|
||||
Index: virt-manager-3.1.0/virtinst/devices/interface.py
|
||||
Index: virt-manager-3.3.0/virtinst/devices/interface.py
|
||||
===================================================================
|
||||
--- virt-manager-3.1.0.orig/virtinst/devices/interface.py
|
||||
+++ virt-manager-3.1.0/virtinst/devices/interface.py
|
||||
@@ -284,6 +284,9 @@ class DeviceInterface(Device):
|
||||
--- virt-manager-3.3.0.orig/virtinst/devices/interface.py
|
||||
+++ virt-manager-3.3.0/virtinst/devices/interface.py
|
||||
@@ -302,6 +302,9 @@ class DeviceInterface(Device):
|
||||
return "e1000e"
|
||||
if not guest.os.is_x86():
|
||||
return None
|
||||
|
@ -1,12 +1,12 @@
|
||||
Use the correct qemu emulator based on the architecture.
|
||||
We want to get away from using the old qemu-dm emulator
|
||||
for Xen HVM guests so default to qemu-system-i386.
|
||||
Index: virt-manager-3.0.0/virtinst/guest.py
|
||||
Index: virt-manager-4.0.0/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-3.0.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-3.0.0/virtinst/guest.py
|
||||
@@ -727,6 +727,10 @@ class Guest(XMLBuilder):
|
||||
self._add_default_memballoon()
|
||||
--- virt-manager-4.0.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-4.0.0/virtinst/guest.py
|
||||
@@ -778,6 +778,10 @@ class Guest(XMLBuilder):
|
||||
self._add_default_tpm()
|
||||
|
||||
self.clock.set_defaults(self)
|
||||
+ if self.os.is_hvm() and self.type == "xen":
|
||||
|
@ -1,15 +1,15 @@
|
||||
References: bsc#1180069
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/guest.py
|
||||
Index: virt-manager-4.0.0/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-3.2.0/virtinst/guest.py
|
||||
@@ -704,6 +704,8 @@ class Guest(XMLBuilder):
|
||||
--- virt-manager-4.0.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-4.0.0/virtinst/guest.py
|
||||
@@ -687,6 +687,8 @@ class Guest(XMLBuilder):
|
||||
self.type != "kvm"):
|
||||
log.warning( # pragma: no cover
|
||||
"KVM acceleration not available, using '%s'", self.type)
|
||||
+ if self.os.is_xenpv() and self.os.smbios_mode is not None:
|
||||
+ raise RuntimeError(_("The --sysinfo flag (smbios) is not supported for Xen PV guests."))
|
||||
|
||||
def sync_vcpus_topology(self):
|
||||
def refresh_machine_type(self):
|
||||
"""
|
||||
|
@ -2,11 +2,11 @@ References: bsc#989639
|
||||
When the device added is a cdrom device (/dev/sr0), don't use
|
||||
"phy" as the driver name but instead use "qemu".
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/devices/disk.py
|
||||
Index: virt-manager-3.3.0/virtinst/devices/disk.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/devices/disk.py
|
||||
+++ virt-manager-3.2.0/virtinst/devices/disk.py
|
||||
@@ -527,7 +527,8 @@ class DeviceDisk(Device):
|
||||
--- virt-manager-3.3.0.orig/virtinst/devices/disk.py
|
||||
+++ virt-manager-3.3.0/virtinst/devices/disk.py
|
||||
@@ -525,7 +525,8 @@ class DeviceDisk(Device):
|
||||
# Recommended xen defaults from here:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1171550#c9
|
||||
# If type block, use name=phy. Otherwise do the same as qemu
|
||||
|
@ -4,11 +4,11 @@ a non pae version. The sles10 sp4 32bit kernel will only boot para-
|
||||
virtualized if the pae kernel is selected.
|
||||
Note that sles12 and newer has no 32bit release.
|
||||
|
||||
Index: virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
Index: virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-3.0.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.0.0/virtinst/install/urldetect.py
|
||||
@@ -549,9 +549,14 @@ class _SuseDistro(_RHELDistro):
|
||||
--- virt-manager-3.3.0.orig/virtinst/install/urldetect.py
|
||||
+++ virt-manager-3.3.0/virtinst/install/urldetect.py
|
||||
@@ -550,9 +550,14 @@ class _SuseDistro(_RHELDistro):
|
||||
|
||||
if self.type == "xen":
|
||||
# Matches Opensuse > 10.2 and sles 10
|
||||
|
@ -4,10 +4,10 @@ issue on btrfs.
|
||||
|
||||
Signed-off-by: Chunyan Liu <cyliu@suse.com>
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/storage.py
|
||||
Index: virt-manager-3.3.0/virtinst/storage.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/storage.py
|
||||
+++ virt-manager-3.2.0/virtinst/storage.py
|
||||
--- virt-manager-3.3.0.orig/virtinst/storage.py
|
||||
+++ virt-manager-3.3.0/virtinst/storage.py
|
||||
@@ -570,6 +570,11 @@ class StorageVolume(_StorageObject):
|
||||
return self._pool_xml.get_disk_type()
|
||||
file_type = property(_get_vol_type)
|
||||
@ -20,10 +20,10 @@ Index: virt-manager-3.2.0/virtinst/storage.py
|
||||
|
||||
##################
|
||||
# XML properties #
|
||||
Index: virt-manager-3.2.0/virtinst/support.py
|
||||
Index: virt-manager-3.3.0/virtinst/support.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/support.py
|
||||
+++ virt-manager-3.2.0/virtinst/support.py
|
||||
--- virt-manager-3.3.0.orig/virtinst/support.py
|
||||
+++ virt-manager-3.3.0/virtinst/support.py
|
||||
@@ -269,6 +269,7 @@ class SupportCache:
|
||||
conn_vnc_none_auth = _make(hv_version={"qemu": "2.9.0"})
|
||||
conn_device_boot_order = _make(hv_version={"qemu": 0, "test": 0})
|
||||
|
@ -2,11 +2,11 @@ Reference: bnc#813082
|
||||
Virt-manager on Xen doesn't fill in any type thereby defaulting to
|
||||
'raw'. This patch will generate the correct XML on Xen.
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/devices/disk.py
|
||||
Index: virt-manager-3.3.0/virtinst/devices/disk.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/devices/disk.py
|
||||
+++ virt-manager-3.2.0/virtinst/devices/disk.py
|
||||
@@ -544,6 +544,10 @@ class DeviceDisk(Device):
|
||||
--- virt-manager-3.3.0.orig/virtinst/devices/disk.py
|
||||
+++ virt-manager-3.3.0/virtinst/devices/disk.py
|
||||
@@ -542,6 +542,10 @@ class DeviceDisk(Device):
|
||||
https://lists.gnu.org/archive/html/qemu-devel/2008-04/msg00675.html
|
||||
"""
|
||||
if self.driver_name != self.DRIVER_NAME_QEMU:
|
||||
|
@ -6,11 +6,11 @@ types (ide vs xen) it added xvda with hda. These disks were then
|
||||
passed to qemu where it error'ed out with the disks having the same
|
||||
index (in this case both are 0).
|
||||
|
||||
Index: virt-manager-3.2.0/virtinst/devices/disk.py
|
||||
Index: virt-manager-3.3.0/virtinst/devices/disk.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/devices/disk.py
|
||||
+++ virt-manager-3.2.0/virtinst/devices/disk.py
|
||||
@@ -896,6 +896,17 @@ class DeviceDisk(Device):
|
||||
--- virt-manager-3.3.0.orig/virtinst/devices/disk.py
|
||||
+++ virt-manager-3.3.0/virtinst/devices/disk.py
|
||||
@@ -895,6 +895,17 @@ class DeviceDisk(Device):
|
||||
:returns: generated target
|
||||
"""
|
||||
prefix, maxnode = self.get_target_prefix()
|
||||
@ -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,11 +914,18 @@ class DeviceDisk(Device):
|
||||
@@ -902,11 +913,18 @@ class DeviceDisk(Device):
|
||||
first_found = None
|
||||
|
||||
for i in range(maxnode):
|
||||
|
@ -1,187 +0,0 @@
|
||||
From d30b50139e60afc6e5da1e38f130b27859d31a83 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Arnold <carnold@suse.com>
|
||||
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 @@
|
||||
<description>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).</description>
|
||||
</key>
|
||||
|
||||
+ <key name="firmware" type="s">
|
||||
+ <default>'default'</default>
|
||||
+ <summary>Use selected firmware for new VM booting</summary>
|
||||
+ <description>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.</description>
|
||||
+ </key>
|
||||
+
|
||||
</schema>
|
||||
|
||||
<schema id="org.virt-manager.virt-manager.paths"
|
||||
Index: virt-manager-3.2.0/ui/preferences.ui
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/ui/preferences.ui
|
||||
+++ virt-manager-3.2.0/ui/preferences.ui
|
||||
@@ -494,6 +494,32 @@ identical CPUs in order to migrate the V
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel" id="label127">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="tooltip_text" translatable="yes">Default Firmware for new VMs. Boot using either BIOS or UEFI.</property>
|
||||
+ <property name="halign">start</property>
|
||||
+ <property name="label" translatable="yes">_Firmware default:</property>
|
||||
+ <property name="use_underline">True</property>
|
||||
+ <property name="mnemonic_widget">prefs-firmware-default</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">0</property>
|
||||
+ <property name="top_attach">3</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkComboBox" id="prefs-firmware-default">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <signal name="changed" handler="on_prefs_firmware_default_changed" swapped="no"/>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">1</property>
|
||||
+ <property name="top_attach">3</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
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())
|
@ -2,8 +2,10 @@ References:
|
||||
When a particular firmware is selected, read the json file for a description.
|
||||
Add a tooltip of the json description when the mouse move overs the selected firmware.
|
||||
|
||||
--- virt-manager-3.1.0/virtManager/details/details.py.orig 2020-10-30 13:56:26.748245557 -0600
|
||||
+++ virt-manager-3.1.0/virtManager/details/details.py 2020-10-30 13:56:48.952246534 -0600
|
||||
Index: virt-manager-3.3.0/virtManager/details/details.py
|
||||
===================================================================
|
||||
--- virt-manager-3.3.0.orig/virtManager/details/details.py
|
||||
+++ virt-manager-3.3.0/virtManager/details/details.py
|
||||
@@ -5,6 +5,9 @@
|
||||
# See the COPYING file in the top-level directory.
|
||||
|
||||
@ -14,7 +16,7 @@ Add a tooltip of the json description when the mouse move overs the selected fir
|
||||
|
||||
from gi.repository import Gtk
|
||||
|
||||
@@ -424,7 +427,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
@@ -421,7 +424,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
"on_overview_name_changed": _e(EDIT_NAME),
|
||||
"on_overview_title_changed": _e(EDIT_TITLE),
|
||||
"on_machine_type_changed": _e(EDIT_MACHTYPE),
|
||||
@ -23,7 +25,7 @@ Add a tooltip of the json description when the mouse move overs the selected fir
|
||||
"on_overview_chipset_changed": _e(EDIT_MACHTYPE),
|
||||
|
||||
"on_details_inspection_refresh_clicked": self._inspection_refresh_clicked_cb,
|
||||
@@ -1125,6 +1128,49 @@ class vmmDetails(vmmGObjectUI):
|
||||
@@ -1117,6 +1120,49 @@ class vmmDetails(vmmGObjectUI):
|
||||
self.storage_browser.set_browse_reason(reason)
|
||||
self.storage_browser.show(self.topwin)
|
||||
|
||||
|
@ -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.2.0/virtManager/createvm.py
|
||||
Index: virt-manager-3.3.0/virtManager/createvm.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtManager/createvm.py
|
||||
+++ virt-manager-3.2.0/virtManager/createvm.py
|
||||
@@ -864,11 +864,6 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
--- virt-manager-3.3.0.orig/virtManager/createvm.py
|
||||
+++ virt-manager-3.3.0/virtManager/createvm.py
|
||||
@@ -869,11 +869,6 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
for guest in self.conn.caps.guests:
|
||||
if guest.os_type == self._capsinfo.os_type:
|
||||
archs.append(guest.arch)
|
||||
|
@ -6,11 +6,11 @@ Steps to get a KVM VM in the crashed state:
|
||||
4) Edit the VM's /etc/default/grub file and remove the crashkernel information
|
||||
and then run grub2-mkconfig /boot/grub2/grub.cfg.
|
||||
5) Start the VM and within the VM's terminal type "echo 'c' > /proc/sysrq-trigger"
|
||||
Index: virt-manager-3.1.0/virtManager/manager.py
|
||||
Index: virt-manager-3.3.0/virtManager/manager.py
|
||||
===================================================================
|
||||
--- virt-manager-3.1.0.orig/virtManager/manager.py
|
||||
+++ virt-manager-3.1.0/virtManager/manager.py
|
||||
@@ -780,7 +780,7 @@ class vmmManager(vmmGObjectUI):
|
||||
--- virt-manager-3.3.0.orig/virtManager/manager.py
|
||||
+++ virt-manager-3.3.0/virtManager/manager.py
|
||||
@@ -776,7 +776,7 @@ class vmmManager(vmmGObjectUI):
|
||||
show_pause = bool(vm and vm.is_unpauseable())
|
||||
else:
|
||||
show_pause = bool(vm and vm.is_pauseable())
|
||||
@ -19,10 +19,10 @@ Index: virt-manager-3.1.0/virtManager/manager.py
|
||||
|
||||
if vm and vm.managedsave_supported:
|
||||
self.change_run_text(vm.has_managed_save())
|
||||
Index: virt-manager-3.1.0/virtManager/vmmenu.py
|
||||
Index: virt-manager-3.3.0/virtManager/vmmenu.py
|
||||
===================================================================
|
||||
--- virt-manager-3.1.0.orig/virtManager/vmmenu.py
|
||||
+++ virt-manager-3.1.0/virtManager/vmmenu.py
|
||||
--- virt-manager-3.3.0.orig/virtManager/vmmenu.py
|
||||
+++ virt-manager-3.3.0/virtManager/vmmenu.py
|
||||
@@ -21,6 +21,7 @@ class _VMMenu(Gtk.Menu):
|
||||
self._parent = src
|
||||
self._current_vm_cb = current_vm_cb
|
||||
@ -31,7 +31,7 @@ Index: virt-manager-3.1.0/virtManager/vmmenu.py
|
||||
|
||||
self._init_state()
|
||||
|
||||
@@ -85,6 +86,7 @@ class VMShutdownMenu(_VMMenu):
|
||||
@@ -72,6 +73,7 @@ class VMShutdownMenu(_VMMenu):
|
||||
name = getattr(child, "vmm_widget_name", None)
|
||||
if name in statemap:
|
||||
child.set_sensitive(statemap[name])
|
||||
@ -39,17 +39,17 @@ Index: virt-manager-3.1.0/virtManager/vmmenu.py
|
||||
|
||||
|
||||
class VMActionMenu(_VMMenu):
|
||||
@@ -99,7 +101,8 @@ class VMActionMenu(_VMMenu):
|
||||
self._add_action(_("R_esume"), "resume", VMActionUI.resume,
|
||||
Gtk.STOCK_MEDIA_PAUSE)
|
||||
@@ -83,7 +85,8 @@ class VMActionMenu(_VMMenu):
|
||||
self._add_action(_("_Pause"), "suspend", VMActionUI.suspend)
|
||||
self._add_action(_("R_esume"), "resume", VMActionUI.resume)
|
||||
s = self._add_action(_("_Shut Down"), "shutdown", None)
|
||||
- s.set_submenu(VMShutdownMenu(self._parent, self._current_vm_cb))
|
||||
+ self._shutdown = VMShutdownMenu(self._parent, self._current_vm_cb)
|
||||
+ s.set_submenu(self._shutdown)
|
||||
|
||||
self.add(Gtk.SeparatorMenuItem())
|
||||
self._add_action(_("Clone..."), "clone",
|
||||
@@ -120,7 +123,7 @@ class VMActionMenu(_VMMenu):
|
||||
self._add_action(_("Clone..."), "clone", VMActionUI.clone)
|
||||
@@ -100,7 +103,7 @@ class VMActionMenu(_VMMenu):
|
||||
def update_widget_states(self, vm):
|
||||
statemap = {
|
||||
"run": bool(vm and vm.is_runable()),
|
||||
@ -58,7 +58,7 @@ Index: virt-manager-3.1.0/virtManager/vmmenu.py
|
||||
"suspend": bool(vm and vm.is_stoppable()),
|
||||
"resume": bool(vm and vm.is_paused()),
|
||||
"migrate": bool(vm and vm.is_stoppable()),
|
||||
@@ -137,6 +140,8 @@ class VMActionMenu(_VMMenu):
|
||||
@@ -117,6 +120,8 @@ class VMActionMenu(_VMMenu):
|
||||
child.get_submenu().update_widget_states(vm)
|
||||
if name in statemap:
|
||||
child.set_sensitive(statemap[name])
|
||||
|
@ -1,10 +1,10 @@
|
||||
References: bnc#907958
|
||||
Sanity check for those who forget '-X' on ssh and try to start virt-manager
|
||||
Index: virt-manager-3.1.0/virtManager/virtmanager.py
|
||||
Index: virt-manager-3.3.0/virtManager/virtmanager.py
|
||||
===================================================================
|
||||
--- virt-manager-3.1.0.orig/virtManager/virtmanager.py
|
||||
+++ virt-manager-3.1.0/virtManager/virtmanager.py
|
||||
@@ -62,8 +62,11 @@ def _import_gtk(leftovers):
|
||||
--- virt-manager-3.3.0.orig/virtManager/virtmanager.py
|
||||
+++ virt-manager-3.3.0/virtManager/virtmanager.py
|
||||
@@ -66,8 +66,11 @@ def _import_gtk(leftovers):
|
||||
print("gtk3 3.22.0 or later is required.")
|
||||
sys.exit(1)
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: virt-manager-3.0.0/data/virt-manager.desktop.in
|
||||
Index: virt-manager-3.3.0/data/virt-manager.desktop.in
|
||||
===================================================================
|
||||
--- virt-manager-3.0.0.orig/data/virt-manager.desktop.in
|
||||
+++ virt-manager-3.0.0/data/virt-manager.desktop.in
|
||||
@@ -1,8 +1,19 @@
|
||||
--- virt-manager-3.3.0.orig/data/virt-manager.desktop.in
|
||||
+++ virt-manager-3.3.0/data/virt-manager.desktop.in
|
||||
@@ -1,9 +1,20 @@
|
||||
[Desktop Entry]
|
||||
Name=Virtual Machine Manager
|
||||
-Comment=Manage virtual machines
|
||||
@ -13,6 +13,7 @@ Index: virt-manager-3.0.0/data/virt-manager.desktop.in
|
||||
+Exec=/usr/bin/virt-manager
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Keywords=vmm;
|
||||
-Categories=System;
|
||||
+Encoding=UTF-8
|
||||
+Categories=GTK;GNOME;System;Monitor;X-SuSE-YaST;X-SuSE-YaST-Virtualization;
|
||||
|
@ -4,11 +4,11 @@ in this patch anyways to correctly set up a bus if a floppy were
|
||||
added.
|
||||
|
||||
|
||||
Index: virt-manager-3.2.0/virtManager/addhardware.py
|
||||
Index: virt-manager-3.3.0/virtManager/addhardware.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtManager/addhardware.py
|
||||
+++ virt-manager-3.2.0/virtManager/addhardware.py
|
||||
@@ -484,6 +484,9 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
--- virt-manager-3.3.0.orig/virtManager/addhardware.py
|
||||
+++ virt-manager-3.3.0/virtManager/addhardware.py
|
||||
@@ -487,6 +487,9 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
buses = domcaps.devices.disk.get_enum("bus").get_values()
|
||||
else:
|
||||
buses = vmmAddHardware.disk_old_recommended_buses(guest)
|
||||
@ -18,7 +18,7 @@ Index: virt-manager-3.2.0/virtManager/addhardware.py
|
||||
|
||||
bus_map = {
|
||||
"disk": ["ide", "sata", "scsi", "sd", "usb", "virtio", "xen"],
|
||||
@@ -503,6 +506,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
@@ -506,6 +509,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
"usb": _("USB"),
|
||||
"virtio": _("VirtIO"),
|
||||
"xen": _("Xen"),
|
||||
@ -26,7 +26,7 @@ Index: virt-manager-3.2.0/virtManager/addhardware.py
|
||||
}
|
||||
return bus_mappings.get(bus, bus)
|
||||
|
||||
@@ -687,8 +691,9 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
@@ -673,8 +677,9 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
"drive-harddisk", _("Disk device")])
|
||||
target_model.append([DeviceDisk.DEVICE_CDROM,
|
||||
"media-optical", _("CDROM device")])
|
||||
|
@ -1,11 +1,11 @@
|
||||
Reference: bnc#885094
|
||||
grub.xen is required to boot Xen PV VMs using BTRFS. It belongs to
|
||||
the grub2-x86_64-xen RPM and should never be deleted.
|
||||
Index: virt-manager-3.0.0/virtManager/delete.py
|
||||
Index: virt-manager-3.3.0/virtManager/delete.py
|
||||
===================================================================
|
||||
--- virt-manager-3.0.0.orig/virtManager/delete.py
|
||||
+++ virt-manager-3.0.0/virtManager/delete.py
|
||||
@@ -458,7 +458,7 @@ def _populate_storage_list(storage_list,
|
||||
--- virt-manager-3.3.0.orig/virtManager/delete.py
|
||||
+++ virt-manager-3.3.0/virtManager/delete.py
|
||||
@@ -459,7 +459,7 @@ def _populate_storage_list(storage_list,
|
||||
model.clear()
|
||||
|
||||
for diskdata in diskdatas:
|
||||
|
@ -3,11 +3,11 @@ virt-manager no longer tracks the saved state but leaves it up to libvirt.
|
||||
Libvirt returns libvirt.VIR_DOMAIN_PMSUSPENDED after a vm has been 'saved'.
|
||||
|
||||
|
||||
Index: virt-manager-3.2.0/virtManager/object/domain.py
|
||||
Index: virt-manager-3.3.0/virtManager/object/domain.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtManager/object/domain.py
|
||||
+++ virt-manager-3.2.0/virtManager/object/domain.py
|
||||
@@ -1526,7 +1526,8 @@ class vmmDomain(vmmLibvirtObject):
|
||||
--- virt-manager-3.3.0.orig/virtManager/object/domain.py
|
||||
+++ virt-manager-3.3.0/virtManager/object/domain.py
|
||||
@@ -1581,7 +1581,8 @@ class vmmDomain(vmmLibvirtObject):
|
||||
return (self.is_stoppable() or
|
||||
self.status() in [libvirt.VIR_DOMAIN_CRASHED])
|
||||
def is_runable(self):
|
||||
|
@ -2,11 +2,11 @@ References: bnc#892003
|
||||
For very large memory VMs Xen takes a long time scrubbing memory
|
||||
which causes the libvirt connection to timeout. Upstream was not
|
||||
interested in making this a preferences option (4/11/2015)
|
||||
Index: virt-manager-3.0.0/virtManager/connection.py
|
||||
Index: virt-manager-3.3.0/virtManager/connection.py
|
||||
===================================================================
|
||||
--- virt-manager-3.0.0.orig/virtManager/connection.py
|
||||
+++ virt-manager-3.0.0/virtManager/connection.py
|
||||
@@ -970,7 +970,7 @@ class vmmConnection(vmmGObject):
|
||||
--- virt-manager-3.3.0.orig/virtManager/connection.py
|
||||
+++ virt-manager-3.3.0/virtManager/connection.py
|
||||
@@ -971,7 +971,7 @@ class vmmConnection(vmmGObject):
|
||||
self._add_conn_events()
|
||||
|
||||
try:
|
||||
|
@ -1,88 +0,0 @@
|
||||
References: bsc#1178926
|
||||
|
||||
When we choose /usr/share/qemu/bios.bin or /usr/share/qemu/bios-256k.bin
|
||||
in Customize configuration before install, show this error message:
|
||||
|
||||
Unable to complete install: 'operation failed: unable to find any master var store for loader: /usr/share/qemu/bios.bin'
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
|
||||
callback(asyncjob, *args, **kwargs)
|
||||
File "/usr/share/virt-manager/virtManager/createvm.py", line 2081, in _do_async_install
|
||||
installer.start_install(guest, meter=meter)
|
||||
File "/usr/share/virt-manager/virtinst/install/installer.py", line 721, in start_install
|
||||
domain = self._create_guest(
|
||||
File "/usr/share/virt-manager/virtinst/install/installer.py", line 669, in _create_guest
|
||||
domain = self.conn.createXML(install_xml or final_xml, 0)
|
||||
File "/usr/lib64/python3.8/site-packages/libvirt.py", line 4347, in createXML
|
||||
raise libvirtError('virDomainCreateXML() failed')
|
||||
libvirt.libvirtError: operation failed: unable to find any master var store for loader: /usr/share/qemu/bios.bin
|
||||
|
||||
This patch check the loader if it is include bios.bin and bios-256k.bin.
|
||||
|
||||
Signed-off-by: Yu-Chen, Cho <acho suse com>
|
||||
--
|
||||
v2:
|
||||
Fixed tabs vs spaces issues.
|
||||
|
||||
v1:
|
||||
Check the loader if it is include bios.bin and bios-256k.bin.
|
||||
---
|
||||
virtManager/object/domain.py | 18 +++++++++---------
|
||||
virtinst/guest.py | 13 +++++++++++++
|
||||
2 files changed, 22 insertions(+), 9 deletions(-)
|
||||
|
||||
Index: virt-manager-3.2.0/virtManager/object/domain.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtManager/object/domain.py
|
||||
+++ virt-manager-3.2.0/virtManager/object/domain.py
|
||||
@@ -671,16 +671,16 @@ class vmmDomain(vmmLibvirtObject):
|
||||
|
||||
if loader != _SENTINEL:
|
||||
if loader is None:
|
||||
- # Implies seabios, aka the default, so clear everything
|
||||
- guest.os.loader = None
|
||||
- guest.os.loader_ro = None
|
||||
- guest.os.loader_type = None
|
||||
- guest.os.nvram = None
|
||||
- guest.os.nvram_template = None
|
||||
+ # Implies the default, so clear everything
|
||||
+ guest.set_legacy_path(None)
|
||||
else:
|
||||
- # Implies UEFI
|
||||
- guest.set_uefi_path(loader)
|
||||
- guest.disable_hyperv_for_uefi()
|
||||
+ if "bios.bin" in loader or "bios-256k.bin" in loader:
|
||||
+ # Implies Custom: seabios, not UEFI
|
||||
+ guest.set_legacy_path(loader)
|
||||
+ else:
|
||||
+ # Implies UEFI
|
||||
+ guest.set_uefi_path(loader)
|
||||
+ guest.disable_hyperv_for_uefi()
|
||||
|
||||
if nvram != _SENTINEL:
|
||||
guest.os.nvram = nvram
|
||||
Index: virt-manager-3.2.0/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-3.2.0/virtinst/guest.py
|
||||
@@ -569,6 +569,19 @@ class Guest(XMLBuilder):
|
||||
self.os.machine)
|
||||
self.os.machine = "q35"
|
||||
|
||||
+ def set_legacy_path(self, path):
|
||||
+ """
|
||||
+ Configure legacy BIOS for QEMU.
|
||||
+ """
|
||||
+ self.os.loader = path
|
||||
+ if (path):
|
||||
+ self.os.loader_ro = True
|
||||
+ else:
|
||||
+ self.os.loader_ro = None
|
||||
+ self.os.loader_type = None
|
||||
+ self.os.nvram = None
|
||||
+ self.os.nvram_template = None
|
||||
+
|
||||
def disable_hyperv_for_uefi(self):
|
||||
# UEFI doesn't work with hyperv bits for some OS
|
||||
if not self.is_uefi():
|
@ -1,11 +1,11 @@
|
||||
Enhancement for the following GUI wizard installation option.
|
||||
1) If Xen, leave 'Architecture options' expanded so users know PV
|
||||
is the default
|
||||
Index: virt-manager-3.1.0/virtManager/createvm.py
|
||||
Index: virt-manager-3.3.0/virtManager/createvm.py
|
||||
===================================================================
|
||||
--- virt-manager-3.1.0.orig/virtManager/createvm.py
|
||||
+++ virt-manager-3.1.0/virtManager/createvm.py
|
||||
@@ -459,8 +459,20 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
--- virt-manager-3.3.0.orig/virtManager/createvm.py
|
||||
+++ virt-manager-3.3.0/virtManager/createvm.py
|
||||
@@ -460,8 +460,20 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
self.widget("method-local").set_active(True)
|
||||
self.widget("create-conn").set_active(-1)
|
||||
activeconn = self._populate_conn_list(urihint)
|
||||
|
46
virtman-revert-use-of-AyatanaAppIndicator3.patch
Normal file
46
virtman-revert-use-of-AyatanaAppIndicator3.patch
Normal file
@ -0,0 +1,46 @@
|
||||
While AyatanaAppIndicator3 is available on Tumbleweed,
|
||||
it is not available on SLE15.
|
||||
|
||||
Index: virt-manager-3.3.0/virtManager/systray.py
|
||||
===================================================================
|
||||
--- virt-manager-3.3.0.orig/virtManager/systray.py
|
||||
+++ virt-manager-3.3.0/virtManager/systray.py
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
import os
|
||||
|
||||
-import gi
|
||||
from gi.repository import Gio
|
||||
from gi.repository import Gtk
|
||||
|
||||
@@ -17,25 +16,14 @@ from . import vmmenu
|
||||
from .baseclass import vmmGObject
|
||||
from .connmanager import vmmConnectionManager
|
||||
|
||||
-
|
||||
-# pylint: disable=ungrouped-imports
|
||||
-# Prefer AyatantaAppIndicator3 which is the modern maintained
|
||||
-# appindicator library.
|
||||
-try: # pragma: no cover
|
||||
- # pylint: disable=no-name-in-module
|
||||
- gi.require_version('AyatanaAppIndicator3', '0.1')
|
||||
- from gi.repository import AyatanaAppIndicator3 as AppIndicator3
|
||||
+try:
|
||||
+ # pylint: disable=ungrouped-imports
|
||||
+ import gi
|
||||
+ gi.require_version('AppIndicator3', '0.1')
|
||||
+ from gi.repository import AppIndicator3
|
||||
except Exception: # pragma: no cover
|
||||
AppIndicator3 = None
|
||||
|
||||
-if not AppIndicator3:
|
||||
- try: # pragma: no cover
|
||||
- # pylint: disable=no-name-in-module
|
||||
- gi.require_version('AppIndicator3', '0.1')
|
||||
- from gi.repository import AppIndicator3
|
||||
- except Exception: # pragma: no cover
|
||||
- AppIndicator3 = None
|
||||
-
|
||||
|
||||
def _toggle_manager(*args, **kwargs):
|
||||
ignore = args
|
@ -1,16 +0,0 @@
|
||||
References: bsc#1180047
|
||||
Xen PV doesn't support uefi or BIOS booting
|
||||
|
||||
Index: virt-manager-3.2.0/virtManager/details/details.py
|
||||
===================================================================
|
||||
--- virt-manager-3.2.0.orig/virtManager/details/details.py
|
||||
+++ virt-manager-3.2.0/virtManager/details/details.py
|
||||
@@ -696,7 +696,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
not self.is_customize_dialog)
|
||||
show_firmware = ((self.conn.is_qemu() or
|
||||
self.conn.is_test() or
|
||||
- self.conn.is_xen()) and
|
||||
+ (self.conn.is_xen() and not self.vm.is_xenpv())) and
|
||||
domcaps.arch_can_uefi())
|
||||
uiutil.set_grid_row_visible(
|
||||
self.widget("overview-firmware-title"), show_firmware)
|
@ -1,11 +1,11 @@
|
||||
Enhancement that gets installation repos from zypper.
|
||||
These locations are then presented as potential installation
|
||||
sources when creating a VM.
|
||||
Index: virt-manager-3.1.0/virtManager/createvm.py
|
||||
Index: virt-manager-3.3.0/virtManager/createvm.py
|
||||
===================================================================
|
||||
--- virt-manager-3.1.0.orig/virtManager/createvm.py
|
||||
+++ virt-manager-3.1.0/virtManager/createvm.py
|
||||
@@ -163,6 +163,70 @@ class _GuestData:
|
||||
--- virt-manager-3.3.0.orig/virtManager/createvm.py
|
||||
+++ virt-manager-3.3.0/virtManager/createvm.py
|
||||
@@ -164,6 +164,70 @@ class _GuestData:
|
||||
return guest
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ Index: virt-manager-3.1.0/virtManager/createvm.py
|
||||
##############
|
||||
# Main class #
|
||||
##############
|
||||
@@ -421,7 +485,13 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
@@ -422,7 +486,13 @@ class vmmCreateVM(vmmGObjectUI):
|
||||
self.widget("install-url-entry").set_text("")
|
||||
self.widget("install-url-options").set_expanded(False)
|
||||
urlmodel = self.widget("install-url-combo").get_model()
|
||||
|
Loading…
Reference in New Issue
Block a user