Sync from SUSE:SLFO:Main virt-manager revision 6cb05f83407f6e21eb950070f706cc0d

This commit is contained in:
Adrian Schröter 2024-12-09 12:15:39 +01:00
parent 057e40033e
commit afa13cd20d
92 changed files with 692 additions and 7797 deletions

View File

@ -1,95 +0,0 @@
Subject: cli: --disk: Add driver.metadata_cache options
From: Lin Ma lma@suse.com Tue Aug 16 12:59:57 2022 +0800
Date: Wed Aug 17 09:57:29 2022 -0400:
Git: 11a887ece5b5bab287ff77b09337dc44c4e6e976
Properly setting the metadata cache size can provide better performance
in case of using big qcow2 images.
This patch introduces two driver options:
* driver.metadata_cache.max_size
* driver.metadata_cache.max_size.unit
E.g. --disk ...,driver.type=qcow2,\
driver.metadata_cache.max_size=2,\
driver.metadata_cache.max_size.unit=MiB
BTW, Metadata cache size control is currently supported only for qcow2.
Regarding how to properly caluclate the cache size of qcow2, Please refer
to qemu's documentation.
Signed-off-by: Lin Ma <lma@suse.com>
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
index a73343a9..a33dc16a 100644
--- a/tests/data/cli/compare/virt-install-many-devices.xml
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
@@ -423,6 +423,15 @@
</source>
<target dev="vdu" bus="virtio"/>
</disk>
+ <disk type="file" device="disk">
+ <driver name="qemu" type="qcow2">
+ <metadata_cache>
+ <max_size unit="KiB">2048</max_size>
+ </metadata_cache>
+ </driver>
+ <source file="/tmp/disk1.qcow2"/>
+ <target dev="vdv" bus="virtio"/>
+ </disk>
<controller type="usb" index="0" model="ich9-ehci1">
<address type="pci" domain="0" bus="0" slot="4" function="7"/>
</controller>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 774db098..259ac78c 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -605,6 +605,7 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser
--disk path=/fooroot.img,size=.0001,transient=on
--disk source.dir=/
--disk type=nvme,source.type=pci,source.managed=no,source.namespace=2,source.address.domain=0x0001,source.address.bus=0x02,source.address.slot=0x00,source.address.function=0x0
+--disk /tmp/disk1.qcow2,size=16,driver.type=qcow2,driver.metadata_cache.max_size=2048,driver.metadata_cache.max_size.unit=KiB
--network user,mac=12:34:56:78:11:22,portgroup=foo,link_state=down,rom_bar=on,rom_file=/tmp/foo
diff --git a/virtinst/cli.py b/virtinst/cli.py
index c4dffd34..042b500f 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -3497,6 +3497,8 @@ class ParserDisk(VirtCLIParser):
"driver.io": "io",
"driver.name": "driver_name",
"driver.type": "driver_type",
+ "driver.metadata_cache.max_size": "metadata_cache.max_size",
+ "driver.metadata_cache.max_size.unit": "metadata_cache.max_size.unit",
}
def _add_advertised_aliases(self):
@@ -3696,6 +3698,11 @@ class ParserDisk(VirtCLIParser):
cls.add_arg("driver.queues", "driver_queues")
cls.add_arg("driver.error_policy", "error_policy")
+ cls.add_arg("driver.metadata_cache.max_size",
+ "driver_metadata_cache_max_size")
+ cls.add_arg("driver.metadata_cache.max_size.unit",
+ "driver_metadata_cache_max_size_unit")
+
cls.add_arg("iotune.read_bytes_sec", "iotune_rbs")
cls.add_arg("iotune.write_bytes_sec", "iotune_wbs")
cls.add_arg("iotune.total_bytes_sec", "iotune_tbs")
diff --git a/virtinst/devices/disk.py b/virtinst/devices/disk.py
index dc59fd13..9609ebac 100644
--- a/virtinst/devices/disk.py
+++ b/virtinst/devices/disk.py
@@ -481,6 +481,11 @@ class DeviceDisk(Device):
driver_iothread = XMLProperty("./driver/@iothread", is_int=True)
driver_queues = XMLProperty("./driver/@queues", is_int=True)
+ driver_metadata_cache_max_size = XMLProperty(
+ "./driver/metadata_cache/max_size", is_int=True)
+ driver_metadata_cache_max_size_unit = XMLProperty(
+ "./driver/metadata_cache/max_size/@unit")
+
error_policy = XMLProperty("./driver/@error_policy")
serial = XMLProperty("./serial")
wwn = XMLProperty("./wwn")

View File

@ -1,20 +0,0 @@
Subject: tests: cli: Fix test output after previous commit
From: Cole Robinson crobinso@redhat.com Wed Aug 17 10:21:31 2022 -0400
Date: Wed Aug 17 10:21:31 2022 -0400:
Git: 7295ebfb02e1a6ebcc1fc94c4aecfe8e21a0e567
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
index a33dc16a..c27512d1 100644
--- a/tests/data/cli/compare/virt-install-many-devices.xml
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
@@ -424,7 +424,7 @@
<target dev="vdu" bus="virtio"/>
</disk>
<disk type="file" device="disk">
- <driver name="qemu" type="qcow2">
+ <driver name="qemu" type="qcow2" discard="unmap">
<metadata_cache>
<max_size unit="KiB">2048</max_size>
</metadata_cache>

View File

@ -1,41 +0,0 @@
Subject: fsdetails: Fix an error with source.socket of virtiofs
From: Lin Ma lma@suse.com Tue Aug 16 12:59:36 2022 +0800
Date: Wed Aug 17 10:24:10 2022 -0400:
Git: 58f5e36da76277bfc7fb4d87293be60ef6e0cbc1
Using the source.socket of virtiofs needs a virtiofsd daemon launched
outside of libvirtd, So the filesystem UI doesn't support it yet. If
users need it they can set it manually in the XML editor.
But if we view the filesystem info of such a VM on the details page,
It fails with this error message:
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/details/details.py", line 1713, in _refresh_page
self._refresh_filesystem_page(dev)
File "/usr/share/virt-manager/virtManager/details/details.py", line 2241, in _refresh_filesystem_page
self.fsDetails.set_dev(dev)
File "/usr/share/virt-manager/virtManager/device/fsdetails.py", line 193, in set_dev
self.widget("fs-source").set_text(dev.source)
TypeError: Argument 1 does not allow None as a value
This patch fixes above issue by leaving the 'source path' info blank in
case of source.socket.
In this case, Considering that showing 'target path' info without source
info is kind of meaningless, So this patch leaves the 'target path' info
blank as well.
Signed-off-by: Lin Ma <lma@suse.com>
diff --git a/virtManager/device/fsdetails.py b/virtManager/device/fsdetails.py
index 40868d1c..b9956e1d 100644
--- a/virtManager/device/fsdetails.py
+++ b/virtManager/device/fsdetails.py
@@ -190,7 +190,7 @@ class vmmFSDetails(vmmGObjectUI):
self.widget("fs-format-combo"), dev.driver_format)
if dev.type != DeviceFilesystem.TYPE_RAM:
- self.widget("fs-source").set_text(dev.source)
+ self.widget("fs-source").set_text(dev.source or "")
else:
self.widget("fs-ram-source-spin").set_value(int(dev.source) // 1024)
self.widget("fs-target").set_text(dev.target or "")

View File

@ -1,20 +0,0 @@
Subject: cli: Drop unnecessary --disk prop aliases
From: Cole Robinson crobinso@redhat.com Wed Aug 17 10:27:36 2022 -0400
Date: Wed Aug 17 10:27:36 2022 -0400:
Git: 4b150735720d8a54c153e10a1bc760d252594004
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 042b500f..388c5263 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -3497,8 +3497,6 @@ class ParserDisk(VirtCLIParser):
"driver.io": "io",
"driver.name": "driver_name",
"driver.type": "driver_type",
- "driver.metadata_cache.max_size": "metadata_cache.max_size",
- "driver.metadata_cache.max_size.unit": "metadata_cache.max_size.unit",
}
def _add_advertised_aliases(self):

View File

@ -1,25 +0,0 @@
Subject: tests: testdriver: Add filesystem socket example
From: Cole Robinson crobinso@redhat.com Wed Aug 17 10:29:31 2022 -0400
Date: Wed Aug 17 10:29:31 2022 -0400:
Git: 1b87e3e54c782da39cf30b100a22f70c37bfcddd
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml
index b213863d..7c94e698 100644
--- a/tests/data/testdriver/testdriver.xml
+++ b/tests/data/testdriver/testdriver.xml
@@ -599,6 +599,13 @@ Foo bar baz &amp; yeah boii &lt; &gt; yeahfoo
<source file='/root/container.vmdk'/>
<target dir='/home'/>
</filesystem>
+ <filesystem type='mount'>
+ <driver type='virtiofs' queue='1024'/>
+ <source socket='/tmp/sock'/>
+ <target dir='tag'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </filesystem>
+
<!-- tpm devices -->
<tpm model='tpm-tis'>

View File

@ -1,45 +0,0 @@
Subject: virtinstall: split no_install conditional apart to track code coverage
From: Cole Robinson crobinso@redhat.com Sat Aug 20 09:42:47 2022 -0400
Date: Sat Aug 20 09:47:49 2022 -0400:
Git: 1cb0be4002445e5755ead2423b5a4e9e06f0a3cb
Each bit here is part of the CLI API, we need to be sure we are
covering each one. Extend the test suite to hit one case we are missing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1017,7 +1017,9 @@ c = vinst.add_category("misc-install", "
c.add_compare("--connect %s --os-variant generic" % (utils.URIs.test_suite), "noargs-fail", use_default_args=False) # No arguments
c.add_compare("--connect %s --os-variant fedora26" % (utils.URIs.test_suite), "osvariant-noargs-fail", use_default_args=False) # No arguments
c.add_compare("--connect %s --os-variant fedora26 --pxe --print-xml" % (utils.URIs.test_suite), "osvariant-defaults-pxe", use_default_args=False) # No arguments
+c.add_compare("--disk %(EXISTIMG1)s --os-variant fedora28 --cloud-init root-password-generate=yes,disable=no --sysinfo system.serial=foobar", "cloud-init-options1", env={"VIRTINST_TEST_SUITE_PRINT_CLOUDINIT": "1"}) # --cloud-init root-password-generate, with --sysinfo override
c.add_compare("--disk %(EXISTIMG1)s --os-variant fedora28 --cloud-init", "cloud-init-default", env={"VIRTINST_TEST_SUITE_CLOUDINIT": "1"}) # default --cloud-init behavior is root-password-generate=yes,disable=yes
+c.add_valid("--disk %(EXISTIMG1)s --os-variant fedora28 --cloud-init", env={"VIRTINST_TEST_SUITE_CLOUDINIT": "1"}) # default --cloud-init, but without implied --print-xml, to hit some specific code paths
c.add_compare("--disk %(EXISTIMG1)s --os-variant fedora28 --cloud-init root-password-generate=yes,disable=no --sysinfo system.serial=foobar", "cloud-init-options1", env={"VIRTINST_TEST_SUITE_PRINT_CLOUDINIT": "1"}) # --cloud-init root-password-generate, with --sysinfo override
c.add_compare("--disk %(EXISTIMG1)s --os-variant fedora28 --cloud-init root-password-file=%(ADMIN-PASSWORD-FILE)s,root-ssh-key=%(XMLDIR)s/cloudinit/ssh-key.txt,clouduser-ssh-key=%(XMLDIR)s/cloudinit/ssh-key2.txt --boot smbios.mode=none", "cloud-init-options2", env={"VIRTINST_TEST_SUITE_PRINT_CLOUDINIT": "1"}) # --cloud-init root-password-file with smbios.mode override
c.add_compare("--disk %(EXISTIMG1)s --os-variant fedora28 --cloud-init ssh-key=%(XMLDIR)s/cloudinit/ssh-key.txt", "cloud-init-options3", env={"VIRTINST_TEST_SUITE_PRINT_CLOUDINIT": "1"}) # --cloud-init ssh-key
--- a/virtinst/virtinstall.py
+++ b/virtinst/virtinstall.py
@@ -429,11 +429,15 @@ def build_installer(options, guest, inst
install_bootdev = "network"
elif installdata.is_set:
pass
- elif (options.import_install or
- options.xmlonly or
- options.boot or
- options.cloud_init or
- options.unattended):
+ elif options.xmlonly:
+ no_install = True
+ elif options.import_install:
+ no_install = True
+ elif options.boot:
+ no_install = True
+ elif options.cloud_init:
+ no_install = True
+ elif options.unattended:
no_install = True
installer = virtinst.Installer(guest.conn,

View File

@ -1,42 +0,0 @@
Subject: virtinstall: fix regression with --boot and no install method
From: Cole Robinson crobinso@redhat.com Sat Aug 20 09:54:01 2022 -0400
Date: Sat Aug 20 09:54:01 2022 -0400:
Git: e94786c066696781a821f5a4bcef3c377e4bc5e5
Anything passed to --boot should imply --install no_install=yes
in the absence of other --install options. This is historically
what we've done but we regressed in 4.1.0
Resolves: https://github.com/virt-manager/virt-manager/issues/426
Signed-off-by: Cole Robinson <crobinso@redhat.com>
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -967,6 +967,7 @@ c.add_valid("--os-variant generic --pxe
c.add_valid("--os-variant winxp --ram 32 --cdrom %(EXISTIMG1)s", grep="32 MiB is less than the recommended 64 MiB") # Windows. Catch memory warning
c.add_valid("--osinfo generic --pxe --autostart") # --autostart flag
c.add_valid("--cdrom %(EXISTIMG2)s --os-variant win2k3 --print-step 2") # HVM windows install, print 3rd stage XML
+c.add_valid("--memory 512 --osinfo generic --boot cdrom") # --boot XXX should imply --install no_install
c.add_compare("--location location=%(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install", "initrd-inject") # initrd-inject
c.add_compare("--cdrom http://example.com/path/to/some.iso --os-variant detect=yes,require=no", "cdrom-url")
c.add_compare("--pxe --print-step all --os-variant none", "simple-pxe") # Diskless PXE install
--- a/virtinst/virtinstall.py
+++ b/virtinst/virtinstall.py
@@ -433,7 +433,7 @@ def build_installer(options, guest, inst
no_install = True
elif options.import_install:
no_install = True
- elif options.boot:
+ elif options.boot_was_set:
no_install = True
elif options.cloud_init:
no_install = True
@@ -645,6 +645,7 @@ def _build_options_guest(conn, options):
def build_guest_instance(conn, options):
installdata = cli.parse_install(options.install)
osdata = cli.parse_os_variant(options.os_variant or installdata.os)
+ options.boot_was_set = bool(options.boot)
if options.reinstall:
dummy1, guest, dummy2 = cli.get_domain_and_guest(conn, options.reinstall)

View File

@ -1,22 +0,0 @@
Subject: tests: Add a compat check for linux2020 in amd-sev test case
From: Lin Ma lma@suse.com Fri Aug 19 18:18:09 2022 +0800
Date: Sat Aug 20 09:59:27 2022 -0400:
Git: c22a876e9a63cb7114e2b008f2e24682c8bbef3e
It avoids amd-sev test failure if using older osinfo-db.
Signed-off-by: Lin Ma <lma@suse.com>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index cc1d3da2..9f6c3bc0 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1108,7 +1108,7 @@ c.add_compare("--connect " + utils.URIs.kvm_x86_remote + " --import --disk %(EXI
c.add_compare("--connect %(URI-KVM-X86)s --os-variant fedora26 --graphics spice --controller usb,model=none", "graphics-usb-disable")
c.add_compare("--osinfo generic --boot uefi --disk size=1", "boot-uefi")
c.add_compare("--osinfo generic --boot uefi --disk size=1 --tpm none --connect " + utils.URIs.kvm_x86_oldfirmware, "boot-uefi-oldcaps")
-c.add_compare("--osinfo linux2020 --boot uefi --launchSecurity sev --connect " + utils.URIs.kvm_amd_sev, "amd-sev")
+c.add_compare("--osinfo linux2020 --boot uefi --launchSecurity sev --connect " + utils.URIs.kvm_amd_sev, "amd-sev", prerun_check=no_osinfo_linux2020_virtio)
c.add_invalid("--disk none --location nfs:example.com/fake --nonetworks", grep="NFS URL installs are no longer supported")
c.add_invalid("--disk none --boot network --machine foobar", grep="domain type None with machine 'foobar'")

View File

@ -1,117 +0,0 @@
Subject: cli: --cpu: Add maxphysaddr.{mode,bits} options
From: Lin Ma lma@suse.com Fri Aug 19 18:18:50 2022 +0800
Date: Sat Aug 20 10:03:11 2022 -0400:
Git: fbdf05162606e4d70506b65d0dd647a59f229253
This commit added support for cpu physical address bits control, It's
useful for VMs with huge amount of ram.
E.g.
--cpu Cascadelake-Server,maxphysaddr.mode=emulate,maxphysaddr.bits=46
Signed-off-by: Lin Ma <lma@suse.com>
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
index c27512d1..e4a7da8f 100644
--- a/tests/data/cli/compare/virt-install-many-devices.xml
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
@@ -194,6 +194,7 @@
<bandwidth initiator="0" target="2" cache="1" type="access" value="409600" unit="KiB"/>
</interconnects>
</numa>
+ <maxphysaddr mode="emulate" bits="46"/>
</cpu>
<clock offset="utc">
<timer name="pit" tickpolicy="catchup" present="yes"/>
diff --git a/tests/data/cli/compare/virt-install-testdriver-edgecases.xml b/tests/data/cli/compare/virt-install-testdriver-edgecases.xml
index f129d089..3cc385c0 100644
--- a/tests/data/cli/compare/virt-install-testdriver-edgecases.xml
+++ b/tests/data/cli/compare/virt-install-testdriver-edgecases.xml
@@ -17,7 +17,9 @@
<pae/>
<vmport state="off"/>
</features>
- <cpu mode="host-passthrough" migratable="on"/>
+ <cpu mode="host-passthrough" migratable="on">
+ <maxphysaddr mode="passthrough"/>
+ </cpu>
<clock offset="utc"/>
<pm>
<suspend-to-mem enabled="no"/>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 9f6c3bc0..ef27276a 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -511,7 +511,8 @@ numa.interconnects.latency0.initiator=0,numa.interconnects.latency0.target=0,num
numa.interconnects.latency1.initiator=0,numa.interconnects.latency1.target=2,numa.interconnects.latency1.cache=1,numa.interconnects.latency1.type=access,numa.interconnects.latency1.value=10,numa.interconnects.latency1.unit=ns,\
numa.interconnects.bandwidth0.initiator=0,numa.interconnects.bandwidth0.target=0,numa.interconnects.bandwidth0.type=access,numa.interconnects.bandwidth0.value=204800,\
numa.interconnects.bandwidth1.initiator=0,numa.interconnects.bandwidth1.target=2,numa.interconnects.bandwidth1.cache=1,numa.interconnects.bandwidth1.type=access,numa.interconnects.bandwidth1.value=409600,numa.interconnects.bandwidth1.unit=KiB,\
-cache.mode=emulate,cache.level=3
+cache.mode=emulate,cache.level=3,\
+maxphysaddr.mode=emulate,maxphysaddr.bits=46
--numatune 1,2,3,5-7,^6,mode=strict,\
@@ -880,7 +881,7 @@ c.add_compare("--pxe "
# Hitting test driver specific output
c.add_compare("--connect " + utils.URIs.test_suite + " "
-"--cpu host-passthrough,migratable=on " # migratable=on is only accepted with host-passthrough
+"--cpu host-passthrough,migratable=on,maxphysaddr.mode=passthrough " # migratable=on is only accepted with host-passthrough
"--seclabel label=foobar.label,a1,z2,b3,relabel=yes,type=dynamic " # fills in default model=testModel
"--tpm default " # --tpm default when domcaps missing
"",
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 388c5263..5ac8266b 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -2386,6 +2386,9 @@ class ParserCPU(VirtCLIParser):
cls.add_arg("cache.level", "cache.level")
cls.add_arg("cache.mode", "cache.mode")
+ cls.add_arg("maxphysaddr.mode", "maxphysaddr.mode")
+ cls.add_arg("maxphysaddr.bits", "maxphysaddr.bits")
+
# CPU features
# These are handled specially in _parse
cls.add_arg("force", None, lookup_cb=None, cb=cls.set_feature_cb)
diff --git a/virtinst/domain/cpu.py b/virtinst/domain/cpu.py
index 5de42b4e..c635932e 100644
--- a/virtinst/domain/cpu.py
+++ b/virtinst/domain/cpu.py
@@ -102,6 +102,17 @@ class _CPUFeature(XMLBuilder):
policy = XMLProperty("./@policy")
+class _CPUMaxphysaddr(XMLBuilder):
+ """
+ Class for generating XML for <cpu> child node <maxphysaddr>.
+ """
+ XML_NAME = "maxphysaddr"
+ _XML_PROP_ORDER = ["mode", "bits"]
+
+ mode = XMLProperty("./@mode")
+ bits = XMLProperty("./@bits", is_int=True)
+
+
##############
# NUMA cells #
##############
@@ -211,7 +222,7 @@ class DomainCpu(XMLBuilder):
_XML_PROP_ORDER = ["mode", "match", "check", "migratable",
"model", "model_fallback", "model_vendor_id", "vendor",
"topology", "cache", "features",
- "cells", "latencies", "bandwidths"]
+ "cells", "latencies", "bandwidths", "maxphysaddr"]
##################
@@ -242,6 +253,8 @@ class DomainCpu(XMLBuilder):
latencies = XMLChildProperty(_NUMALatency, relative_xpath="./numa/interconnects")
bandwidths = XMLChildProperty(_NUMABandwidth, relative_xpath="./numa/interconnects")
+ maxphysaddr = XMLChildProperty(_CPUMaxphysaddr, is_single=True)
+
#############################
# Special CPU mode handling #

View File

@ -1,24 +0,0 @@
Subject: virt-install: --help required options are wrong
From: Cole Robinson crobinso@redhat.com Sun Aug 21 16:08:37 2022 -0400
Date: Sun Aug 21 16:10:55 2022 -0400:
Git: a254ece0f0497d062a0e4c94dc45619649ea4922
Nowadays it could be as simple as `virt-install --install fedora36`.
Trying to represent the interdepencies here is not worth it, but
let's keep a simple string around to avoid the default parser
usage string, which is huge
Signed-off-by: Cole Robinson <crobinso@redhat.com>
--- a/virtinst/virtinstall.py
+++ b/virtinst/virtinstall.py
@@ -1019,7 +1019,7 @@ def xml_to_print(guest, installer, xmlon
def parse_args():
parser = cli.setupParser(
- "%(prog)s --name NAME --memory MB STORAGE INSTALL [options]",
+ "%(prog)s OPTIONS",
_("Create a new virtual machine from specified install media."),
introspection_epilog=True)
cli.add_connect_option(parser)

View File

@ -1,85 +0,0 @@
Subject: cloner: Sync <uuid> and <sysinfo> system uuid
From: Cole Robinson crobinso@redhat.com Sun Aug 21 16:21:10 2022 -0400
Date: Sun Aug 21 16:21:10 2022 -0400:
Git: b0d0516736320315a70f74aff3759fb35dd35d9d
Otherwise libvirt errors like:
ERROR UUID mismatch between <uuid> and <sysinfo>
https://bugzilla.redhat.com/show_bug.cgi?id=2038040
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/data/cli/compare/virt-clone-auto-unmanaged.xml b/tests/data/cli/compare/virt-clone-auto-unmanaged.xml
index 21a9a639..f2043be2 100644
--- a/tests/data/cli/compare/virt-clone-auto-unmanaged.xml
+++ b/tests/data/cli/compare/virt-clone-auto-unmanaged.xml
@@ -1,6 +1,11 @@
<domain type="test">
<name>origtest-clone</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
+ <sysinfo type="smbios">
+ <system>
+ <entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
+ </system>
+ </sysinfo>
<memory>8388608</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
diff --git a/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml b/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml
index 3bdbbbe3..c003ed3e 100644
--- a/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml
+++ b/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml
@@ -1,6 +1,11 @@
<domain type="test">
<name>clonetest</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
+ <sysinfo type="smbios">
+ <system>
+ <entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
+ </system>
+ </sysinfo>
<memory>8388608</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
diff --git a/tests/data/cli/virtclone/clone-disk.xml b/tests/data/cli/virtclone/clone-disk.xml
index da1eb0a6..2f6e916d 100644
--- a/tests/data/cli/virtclone/clone-disk.xml
+++ b/tests/data/cli/virtclone/clone-disk.xml
@@ -1,6 +1,11 @@
<domain type='test' id='1'>
<name>origtest</name>
<uuid>db69fa1f-eef0-e567-3c20-3ef16f10376b</uuid>
+ <sysinfo type='smbios'>
+ <system>
+ <entry name='uuid'>db69fa1f-eef0-e567-3c20-3ef16f10376b</entry>
+ </system>
+ </sysinfo>
<memory>8388608</memory>
<currentMemory>2097152</currentMemory>
<vcpu>2</vcpu>
diff --git a/virtinst/cloner.py b/virtinst/cloner.py
index 34a702f9..9334513c 100644
--- a/virtinst/cloner.py
+++ b/virtinst/cloner.py
@@ -352,8 +352,7 @@ class Cloner(object):
"""
self._new_guest.id = None
self._new_guest.title = None
- self._new_guest.uuid = None
- self._new_guest.uuid = Guest.generate_uuid(self.conn)
+ self.set_clone_uuid(Guest.generate_uuid(self.conn))
for dev in self._new_guest.devices.graphics:
if dev.port and dev.port != -1:
@@ -408,6 +407,9 @@ class Cloner(object):
Override the new VMs generated UUId
"""
self._new_guest.uuid = uuid
+ for sysinfo in self._new_guest.sysinfo:
+ if sysinfo.system_uuid:
+ sysinfo.system_uuid = uuid
def set_replace(self, val):
"""

View File

@ -1,34 +0,0 @@
Subject: virt-install: --unattended and --cloud-init conflict
From: Cole Robinson crobinso@redhat.com Sun Aug 21 16:47:26 2022 -0400
Date: Sun Aug 21 16:47:26 2022 -0400:
Git: 999ccb85e3e4189386786256cdf70cf5238cf785
Make it an explicit error, otherwise unattended is preferred and
cloud-init is ignored
https://bugzilla.redhat.com/show_bug.cgi?id=2117157
Signed-off-by: Cole Robinson <crobinso@redhat.com>
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1116,6 +1116,7 @@ c.add_invalid("--disk none --boot networ
c.add_invalid("--nodisks --boot network --arch mips --virt-type kvm", grep="any virtualization options for architecture 'mips'")
c.add_invalid("--nodisks --boot network --paravirt --arch mips", grep=" 'xen' for architecture 'mips'")
c.add_invalid("--osinfo generic --launchSecurity sev --connect " + utils.URIs.kvm_amd_sev, grep="SEV launch security requires a Q35 UEFI machine")
+c.add_invalid("--disk none --cloud-init --unattended --install fedora30", grep="--unattended and --cloud-init can not")
--- a/virtinst/virtinstall.py
+++ b/virtinst/virtinstall.py
@@ -411,6 +411,9 @@ def build_installer(options, guest, inst
else:
extra_args = [installdata.kernel_args]
+ if options.unattended and options.cloud_init:
+ fail("--unattended and --cloud-init can not be specified together.")
+
if options.unattended:
unattended_data = cli.parse_unattended(options.unattended)

View File

@ -1,31 +0,0 @@
Subject: virt-install: Reuse cli.fail_conflicting
From: Cole Robinson crobinso@redhat.com Mon Aug 22 10:15:46 2022 -0400
Date: Mon Aug 22 10:16:19 2022 -0400:
Git: 1d64a678d31829051444e1bf29d86f800e13de39
For the --unattended + --cloud-init conflict
Signed-off-by: Cole Robinson <crobinso@redhat.com>
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1116,7 +1116,7 @@ c.add_invalid("--disk none --boot networ
c.add_invalid("--nodisks --boot network --arch mips --virt-type kvm", grep="any virtualization options for architecture 'mips'")
c.add_invalid("--nodisks --boot network --paravirt --arch mips", grep=" 'xen' for architecture 'mips'")
c.add_invalid("--osinfo generic --launchSecurity sev --connect " + utils.URIs.kvm_amd_sev, grep="SEV launch security requires a Q35 UEFI machine")
-c.add_invalid("--disk none --cloud-init --unattended --install fedora30", grep="--unattended and --cloud-init can not")
+c.add_invalid("--disk none --cloud-init --unattended --install fedora30", grep="Cannot use --unattended and --cloud-init at the same time")
--- a/virtinst/virtinstall.py
+++ b/virtinst/virtinstall.py
@@ -412,7 +412,7 @@ def build_installer(options, guest, inst
extra_args = [installdata.kernel_args]
if options.unattended and options.cloud_init:
- fail("--unattended and --cloud-init can not be specified together.")
+ cli.fail_conflicting("--unattended", "--cloud-init")
if options.unattended:
unattended_data = cli.parse_unattended(options.unattended)

View File

@ -1,74 +0,0 @@
Subject: cli: support --boot loader.stateless=
From: Cole Robinson crobinso@redhat.com Mon Oct 17 11:54:37 2022 -0400
Date: Mon Oct 17 11:54:37 2022 -0400:
Git: 15ddeae6cb405bad10bc62164b14117646e9127e
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/data/cli/compare/virt-install-singleton-config-2.xml b/tests/data/cli/compare/virt-install-singleton-config-2.xml
index d567d188..27c69c11 100644
--- a/tests/data/cli/compare/virt-install-singleton-config-2.xml
+++ b/tests/data/cli/compare/virt-install-singleton-config-2.xml
@@ -11,7 +11,7 @@
<vcpu cpuset="1,3-5">2</vcpu>
<os>
<type arch="x86_64" machine="q35">hvm</type>
- <loader readonly="yes" secure="no" type="rom">/tmp/foo</loader>
+ <loader readonly="yes" secure="no" type="rom" stateless="yes">/tmp/foo</loader>
<smbios mode="emulate"/>
<boot dev="network"/>
<boot dev="hd"/>
@@ -112,7 +112,7 @@
<vcpu cpuset="1,3-5">2</vcpu>
<os>
<type arch="x86_64" machine="q35">hvm</type>
- <loader readonly="yes" secure="no" type="rom">/tmp/foo</loader>
+ <loader readonly="yes" secure="no" type="rom" stateless="yes">/tmp/foo</loader>
<boot dev="hd"/>
<smbios mode="emulate"/>
</os>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 9d4e5ae3..3d299c12 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -832,7 +832,7 @@ c.add_compare("--pxe "
"--cpuset 1,3-5 " # setting compat --cpuset when --vcpus is not present
# --boot loader settings here, or they will conflict with firmware=efi
# in other test cases
-"--boot loader_ro=yes,loader.type=rom,loader=/tmp/foo,loader_secure=no "
+"--boot loader_ro=yes,loader.type=rom,loader=/tmp/foo,loader_secure=no,loader.stateless=yes"
# 'default' handling for solo devices
"""
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 5ac8266b..8dbffeb6 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -2861,6 +2861,7 @@ class ParserBoot(VirtCLIParser):
cls.add_arg("loader.readonly", "loader_ro", is_onoff=True)
cls.add_arg("loader.type", "loader_type")
cls.add_arg("loader.secure", "loader_secure", is_onoff=True)
+ cls.add_arg("loader.stateless", "loader_stateless", is_onoff=True)
# Guest-Based bootloader options
cls.add_arg("firmware", "firmware")
diff --git a/virtinst/domain/os.py b/virtinst/domain/os.py
index e2cea755..4310e623 100644
--- a/virtinst/domain/os.py
+++ b/virtinst/domain/os.py
@@ -86,6 +86,7 @@ class DomainOs(XMLBuilder):
_XML_PROP_ORDER = [
"firmware", "os_type", "arch", "machine", "firmware_features",
"loader", "loader_ro", "loader_secure", "loader_type",
+ "loader_stateless",
"nvram", "nvram_template",
"init", "initargs", "initenvs", "initdir", "inituser", "initgroup",
"kernel", "initrd", "kernel_args", "dtb", "acpi_tb", "acpi_tb_type",
@@ -100,6 +101,7 @@ class DomainOs(XMLBuilder):
loader_ro = XMLProperty("./loader/@readonly", is_yesno=True)
loader_type = XMLProperty("./loader/@type")
loader_secure = XMLProperty("./loader/@secure", is_yesno=True)
+ loader_stateless = XMLProperty("./loader/@stateless", is_yesno=True)
# BIOS bootloader options
def _get_bootorder(self):

View File

@ -1,161 +0,0 @@
Subject: diskbackend: Drop support for sheepdog
From: Lin Ma lma@suse.com Wed Nov 2 20:45:43 2022 +0800
Date: Mon Nov 7 10:10:00 2022 -0500:
Git: 4a2df064839f71ed94320771507b1271d041e397
The sheepdog project is no longer actively developed, Libvirt removed
the support for sheepdog storage backend since v8.8.0, Let's drop it.
Signed-off-by: Lin Ma <lma@suse.com>
diff --git a/tests/data/cli/compare/virt-xml-build-disk-domain.xml b/tests/data/cli/compare/virt-xml-build-disk-domain.xml
index 1a08b20e..6d9f7160 100644
--- a/tests/data/cli/compare/virt-xml-build-disk-domain.xml
+++ b/tests/data/cli/compare/virt-xml-build-disk-domain.xml
@@ -1,5 +1,5 @@
<disk type="file" device="disk">
<driver name="qemu" type="qcow2"/>
<source file="/pool-dir/testvol1.img"/>
- <target dev="vdag" bus="virtio"/>
+ <target dev="vdaf" bus="virtio"/>
</disk>
diff --git a/tests/data/cli/compare/virt-xml-build-pool-logical-disk.xml b/tests/data/cli/compare/virt-xml-build-pool-logical-disk.xml
index 055a8f04..49c9bd4a 100644
--- a/tests/data/cli/compare/virt-xml-build-pool-logical-disk.xml
+++ b/tests/data/cli/compare/virt-xml-build-pool-logical-disk.xml
@@ -1,5 +1,5 @@
<disk type="volume" device="disk">
<driver name="qemu" type="raw"/>
<source volume="sdfg1" pool="pool-disk"/>
- <target dev="vdag" bus="virtio"/>
+ <target dev="vdaf" bus="virtio"/>
</disk>
diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml
index 7c94e698..04476b22 100644
--- a/tests/data/testdriver/testdriver.xml
+++ b/tests/data/testdriver/testdriver.xml
@@ -294,26 +294,19 @@ Foo bar baz &amp; yeah boii &lt; &gt; yeahfoo
</source>
<target dev='vdac' bus='virtio'/>
</disk>
- <disk type='network' device='disk'>
- <driver name='qemu' type='raw'/>
- <source protocol='sheepdog' name='image,with,commas'>
- <host name='example.org' port='6000'/>
- </source>
- <target dev='vdad' bus='virtio'/>
- </disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw'/>
<source protocol='gluster' name='test-volume/test-gluster2.raw'>
<host name='192.168.1.100'/>
</source>
- <target dev='vdae' bus='virtio'/>
+ <target dev='vdad' bus='virtio'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw'/>
<source protocol='nbd'>
<host transport='unix' socket='relative.sock'/>
</source>
- <target dev='vdaf' bus='virtio'/>
+ <target dev='vdae' bus='virtio'/>
</disk>
<!-- bus usb -->
@@ -2171,35 +2164,6 @@ ba</description>
</pool>
-<pool type='sheepdog'>
- <name>pool-sheepdog</name>
- <uuid>581381f8-a13f-4f7c-89b5-9c9b71c64834</uuid>
- <capacity unit='bytes'>107374182400</capacity>
- <allocation unit='bytes'>53687091200</allocation>
- <available unit='bytes'>53687091200</available>
- <source>
- <host name='localhost' port='7000'/>
- <name>mysheeppool</name>
- </source>
-
- <volume type='network'>
- <name>vol_sheepdog</name>
- <key>sheep/vol_sheepdog</key>
- <capacity unit='bytes'>1024</capacity>
- <allocation unit='bytes'>0</allocation>
- <target>
- <path>sheepdog:vol_sheepdog</path>
- <format type='unknown'/>
- <permissions>
- <mode>0600</mode>
- <owner>-1</owner>
- <group>-1</group>
- </permissions>
- </target>
- </volume>
-</pool>
-
-
<pool type='gluster'>
<name>pool-gluster</name>
<uuid>7b83ef6d-28da-44f1-841f-2011320f13b0</uuid>
diff --git a/virtManager/object/storagepool.py b/virtManager/object/storagepool.py
index 563526bb..1b4da515 100644
--- a/virtManager/object/storagepool.py
+++ b/virtManager/object/storagepool.py
@@ -32,7 +32,6 @@ POOL_TYPE_DESCS = {
StoragePool.TYPE_MPATH: _("Multipath Device Enumerator"),
StoragePool.TYPE_GLUSTER: _("Gluster Filesystem"),
StoragePool.TYPE_RBD: _("RADOS Block Device/Ceph"),
- StoragePool.TYPE_SHEEPDOG: _("Sheepdog Filesystem"),
StoragePool.TYPE_ZFS: _("ZFS Pool"),
}
@@ -128,7 +127,6 @@ class vmmStoragePool(vmmLibvirtObject):
]
if not clone:
supported.extend([
- StoragePool.TYPE_SHEEPDOG,
StoragePool.TYPE_ZFS,
])
return pool_type in supported
diff --git a/virtinst/storage.py b/virtinst/storage.py
index 509f5cb0..3c5d39bb 100644
--- a/virtinst/storage.py
+++ b/virtinst/storage.py
@@ -82,7 +82,6 @@ class StoragePool(_StorageObject):
TYPE_MPATH = "mpath"
TYPE_GLUSTER = "gluster"
TYPE_RBD = "rbd"
- TYPE_SHEEPDOG = "sheepdog"
TYPE_ZFS = "zfs"
@staticmethod
@@ -311,7 +310,7 @@ class StoragePool(_StorageObject):
def supports_source_name(self):
return self.type in [self.TYPE_LOGICAL, self.TYPE_GLUSTER,
- self.TYPE_RBD, self.TYPE_SHEEPDOG, self.TYPE_ZFS]
+ self.TYPE_RBD, self.TYPE_ZFS]
def supports_source_path(self):
@@ -323,7 +322,7 @@ class StoragePool(_StorageObject):
def supports_hosts(self):
return self.type in [
self.TYPE_NETFS, self.TYPE_ISCSI, self.TYPE_GLUSTER,
- self.TYPE_RBD, self.TYPE_SHEEPDOG]
+ self.TYPE_RBD]
def supports_format(self):
return self.type in [self.TYPE_FS, self.TYPE_NETFS, self.TYPE_DISK]
@@ -340,8 +339,7 @@ class StoragePool(_StorageObject):
return StorageVolume.TYPE_BLOCK
if (self.type == StoragePool.TYPE_GLUSTER or
self.type == StoragePool.TYPE_RBD or
- self.type == StoragePool.TYPE_ISCSI or
- self.type == StoragePool.TYPE_SHEEPDOG):
+ self.type == StoragePool.TYPE_ISCSI):
return StorageVolume.TYPE_NETWORK
return StorageVolume.TYPE_FILE

View File

@ -1,249 +0,0 @@
Subject: Fix pylint/pycodestyle warnings with latest versions
From: Cole Robinson crobinso@redhat.com Tue Dec 13 10:51:14 2022 -0500
Date: Tue Dec 13 11:23:45 2022 -0500:
Git: bb1afaba29019605a240a57d6b3ca8eb36341d9b
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/setup.py b/setup.py
index b45d315a..4bf29f25 100755
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,7 @@ import setuptools.command.install_egg_info
#
# Newer setuptools will transparently support 'import distutils' though.
# That can be overridden with SETUPTOOLS_USE_DISTUTILS env variable
-import distutils.command.build # pylint: disable=wrong-import-order
+import distutils.command.build # pylint: disable=wrong-import-order,deprecated-module
SYSPREFIX = sysconfig.get_config_var("prefix")
diff --git a/tests/test_disk.py b/tests/test_disk.py
index ef065157..9127371b 100644
--- a/tests/test_disk.py
+++ b/tests/test_disk.py
@@ -82,6 +82,7 @@ def test_disk_dir_searchable(monkeypatch):
searchdata = virtinst.DeviceDisk.check_path_search(conn,
tmpdir + "/footest")
assert searchdata.uid == os.getuid()
+ # pylint: disable=use-implicit-booleaness-not-comparison
assert searchdata.fixlist == []
# Remove perms on the tmpdir, now it should report failures
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
index 0a8e33d3..aec48dd2 100644
--- a/virtManager/addhardware.py
+++ b/virtManager/addhardware.py
@@ -371,8 +371,8 @@ class vmmAddHardware(vmmGObjectUI):
msg = _("These changes will take effect after "
"the next guest shutdown.")
- dtype = (hotplug_err and
- Gtk.MessageType.WARNING or Gtk.MessageType.INFO)
+ dtype = (Gtk.MessageType.WARNING if hotplug_err else
+ Gtk.MessageType.INFO)
hotplug_msg = ""
if hotplug_err:
hotplug_msg += (hotplug_err[0] + "\n\n" +
@@ -1560,7 +1560,7 @@ class vmmAddHardware(vmmGObjectUI):
controller_num = [x for x in controllers if
(x.type == controller_type)]
if len(controller_num) > 0:
- index_new = max([x.index for x in controller_num]) + 1
+ index_new = max(x.index for x in controller_num) + 1
dev.index = index_new
dev.type = controller_type
diff --git a/virtManager/details/sshtunnels.py b/virtManager/details/sshtunnels.py
index 9afc1e13..cb7ca7c0 100644
--- a/virtManager/details/sshtunnels.py
+++ b/virtManager/details/sshtunnels.py
@@ -22,7 +22,7 @@ class ConnectionInfo(object):
"""
def __init__(self, conn, gdev):
self.gtype = gdev.type
- self.gport = gdev.port and str(gdev.port) or None
+ self.gport = str(gdev.port) if gdev.port else None
self.gsocket = (gdev.listens and gdev.listens[0].socket) or gdev.socket
self.gaddr = gdev.listen or "127.0.0.1"
self.gtlsport = gdev.tlsPort or None
diff --git a/virtManager/lib/statsmanager.py b/virtManager/lib/statsmanager.py
index 28495495..ece130ab 100644
--- a/virtManager/lib/statsmanager.py
+++ b/virtManager/lib/statsmanager.py
@@ -66,7 +66,7 @@ class _VMStatsList(vmmGObject):
expected = self.config.get_stats_history_length()
current = len(self._stats)
if current > expected: # pragma: no cover
- del(self._stats[expected:current])
+ del self._stats[expected:current]
def _calculate_rate(record_name):
ret = 0.0
diff --git a/virtManager/object/domain.py b/virtManager/object/domain.py
index 2d6f5bca..1570b952 100644
--- a/virtManager/object/domain.py
+++ b/virtManager/object/domain.py
@@ -1306,10 +1306,10 @@ class vmmDomain(vmmLibvirtObject):
def get_arch(self):
return self.get_xmlobj().os.arch
def get_init(self):
- import pipes
+ import shlex
init = self.get_xmlobj().os.init
initargs = " ".join(
- [pipes.quote(i.val) for i in self.get_xmlobj().os.initargs])
+ [shlex.quote(i.val) for i in self.get_xmlobj().os.initargs])
return init, initargs
def get_emulator(self):
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 8dbffeb6..7615f743 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -85,7 +85,7 @@ class VirtHelpFormatter(argparse.RawDescriptionHelpFormatter):
'''
oldwrap = None
- # pylint: disable=arguments-differ
+ # pylint: disable=arguments-differ,protected-access
def _split_lines(self, *args, **kwargs):
def return_default():
return argparse.RawDescriptionHelpFormatter._split_lines(
@@ -1690,7 +1690,7 @@ def convert_old_force(options):
if options.force:
if not options.check:
options.check = "all=off"
- del(options.force)
+ del options.force
class ParserCheck(VirtCLIParser):
@@ -2281,7 +2281,7 @@ class ParserCPU(VirtCLIParser):
policy = "disable"
if policy:
- del(self.optdict[key])
+ del self.optdict[key]
converted[policy].append(key[1:])
self.optdict.update(converted)
@@ -2753,7 +2753,7 @@ class ParserBoot(VirtCLIParser):
if cliname not in inst.BOOT_DEVICES:
continue
- del(self.optdict[cliname])
+ del self.optdict[cliname]
if cliname not in boot_order:
boot_order.append(cliname)
diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py
index d22ce6a2..1b5b6bf6 100644
--- a/virtinst/domcapabilities.py
+++ b/virtinst/domcapabilities.py
@@ -334,7 +334,7 @@ class DomainCapabilities(XMLBuilder):
"""
Return True if we know how to setup UEFI for the passed arch
"""
- return self.arch in list(self._uefi_arch_patterns.keys())
+ return self.arch in self._uefi_arch_patterns
def supports_uefi_loader(self):
"""
diff --git a/virtinst/pollhelpers.py b/virtinst/pollhelpers.py
index ef695914..f9fcc3fa 100644
--- a/virtinst/pollhelpers.py
+++ b/virtinst/pollhelpers.py
@@ -32,7 +32,7 @@ def _new_poll_helper(origmap, typename, list_cb, build_cb, support_cb):
else:
# Previously known object
current[name] = origmap[name]
- del(origmap[name])
+ del origmap[name]
return (list(origmap.values()), list(new.values()), list(current.values()))
diff --git a/virtinst/virtinstall.py b/virtinst/virtinstall.py
index 8fcc8ce1..130c8e28 100644
--- a/virtinst/virtinstall.py
+++ b/virtinst/virtinstall.py
@@ -67,7 +67,7 @@ def check_cdrom_option_error(options):
def convert_old_printxml(options):
if options.xmlstep:
options.xmlonly = options.xmlstep
- del(options.xmlstep)
+ del options.xmlstep
def convert_old_sound(options):
@@ -135,10 +135,10 @@ def convert_old_disks(options):
else:
_do_convert_old_disks(options)
- del(options.file_paths)
- del(options.disksize)
- del(options.sparse)
- del(options.nodisks)
+ del options.file_paths
+ del options.disksize
+ del options.sparse
+ del options.nodisks
log.debug("Distilled --disk options: %s", options.disk)
@@ -147,7 +147,7 @@ def convert_old_os_options(options):
return
log.warning(
_("--os-type is deprecated and does nothing. Please stop using it."))
- del(options.old_os_type)
+ del options.old_os_type
def convert_old_memory(options):
@@ -204,9 +204,9 @@ def convert_old_networks(options):
networks[idx] = networks[idx].replace(prefix + ":",
prefix + "=")
- del(options.mac)
- del(options.bridge)
- del(options.nonetworks)
+ del options.mac
+ del options.bridge
+ del options.nonetworks
options.network = networks
log.debug("Distilled --network options: %s", options.network)
@@ -224,7 +224,7 @@ def convert_old_graphics(options):
if graphics and (vnc or sdl or keymap or vncport or vnclisten):
fail(_("Cannot mix --graphics and old style graphical options"))
- optnum = sum([bool(g) for g in [vnc, nographics, sdl, graphics]])
+ optnum = sum(bool(g) for g in [vnc, nographics, sdl, graphics])
if optnum > 1:
raise ValueError(_("Can't specify more than one of VNC, SDL, "
"--graphics or --nographics"))
diff --git a/virtinst/xmlbuilder.py b/virtinst/xmlbuilder.py
index 07a9e319..dd78038e 100644
--- a/virtinst/xmlbuilder.py
+++ b/virtinst/xmlbuilder.py
@@ -262,9 +262,9 @@ class XMLProperty(_XMLPropertyBase):
self._is_onoff = is_onoff
self._do_abspath = do_abspath
- conflicts = sum([int(bool(i)) for i in
+ conflicts = sum(int(bool(i)) for i in
[self._is_bool, self._is_int,
- self._is_yesno, self._is_onoff]])
+ self._is_yesno, self._is_onoff])
if conflicts > 1:
raise xmlutil.DevError("Conflict property converter options.")
@@ -343,7 +343,7 @@ class XMLProperty(_XMLPropertyBase):
propstore = xmlbuilder._propstore
if self.propname in propstore:
- del(propstore[self.propname])
+ del propstore[self.propname]
propstore[self.propname] = val
def _nonxml_fget(self, xmlbuilder):

View File

@ -1,19 +0,0 @@
Subject: tests: cpio: set owner to 0:0
From: Weijia Wang 9713184+wegank@users.noreply.github.com Sat Aug 6 19:00:07 2022 +0000
Date: Tue Dec 13 13:45:16 2022 -0500:
Git: 75a25e37660c5578587f4a7a75917cf98d77cf7e
diff --git a/virtinst/install/installerinject.py b/virtinst/install/installerinject.py
index 0b2a9bc5..98d88cf8 100644
--- a/virtinst/install/installerinject.py
+++ b/virtinst/install/installerinject.py
@@ -20,7 +20,7 @@ def _run_initrd_commands(initrd, tempdir):
stderr=subprocess.PIPE,
cwd=tempdir)
cpio_proc = subprocess.Popen(['cpio', '--create', '--null', '--quiet',
- '--format=newc', '--owner=root:root'],
+ '--format=newc', '--owner=0:0'],
stdin=find_proc.stdout,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,

View File

@ -1,28 +0,0 @@
Subject: addhardware: Fix backtrace when controller.index is None
From: Cole Robinson crobinso@redhat.com Tue Dec 13 13:49:35 2022 -0500
Date: Tue Dec 13 13:49:35 2022 -0500:
Git: 67832d3097cd6451833c30452d6991896e05933c
When creating a new VM, in the customize wizard we can't depend on
index= value being set (virtinst doesn't do it for example).
For example, this causes a backtrace when adding two virtio-scsi
controllers via the Customize wizard, or adding an extra
virtio-scsi controller to an aarch64 CDROM install.
Reported-by: Charles Arnold <carnold@suse.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
index aec48dd2..a1dd3261 100644
--- a/virtManager/addhardware.py
+++ b/virtManager/addhardware.py
@@ -1560,7 +1560,7 @@ class vmmAddHardware(vmmGObjectUI):
controller_num = [x for x in controllers if
(x.type == controller_type)]
if len(controller_num) > 0:
- index_new = max(x.index for x in controller_num) + 1
+ index_new = max(int(x.index or 0) for x in controller_num) + 1
dev.index = index_new
dev.type = controller_type

View File

@ -1,492 +0,0 @@
Subject: Clean up FileChooser usage a bit
From: Cole Robinson crobinso@redhat.com Tue Dec 13 15:09:35 2022 -0500
Date: Wed Dec 14 12:31:17 2022 -0500:
Git: cbc5b897077671a675faf48603d9714527d84c83
* Move browse_reason handling entirely into storagebrowser.py
* Open code some of the browse_local logic at the few callers
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
index a1dd3261..df902374 100644
--- a/virtManager/addhardware.py
+++ b/virtManager/addhardware.py
@@ -1590,8 +1590,8 @@ class vmmAddHardware(vmmGObjectUI):
textent.set_text(path)
reason = (isdir and
- self.config.CONFIG_DIR_FS or
- self.config.CONFIG_DIR_IMAGE)
+ vmmStorageBrowser.REASON_FS or
+ vmmStorageBrowser.REASON_IMAGE)
if self._storagebrowser is None:
self._storagebrowser = vmmStorageBrowser(self.conn)
diff --git a/virtManager/config.py b/virtManager/config.py
index 8379697c..2c81b061 100644
--- a/virtManager/config.py
+++ b/virtManager/config.py
@@ -133,51 +133,6 @@ class _SettingsWrapper(object):
class vmmConfig(object):
- # key names for saving last used paths
- CONFIG_DIR_IMAGE = "image"
- CONFIG_DIR_ISO_MEDIA = "isomedia"
- CONFIG_DIR_FLOPPY_MEDIA = "floppymedia"
- CONFIG_DIR_SCREENSHOT = "screenshot"
- CONFIG_DIR_FS = "fs"
-
- # Metadata mapping for browse types. Prob shouldn't go here, but works
- # for now.
- browse_reason_data = {
- CONFIG_DIR_IMAGE: {
- "enable_create": True,
- "storage_title": _("Locate or create storage volume"),
- "local_title": _("Locate existing storage"),
- "dialog_type": Gtk.FileChooserAction.SAVE,
- "choose_button": Gtk.STOCK_OPEN,
- "gsettings_key": "image",
- },
-
- CONFIG_DIR_SCREENSHOT: {
- "gsettings_key": "screenshot",
- },
-
- CONFIG_DIR_ISO_MEDIA: {
- "enable_create": False,
- "storage_title": _("Locate ISO media volume"),
- "local_title": _("Locate ISO media"),
- "gsettings_key": "media",
- },
-
- CONFIG_DIR_FLOPPY_MEDIA: {
- "enable_create": False,
- "storage_title": _("Locate floppy media volume"),
- "local_title": _("Locate floppy media"),
- "gsettings_key": "media",
- },
-
- CONFIG_DIR_FS: {
- "enable_create": False,
- "storage_title": _("Locate directory volume"),
- "local_title": _("Locate directory volume"),
- "dialog_type": Gtk.FileChooserAction.SELECT_FOLDER,
- },
- }
-
CONSOLE_SCALE_NEVER = 0
CONSOLE_SCALE_FULLSCREEN = 1
CONSOLE_SCALE_ALWAYS = 2
@@ -627,23 +582,15 @@ class vmmConfig(object):
# Default directory location dealings
- def get_default_directory(self, conn, _type):
- ignore = conn
- browsedata = self.browse_reason_data.get(_type, {})
- key = browsedata.get("gsettings_key", None)
- path = None
-
- if key:
- path = self.conf.get("/paths/%s-default" % key)
-
- log.debug("directory for type=%s returning=%s", _type, path)
+ def get_default_directory(self, gsettings_key):
+ path = self.conf.get("/paths/%s-default" % gsettings_key)
+ log.debug("directory for gsettings_key=%s returning=%s",
+ gsettings_key, path)
return path
- def set_default_directory(self, folder, _type):
- browsedata = self.browse_reason_data.get(_type, {})
- key = browsedata.get("gsettings_key", None)
- if not key:
+ def set_default_directory(self, gsettings_key, folder):
+ if not folder or folder.startswith("/dev"):
return # pragma: no cover
-
- log.debug("saving directory for type=%s to %s", key, folder)
- self.conf.set("/paths/%s-default" % key, folder)
+ log.debug("saving directory for gsettings_key=%s to %s",
+ gsettings_key, folder)
+ self.conf.set("/paths/%s-default" % gsettings_key, folder)
diff --git a/virtManager/createpool.py b/virtManager/createpool.py
index 66457b51..a3e9a99a 100644
--- a/virtManager/createpool.py
+++ b/virtManager/createpool.py
@@ -381,9 +381,8 @@ class vmmCreatePool(vmmGObjectUI):
self._show_options_by_pool()
def _browse_source_cb(self, src):
- source = self.err.browse_local(self.conn,
+ source = self.err.browse_local(
_("Choose source path"),
- dialog_type=Gtk.FileChooserAction.OPEN,
start_folder="/dev")
if source:
self.widget("pool-source-path").get_child().set_text(source)
@@ -394,7 +393,7 @@ class vmmCreatePool(vmmGObjectUI):
if current:
startfolder = os.path.dirname(current)
- target = self.err.browse_local(self.conn,
+ target = self.err.browse_local(
_("Choose target directory"),
dialog_type=Gtk.FileChooserAction.SELECT_FOLDER,
start_folder=startfolder)
diff --git a/virtManager/createvm.py b/virtManager/createvm.py
index 7e5ded68..95aff71b 100644
--- a/virtManager/createvm.py
+++ b/virtManager/createvm.py
@@ -1280,11 +1280,11 @@ class vmmCreateVM(vmmGObjectUI):
def _browse_file(self, cbwidget, cb=None, is_media=False, is_dir=False):
if is_media:
- reason = self.config.CONFIG_DIR_ISO_MEDIA
+ reason = vmmStorageBrowser.REASON_ISO_MEDIA
elif is_dir:
- reason = self.config.CONFIG_DIR_FS
+ reason = vmmStorageBrowser.REASON_FS
else:
- reason = self.config.CONFIG_DIR_IMAGE
+ reason = vmmStorageBrowser.REASON_IMAGE
if cb:
callback = cb
diff --git a/virtManager/createvol.py b/virtManager/createvol.py
index 58453038..ea82964a 100644
--- a/virtManager/createvol.py
+++ b/virtManager/createvol.py
@@ -208,7 +208,7 @@ class vmmCreateVolume(vmmGObjectUI):
self._storage_browser.set_finish_cb(cb)
self._storage_browser.topwin.set_modal(self.topwin.get_modal())
self._storage_browser.set_browse_reason(
- self.config.CONFIG_DIR_IMAGE)
+ vmmStorageBrowser.REASON_IMAGE)
self._storage_browser.show(self.topwin)
diff --git a/virtManager/details/details.py b/virtManager/details/details.py
index 757e18ad..1970d0aa 100644
--- a/virtManager/details/details.py
+++ b/virtManager/details/details.py
@@ -1089,7 +1089,7 @@ class vmmDetails(vmmGObjectUI):
def _browse_file(self, callback, reason=None):
if not reason:
- reason = self.config.CONFIG_DIR_IMAGE
+ reason = vmmStorageBrowser.REASON_IMAGE
if self.storage_browser is None:
self.storage_browser = vmmStorageBrowser(self.conn)
@@ -1235,9 +1235,9 @@ class vmmDetails(vmmGObjectUI):
def _disk_source_browse_clicked_cb(self, src):
disk = self._get_hw_row()[HW_LIST_COL_DEVICE]
if disk.is_floppy():
- reason = self.config.CONFIG_DIR_FLOPPY_MEDIA
+ reason = vmmStorageBrowser.REASON_FLOPPY_MEDIA
else:
- reason = self.config.CONFIG_DIR_ISO_MEDIA
+ reason = vmmStorageBrowser.REASON_ISO_MEDIA
def cb(ignore, path):
self._mediacombo.set_path(path)
diff --git a/virtManager/device/fsdetails.py b/virtManager/device/fsdetails.py
index b9956e1d..555c745a 100644
--- a/virtManager/device/fsdetails.py
+++ b/virtManager/device/fsdetails.py
@@ -268,8 +268,8 @@ class vmmFSDetails(vmmGObjectUI):
textent.set_text(path)
reason = (isdir and
- self.config.CONFIG_DIR_FS or
- self.config.CONFIG_DIR_IMAGE)
+ vmmStorageBrowser.REASON_FS or
+ vmmStorageBrowser.REASON_IMAGE)
if self._storage_browser is None:
self._storage_browser = vmmStorageBrowser(self.conn)
diff --git a/virtManager/error.py b/virtManager/error.py
index 8d78efae..593c89ca 100644
--- a/virtManager/error.py
+++ b/virtManager/error.py
@@ -3,6 +3,7 @@
# This work is licensed under the GNU GPLv2 or later.
# See the COPYING file in the top-level directory.
+import os
import sys
import textwrap
import traceback
@@ -231,49 +232,38 @@ class vmmErrorDialog(vmmGObject):
return response
- def browse_local(self, conn, dialog_name, start_folder=None,
+ def browse_local(self, dialog_name, start_folder=None,
_type=None, dialog_type=None,
- browse_reason=None,
- choose_button=None, default_name=None):
+ choose_button=None, default_name=None,
+ confirm_overwrite=False):
"""
Helper function for launching a filechooser
@dialog_name: String to use in the title bar of the filechooser.
- @conn: vmmConnection used by calling class
@start_folder: Folder the filechooser is viewing at startup
@_type: File extension to filter by (e.g. "iso", "png")
@dialog_type: Maps to FileChooserDialog 'action'
- @browse_reason: The vmmConfig.CONFIG_DIR* reason we are browsing.
- If set, this will override the 'folder' parameter with the gsettings
- value, and store the user chosen path.
"""
- import os
-
- # Initial setup
- overwrite_confirm = False
- dialog_type = dialog_type or Gtk.FileChooserAction.OPEN
-
- if dialog_type == Gtk.FileChooserAction.SAVE:
- if choose_button is None:
- choose_button = Gtk.STOCK_SAVE
- overwrite_confirm = True
-
+ if dialog_type is None:
+ dialog_type = Gtk.FileChooserAction.OPEN
if choose_button is None:
choose_button = Gtk.STOCK_OPEN
+ buttons = (Gtk.STOCK_CANCEL,
+ Gtk.ResponseType.CANCEL,
+ choose_button,
+ Gtk.ResponseType.ACCEPT)
+
fcdialog = Gtk.FileChooserDialog(title=dialog_name,
parent=self.get_parent(),
action=dialog_type,
- buttons=(Gtk.STOCK_CANCEL,
- Gtk.ResponseType.CANCEL,
- choose_button,
- Gtk.ResponseType.ACCEPT))
+ buttons=buttons)
fcdialog.set_default_response(Gtk.ResponseType.ACCEPT)
if default_name:
fcdialog.set_current_name(default_name)
- fcdialog.set_do_overwrite_confirmation(overwrite_confirm)
+ fcdialog.set_do_overwrite_confirmation(confirm_overwrite)
# Set file match pattern (ex. *.png)
if _type is not None:
@@ -289,11 +279,6 @@ class vmmErrorDialog(vmmGObject):
f.set_name(name)
fcdialog.set_filter(f)
- # Set initial dialog folder
- if browse_reason:
- start_folder = self.config.get_default_directory(
- conn, browse_reason)
-
if start_folder is not None:
if os.access(start_folder, os.R_OK):
fcdialog.set_current_folder(start_folder)
@@ -304,10 +289,6 @@ class vmmErrorDialog(vmmGObject):
ret = fcdialog.get_filename()
fcdialog.destroy()
- # Store the chosen directory in gsettings if necessary
- if ret and browse_reason and not ret.startswith("/dev"):
- self.config.set_default_directory(
- os.path.dirname(ret), browse_reason)
return ret
diff --git a/virtManager/storagebrowse.py b/virtManager/storagebrowse.py
index b5fa9a2e..c5a26519 100644
--- a/virtManager/storagebrowse.py
+++ b/virtManager/storagebrowse.py
@@ -4,6 +4,10 @@
# This work is licensed under the GNU GPLv2 or later.
# See the COPYING file in the top-level directory.
+import os
+
+from gi.repository import Gtk
+
from virtinst import log
from .lib import uiutil
@@ -11,15 +15,53 @@ from .baseclass import vmmGObjectUI
from .hoststorage import vmmHostStorage
+class _BrowseReasonMetadata:
+ def __init__(self, browse_reason):
+ self.enable_create = False
+ self.storage_title = None
+ self.local_title = None
+ self.gsettings_key = None
+ self.dialog_type = None
+
+ if browse_reason == vmmStorageBrowser.REASON_IMAGE:
+ self.enable_create = True
+ self.local_title = _("Locate existing storage")
+ self.storage_title = _("Locate or create storage volume")
+ self.dialog_type = Gtk.FileChooserAction.SAVE
+ self.gsettings_key = "image"
+
+ if browse_reason == vmmStorageBrowser.REASON_ISO_MEDIA:
+ self.local_title = _("Locate ISO media")
+ self.storage_title = _("Locate ISO media volume")
+ self.gsettings_key = "media"
+
+ if browse_reason == vmmStorageBrowser.REASON_FLOPPY_MEDIA:
+ self.local_title = _("Locate floppy media")
+ self.storage_title = _("Locate floppy media volume")
+ self.gsettings_key = "media"
+
+ if browse_reason == vmmStorageBrowser.REASON_FS:
+ self.local_title = _("Locate directory volume")
+ self.storage_title = _("Locate directory volume")
+ self.dialog_type = Gtk.FileChooserAction.SELECT_FOLDER
+
+ if browse_reason is None:
+ self.enable_create = True
+ self.storage_title = _("Choose Storage Volume")
+
+
class vmmStorageBrowser(vmmGObjectUI):
+ REASON_IMAGE = "image"
+ REASON_ISO_MEDIA = "isomedia"
+ REASON_FLOPPY_MEDIA = "floppymedia"
+ REASON_FS = "fs"
+
def __init__(self, conn):
vmmGObjectUI.__init__(self, "storagebrowse.ui", "vmm-storage-browse")
self.conn = conn
self._first_run = False
self._finish_cb = None
-
- # Passed to browse_local
self._browse_reason = None
self.storagelist = vmmHostStorage(self.conn, self.builder, self.topwin,
@@ -103,15 +145,10 @@ class vmmStorageBrowser(vmmGObjectUI):
def set_browse_reason(self, reason):
self._browse_reason = reason
- data = self.config.browse_reason_data.get(self._browse_reason, {})
- allow_create = True
- title = _("Choose Storage Volume")
- if data:
- allow_create = data["enable_create"]
- title = data["storage_title"]
+ data = _BrowseReasonMetadata(self._browse_reason)
- self.topwin.set_title(title)
- self.storagelist.widget("vol-add").set_sensitive(allow_create)
+ self.topwin.set_title(data.storage_title)
+ self.storagelist.widget("vol-add").set_sensitive(data.enable_create)
#############
@@ -128,7 +165,7 @@ class vmmStorageBrowser(vmmGObjectUI):
self._finish(volume.get_target_path())
def _vol_sensitive_cb(self, fmt):
- if ((self._browse_reason == self.config.CONFIG_DIR_FS) and
+ if ((self._browse_reason == vmmStorageBrowser.REASON_FS) and
fmt != 'dir'):
return False
return True
@@ -139,22 +176,27 @@ class vmmStorageBrowser(vmmGObjectUI):
####################
def _browse_local(self):
- dialog_type = None
- dialog_name = None
- choose_button = None
-
- data = self.config.browse_reason_data.get(self._browse_reason)
- if data:
- dialog_name = data["local_title"] or None
- dialog_type = data.get("dialog_type")
- choose_button = data.get("choose_button")
-
- filename = self.err.browse_local(self.conn,
- dialog_type=dialog_type, browse_reason=self._browse_reason,
- dialog_name=dialog_name, choose_button=choose_button)
- if filename:
- log.debug("Browse local chose path=%s", filename)
- self._finish(filename)
+ data = _BrowseReasonMetadata(self._browse_reason)
+ gsettings_key = data.gsettings_key
+
+ if gsettings_key:
+ start_folder = self.config.get_default_directory(gsettings_key)
+
+ filename = self.err.browse_local(
+ dialog_type=data.dialog_type,
+ dialog_name=data.local_title,
+ start_folder=start_folder)
+
+ if not filename:
+ return
+
+ log.debug("Browse local chose path=%s", filename)
+
+ if gsettings_key:
+ self.config.set_default_directory(
+ gsettings_key, os.path.dirname(filename))
+
+ self._finish(filename)
def _finish(self, path):
if self._finish_cb:
diff --git a/virtManager/vmwindow.py b/virtManager/vmwindow.py
index 3ac4a6a4..d5549454 100644
--- a/virtManager/vmwindow.py
+++ b/virtManager/vmwindow.py
@@ -548,24 +548,31 @@ class vmmVMWindow(vmmGObjectUI):
ret = ret.buffer # pragma: no cover
import datetime
+ import os
now = str(datetime.datetime.now()).split(".")[0].replace(" ", "_")
default = "Screenshot_%s_%s.png" % (self.vm.get_name(), now)
- path = self.err.browse_local(
- self.vm.conn, _("Save Virtual Machine Screenshot"),
+ start_folder = self.config.get_default_directory("screenshot")
+
+ filename = self.err.browse_local(
+ _("Save Virtual Machine Screenshot"),
_type=("png", _("PNG files")),
dialog_type=Gtk.FileChooserAction.SAVE,
- browse_reason=self.config.CONFIG_DIR_SCREENSHOT,
- default_name=default)
- if not path: # pragma: no cover
+ choose_button=Gtk.STOCK_SAVE,
+ start_folder=start_folder,
+ default_name=default,
+ confirm_overwrite=True)
+ if not filename: # pragma: no cover
log.debug("No screenshot path given, skipping save.")
return
- filename = path
if not filename.endswith(".png"):
filename += ".png" # pragma: no cover
open(filename, "wb").write(ret)
+ self.config.set_default_directory(
+ "screenshot", os.path.dirname(filename))
+
########################
# Details page refresh #

View File

@ -1,51 +0,0 @@
Subject: guest: Query availability of usb redirdevs in domcaps
From: Lin Ma lma@suse.com Thu Nov 10 15:57:08 2022 +0800
Date: Wed Dec 14 12:44:54 2022 -0500:
Git: 8cc6ee8da36d518ec928c072822bbee6ebe2e362
Signed-off-by: Lin Ma <lma@suse.com>
diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py
index 1b5b6bf6..91f51f9f 100644
--- a/virtinst/domcapabilities.py
+++ b/virtinst/domcapabilities.py
@@ -113,6 +113,7 @@ class _Devices(_CapsBlock):
graphics = XMLChildProperty(_make_capsblock("graphics"), is_single=True)
tpm = XMLChildProperty(_make_capsblock("tpm"), is_single=True)
filesystem = XMLChildProperty(_make_capsblock("filesystem"), is_single=True)
+ redirdev = XMLChildProperty(_make_capsblock("redirdev"), is_single=True)
class _Features(_CapsBlock):
@@ -448,6 +449,18 @@ class DomainCapabilities(XMLBuilder):
return self.devices.graphics.get_enum("type").has_value("spice")
+ def supports_redirdev_usb(self):
+ """
+ Return False if libvirt explicitly advertises no support for
+ USB redirect
+ """
+ if self.devices.redirdev.supported is None:
+ # Follow the original behavior in case of talking to older
+ # libvirt.
+ return True
+
+ return self.devices.redirdev.get_enum("bus").has_value("usb")
+
def supports_filesystem_virtiofs(self):
"""
Return True if libvirt advertises support for virtiofs
diff --git a/virtinst/guest.py b/virtinst/guest.py
index e6636022..1d1e2ee9 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -1155,6 +1155,8 @@ class Guest(XMLBuilder):
self.add_device(dev)
def _add_spice_usbredir(self):
+ if not self.lookup_domcaps().supports_redirdev_usb():
+ return
if self.skip_default_usbredir:
return
if self.devices.redirdev:

View File

@ -1,51 +0,0 @@
Subject: guest: Query availability of spicevmc channels in domcaps
From: Lin Ma lma@suse.com Thu Nov 10 15:57:24 2022 +0800
Date: Wed Dec 14 12:44:54 2022 -0500:
Git: 180154d752a33f6b26643184e6aa19dcb110e0eb
Signed-off-by: Lin Ma <lma@suse.com>
diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py
index 91f51f9f..db08bf65 100644
--- a/virtinst/domcapabilities.py
+++ b/virtinst/domcapabilities.py
@@ -114,6 +114,7 @@ class _Devices(_CapsBlock):
tpm = XMLChildProperty(_make_capsblock("tpm"), is_single=True)
filesystem = XMLChildProperty(_make_capsblock("filesystem"), is_single=True)
redirdev = XMLChildProperty(_make_capsblock("redirdev"), is_single=True)
+ channel = XMLChildProperty(_make_capsblock("channel"), is_single=True)
class _Features(_CapsBlock):
@@ -449,6 +450,18 @@ class DomainCapabilities(XMLBuilder):
return self.devices.graphics.get_enum("type").has_value("spice")
+ def supports_channel_spicevmc(self):
+ """
+ Return False if libvirt explicitly advertises no support for
+ spice channel
+ """
+ if self.devices.channel.supported is None:
+ # Follow the original behavior in case of talking to older
+ # libvirt.
+ return True
+
+ return self.devices.channel.get_enum("type").has_value("spicevmc")
+
def supports_redirdev_usb(self):
"""
Return False if libvirt explicitly advertises no support for
diff --git a/virtinst/guest.py b/virtinst/guest.py
index 1d1e2ee9..c2244ae3 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -1127,6 +1127,8 @@ class Guest(XMLBuilder):
self.add_device(ctrl)
def _add_spice_channels(self):
+ if not self.lookup_domcaps().supports_channel_spicevmc():
+ return
if self.skip_default_channel:
return
for chn in self.devices.channel:

View File

@ -1,20 +0,0 @@
Subject: tests: Add domcaps coverage for usb-redir/spicevmc channel checks
From: Lin Ma lma@suse.com Thu Nov 10 15:57:43 2022 +0800
Date: Wed Dec 14 12:44:54 2022 -0500:
Git: c313209455b2c5fd34560f469af4737a6c8e6fdb
Signed-off-by: Lin Ma <lma@suse.com>
diff --git a/tests/test_capabilities.py b/tests/test_capabilities.py
index d102e51b..70c9de6f 100644
--- a/tests/test_capabilities.py
+++ b/tests/test_capabilities.py
@@ -92,6 +92,8 @@ def testDomainCapabilitiesx86():
assert caps.supports_filesystem_virtiofs()
assert caps.supports_memorybacking_memfd()
+ assert caps.supports_redirdev_usb()
+ assert caps.supports_channel_spicevmc()
xml = open(DATADIR + "/kvm-x86_64-domcaps-amd-sev.xml").read()
caps = DomainCapabilities(utils.URIs.open_testdriver_cached(), xml)

View File

@ -1,264 +0,0 @@
Subject: tests: Update to latest kvm domcaps
From: Cole Robinson crobinso@redhat.com Wed Dec 14 12:44:13 2022 -0500
Date: Wed Dec 14 12:45:05 2022 -0500:
Git: b5d6dfaa0dab6c65b3ae4264e62302f2d93a69d4
And add some test coverage exclusions, needed for previous patches
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/data/capabilities/kvm-x86_64-domcaps-latest.xml b/tests/data/capabilities/kvm-x86_64-domcaps-latest.xml
index ee586e1a..ebcc9ec4 100644
--- a/tests/data/capabilities/kvm-x86_64-domcaps-latest.xml
+++ b/tests/data/capabilities/kvm-x86_64-domcaps-latest.xml
@@ -1,7 +1,7 @@
<domainCapabilities>
<path>/usr/bin/qemu-system-x86_64</path>
<domain>kvm</domain>
- <machine>pc-q35-6.1</machine>
+ <machine>pc-q35-7.0</machine>
<arch>x86_64</arch>
<vcpu max='288'/>
<iothreads supported='yes'/>
@@ -12,6 +12,8 @@
<loader supported='yes'>
<value>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</value>
<value>/usr/share/edk2/ovmf/OVMF_CODE.fd</value>
+ <value>/usr/share/edk2/ovmf/OVMF.amdsev.fd</value>
+ <value>/usr/share/edk2/ovmf/OVMF.inteltdx.fd</value>
<enum name='type'>
<value>rom</value>
<value>pflash</value>
@@ -40,91 +42,91 @@
</enum>
</mode>
<mode name='host-model' supported='yes'>
- <model fallback='forbid'>Cooperlake</model>
+ <model fallback='forbid'>Skylake-Client-IBRS</model>
<vendor>Intel</vendor>
<feature policy='require' name='ss'/>
<feature policy='require' name='vmx'/>
<feature policy='require' name='pdcm'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='tsc_adjust'/>
- <feature policy='require' name='mpx'/>
+ <feature policy='require' name='clflushopt'/>
<feature policy='require' name='umip'/>
+ <feature policy='require' name='pku'/>
<feature policy='require' name='md-clear'/>
+ <feature policy='require' name='stibp'/>
+ <feature policy='require' name='arch-capabilities'/>
+ <feature policy='require' name='ssbd'/>
<feature policy='require' name='xsaves'/>
+ <feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='invtsc'/>
<feature policy='require' name='ibpb'/>
<feature policy='require' name='ibrs'/>
<feature policy='require' name='amd-stibp'/>
<feature policy='require' name='amd-ssbd'/>
+ <feature policy='require' name='rdctl-no'/>
+ <feature policy='require' name='ibrs-all'/>
+ <feature policy='require' name='skip-l1dfl-vmentry'/>
+ <feature policy='require' name='mds-no'/>
+ <feature policy='require' name='pschange-mc-no'/>
<feature policy='disable' name='hle'/>
<feature policy='disable' name='rtm'/>
- <feature policy='disable' name='avx512f'/>
- <feature policy='disable' name='avx512dq'/>
- <feature policy='disable' name='clwb'/>
- <feature policy='disable' name='avx512cd'/>
- <feature policy='disable' name='avx512bw'/>
- <feature policy='disable' name='avx512vl'/>
- <feature policy='disable' name='avx512vnni'/>
- <feature policy='disable' name='avx-vnni'/>
- <feature policy='disable' name='avx512-bf16'/>
- <feature policy='disable' name='taa-no'/>
</mode>
<mode name='custom' supported='yes'>
- <model usable='yes'>qemu64</model>
- <model usable='yes'>qemu32</model>
- <model usable='no'>phenom</model>
- <model usable='yes'>pentium3</model>
- <model usable='yes'>pentium2</model>
- <model usable='yes'>pentium</model>
- <model usable='yes'>n270</model>
- <model usable='yes'>kvm64</model>
- <model usable='yes'>kvm32</model>
- <model usable='yes'>coreduo</model>
- <model usable='yes'>core2duo</model>
- <model usable='no'>athlon</model>
- <model usable='yes'>Westmere-IBRS</model>
- <model usable='yes'>Westmere</model>
- <model usable='no'>Snowridge</model>
- <model usable='no'>Skylake-Server-noTSX-IBRS</model>
- <model usable='no'>Skylake-Server-IBRS</model>
- <model usable='no'>Skylake-Server</model>
- <model usable='yes'>Skylake-Client-noTSX-IBRS</model>
- <model usable='no'>Skylake-Client-IBRS</model>
- <model usable='no'>Skylake-Client</model>
- <model usable='yes'>SandyBridge-IBRS</model>
- <model usable='yes'>SandyBridge</model>
- <model usable='yes'>Penryn</model>
- <model usable='no'>Opteron_G5</model>
- <model usable='no'>Opteron_G4</model>
- <model usable='no'>Opteron_G3</model>
- <model usable='yes'>Opteron_G2</model>
- <model usable='yes'>Opteron_G1</model>
- <model usable='yes'>Nehalem-IBRS</model>
- <model usable='yes'>Nehalem</model>
- <model usable='yes'>IvyBridge-IBRS</model>
- <model usable='yes'>IvyBridge</model>
- <model usable='no'>Icelake-Server-noTSX</model>
- <model usable='no'>Icelake-Server</model>
- <model usable='no' deprecated='yes'>Icelake-Client-noTSX</model>
- <model usable='no' deprecated='yes'>Icelake-Client</model>
- <model usable='yes'>Haswell-noTSX-IBRS</model>
- <model usable='yes'>Haswell-noTSX</model>
- <model usable='no'>Haswell-IBRS</model>
- <model usable='no'>Haswell</model>
- <model usable='no'>EPYC-Rome</model>
- <model usable='no'>EPYC-Milan</model>
- <model usable='no'>EPYC-IBPB</model>
- <model usable='no'>EPYC</model>
- <model usable='no'>Dhyana</model>
- <model usable='no'>Cooperlake</model>
- <model usable='yes'>Conroe</model>
- <model usable='no'>Cascadelake-Server-noTSX</model>
- <model usable='no'>Cascadelake-Server</model>
- <model usable='yes'>Broadwell-noTSX-IBRS</model>
- <model usable='yes'>Broadwell-noTSX</model>
- <model usable='no'>Broadwell-IBRS</model>
- <model usable='no'>Broadwell</model>
- <model usable='yes'>486</model>
+ <model usable='yes' vendor='unknown'>qemu64</model>
+ <model usable='yes' vendor='unknown'>qemu32</model>
+ <model usable='no' vendor='AMD'>phenom</model>
+ <model usable='yes' vendor='unknown'>pentium3</model>
+ <model usable='yes' vendor='unknown'>pentium2</model>
+ <model usable='yes' vendor='unknown'>pentium</model>
+ <model usable='yes' vendor='Intel'>n270</model>
+ <model usable='yes' vendor='unknown'>kvm64</model>
+ <model usable='yes' vendor='unknown'>kvm32</model>
+ <model usable='yes' vendor='Intel'>coreduo</model>
+ <model usable='yes' vendor='Intel'>core2duo</model>
+ <model usable='no' vendor='AMD'>athlon</model>
+ <model usable='yes' vendor='Intel'>Westmere-IBRS</model>
+ <model usable='yes' vendor='Intel'>Westmere</model>
+ <model usable='no' vendor='Intel'>Snowridge</model>
+ <model usable='no' vendor='Intel'>Skylake-Server-noTSX-IBRS</model>
+ <model usable='no' vendor='Intel'>Skylake-Server-IBRS</model>
+ <model usable='no' vendor='Intel'>Skylake-Server</model>
+ <model usable='yes' vendor='Intel'>Skylake-Client-noTSX-IBRS</model>
+ <model usable='no' vendor='Intel'>Skylake-Client-IBRS</model>
+ <model usable='no' vendor='Intel'>Skylake-Client</model>
+ <model usable='yes' vendor='Intel'>SandyBridge-IBRS</model>
+ <model usable='yes' vendor='Intel'>SandyBridge</model>
+ <model usable='yes' vendor='Intel'>Penryn</model>
+ <model usable='no' vendor='AMD'>Opteron_G5</model>
+ <model usable='no' vendor='AMD'>Opteron_G4</model>
+ <model usable='no' vendor='AMD'>Opteron_G3</model>
+ <model usable='yes' vendor='AMD'>Opteron_G2</model>
+ <model usable='yes' vendor='AMD'>Opteron_G1</model>
+ <model usable='yes' vendor='Intel'>Nehalem-IBRS</model>
+ <model usable='yes' vendor='Intel'>Nehalem</model>
+ <model usable='yes' vendor='Intel'>IvyBridge-IBRS</model>
+ <model usable='yes' vendor='Intel'>IvyBridge</model>
+ <model usable='no' vendor='Intel'>Icelake-Server-noTSX</model>
+ <model usable='no' vendor='Intel'>Icelake-Server</model>
+ <model usable='no' deprecated='yes' vendor='Intel'>Icelake-Client-noTSX</model>
+ <model usable='no' deprecated='yes' vendor='Intel'>Icelake-Client</model>
+ <model usable='yes' vendor='Intel'>Haswell-noTSX-IBRS</model>
+ <model usable='yes' vendor='Intel'>Haswell-noTSX</model>
+ <model usable='no' vendor='Intel'>Haswell-IBRS</model>
+ <model usable='no' vendor='Intel'>Haswell</model>
+ <model usable='no' vendor='AMD'>EPYC-Rome</model>
+ <model usable='no' vendor='AMD'>EPYC-Milan</model>
+ <model usable='no' vendor='AMD'>EPYC-IBPB</model>
+ <model usable='no' vendor='AMD'>EPYC</model>
+ <model usable='no' vendor='Hygon'>Dhyana</model>
+ <model usable='no' vendor='Intel'>Cooperlake</model>
+ <model usable='yes' vendor='Intel'>Conroe</model>
+ <model usable='no' vendor='Intel'>Cascadelake-Server-noTSX</model>
+ <model usable='no' vendor='Intel'>Cascadelake-Server</model>
+ <model usable='yes' vendor='Intel'>Broadwell-noTSX-IBRS</model>
+ <model usable='yes' vendor='Intel'>Broadwell-noTSX</model>
+ <model usable='no' vendor='Intel'>Broadwell-IBRS</model>
+ <model usable='no' vendor='Intel'>Broadwell</model>
+ <model usable='yes' vendor='unknown'>486</model>
</mode>
</cpu>
<memoryBacking supported='yes'>
@@ -161,6 +163,7 @@
<value>vnc</value>
<value>spice</value>
<value>egl-headless</value>
+ <value>dbus</value>
</enum>
</graphics>
<video supported='yes'>
@@ -191,10 +194,7 @@
<value>scsi</value>
</enum>
<enum name='capsType'/>
- <enum name='pciBackend'>
- <value>default</value>
- <value>vfio</value>
- </enum>
+ <enum name='pciBackend'/>
</hostdev>
<rng supported='yes'>
<enum name='model'>
@@ -224,7 +224,23 @@
<value>passthrough</value>
<value>emulator</value>
</enum>
+ <enum name='backendVersion'>
+ <value>1.2</value>
+ <value>2.0</value>
+ </enum>
</tpm>
+ <redirdev supported='yes'>
+ <enum name='bus'>
+ <value>usb</value>
+ </enum>
+ </redirdev>
+ <channel supported='yes'>
+ <enum name='type'>
+ <value>pty</value>
+ <value>unix</value>
+ <value>spicevmc</value>
+ </enum>
+ </channel>
</devices>
<features>
<gic supported='no'/>
@@ -233,6 +249,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<sev supported='no'/>
+ <sgx supported='no'/>
</features>
</domainCapabilities>
diff --git a/virtinst/guest.py b/virtinst/guest.py
index c2244ae3..123abfb2 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -1128,7 +1128,7 @@ class Guest(XMLBuilder):
def _add_spice_channels(self):
if not self.lookup_domcaps().supports_channel_spicevmc():
- return
+ return # pragma: no cover
if self.skip_default_channel:
return
for chn in self.devices.channel:
@@ -1158,7 +1158,7 @@ class Guest(XMLBuilder):
def _add_spice_usbredir(self):
if not self.lookup_domcaps().supports_redirdev_usb():
- return
+ return # pragma: no cover
if self.skip_default_usbredir:
return
if self.devices.redirdev:

View File

@ -1,109 +0,0 @@
Subject: progress: Fix showing correct final total
From: Cole Robinson crobinso@redhat.com Wed Dec 14 12:57:10 2022 -0500
Date: Wed Dec 14 13:01:48 2022 -0500:
Git: 4114fa1aa827b836d3a1d11c2ac2d367c9bb0463
Reproducer:
Reproducer:
./virt-install --connect test:///default \
--location tests/data/fakemedia/fake-f26-netinst.iso
Before:
Starting install...
Retrieving 'vmlinuz' | 0 B 00:00:00 ...
Retrieving 'initrd.img' | 0 B 00:00:00 ...
After:
Starting install...
Retrieving 'vmlinuz' | 9 B 00:00:00 ...
Retrieving 'initrd.img' | 9 B 00:00:00 ...
progress.end() currently only reports the total amount of bytes
that were last written to the UI. It should report the total amount
that's been passed to update().
Reported-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/data/meter/meter1.txt b/tests/data/meter/meter1.txt
index a3f7c7d2..7e154c97 100644
--- a/tests/data/meter/meter1.txt
+++ b/tests/data/meter/meter1.txt
@@ -9,4 +9,4 @@ Meter text test 20% [=== ] 413 B/s | 2.0 kB 00:19 ETA
Meter text test 40% [======- ] 731 B/s | 3.9 kB 00:08 ETA
-Meter text test | 3.9 kB 00:04 ...
+Meter text test | 4.4 kB 00:04 ...
diff --git a/tests/data/meter/meter2.txt b/tests/data/meter/meter2.txt
index 93e93dc3..7ccc3163 100644
--- a/tests/data/meter/meter2.txt
+++ b/tests/data/meter/meter2.txt
@@ -9,4 +9,4 @@ Meter text test 20% [=======
Meter text test 40% [============== ] 731 B/s | 3.9 kB 00:00:08 ETA
-Meter text test | 3.9 kB 00:00:04 ...
+Meter text test | 4.4 kB 00:00:04 ...
diff --git a/tests/data/meter/meter3.txt b/tests/data/meter/meter3.txt
index 474e40f7..6f66608f 100644
--- a/tests/data/meter/meter3.txt
+++ b/tests/data/meter/meter3.txt
@@ -4,4 +4,4 @@ Meter text test 67 B/s | 200 B 00:02
Meter text test 413 B/s | 2.0 kB 00:03
Meter text test 731 B/s | 3.9 kB 00:04
-Meter text test | 3.9 kB 00:04
+Meter text test | 4.4 kB 00:04
diff --git a/tests/data/meter/meter5.txt b/tests/data/meter/meter5.txt
index 1d232a5d..7142a971 100644
--- a/tests/data/meter/meter5.txt
+++ b/tests/data/meter/meter5.txt
@@ -9,4 +9,4 @@ Meter text test 1000% [================] 413 B/s | 2.0 kB --:-- ETA
Meter text test 2000% [================] 731 B/s | 3.9 kB --:-- ETA
-Meter text test | 3.9 kB 00:04 !!!
+Meter text test | 4.4 kB 00:04 !!!
diff --git a/tests/data/meter/meter6.txt b/tests/data/meter/meter6.txt
index 07d99bfd..dd5d3d47 100644
--- a/tests/data/meter/meter6.txt
+++ b/tests/data/meter/meter6.txt
@@ -9,4 +9,4 @@ Meter text test 100% [================] 413 B/s | 2.0 kB --:-- ETA
Meter text test 100% [================] 731 B/s | 3.9 kB --:-- ETA
-Meter text test | 3.9 kB 00:04
+Meter text test | 4.4 kB 00:04
diff --git a/tests/test_misc.py b/tests/test_misc.py
index aa610f4d..20f5a626 100644
--- a/tests/test_misc.py
+++ b/tests/test_misc.py
@@ -178,7 +178,9 @@ def test_misc_meter():
m.update(2000)
with unittest.mock.patch("time.time", return_value=5.0):
m.update(4000)
- with unittest.mock.patch("time.time", return_value=6.0):
+ with unittest.mock.patch("time.time", return_value=5.1):
+ m.update(4500)
+ with unittest.mock.patch("time.time", return_value=5.5):
m.end()
# Basic output testing
diff --git a/virtinst/_progresspriv.py b/virtinst/_progresspriv.py
index 5a31a18c..a035c9c4 100644
--- a/virtinst/_progresspriv.py
+++ b/virtinst/_progresspriv.py
@@ -112,10 +112,10 @@ class BaseMeter:
assert type(amount_read) is int
now = time.time()
+ self.last_amount_read = amount_read
+ self.re.update(amount_read, now)
if (not self.last_update_time or
(now >= self.last_update_time + self.update_period)):
- self.re.update(amount_read, now)
- self.last_amount_read = amount_read
self.last_update_time = now
self._do_update(amount_read)

View File

@ -1,27 +0,0 @@
Subject: virtinstall: Fix the allocating disk size printed by the progress bar
From: Toshiki Sonoda sonoda.toshiki@fujitsu.com Wed Nov 9 18:33:56 2022 +0900
Date: Wed Dec 14 13:07:26 2022 -0500:
Git: 39c7a443146433766e4e71e48ab59145c74924b3
When a sparse file is created during a disk allocation,
virt-install prints not the created disk size but a sparse file size.
Therefore, we fix to print the created disk size during disk allocation
instead of the size of the sparse file by updating the meter with the
self.capacity.
Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
Signed-off-by: Haruka Ohata <ohata.haruka@fujitsu.com>
diff --git a/virtinst/storage.py b/virtinst/storage.py
index 3c5d39bb..f9a9f7a7 100644
--- a/virtinst/storage.py
+++ b/virtinst/storage.py
@@ -695,6 +695,7 @@ class StorageVolume(_StorageObject):
log.debug("Using vol create flags=%s", createflags)
vol = self.pool.createXML(xml, createflags)
+ meter.update(self.capacity)
meter.end()
log.debug("Storage volume '%s' install complete.", self.name)
return vol

View File

@ -1,72 +0,0 @@
Subject: virtinstall: Hide total_size in the progress bar if it doesn't need
From: Toshiki Sonoda sonoda.toshiki@fujitsu.com Wed Nov 9 18:33:57 2022 +0900
Date: Wed Dec 14 13:18:36 2022 -0500:
Git: 6ec00474a659158f20248d6af3771d1a12ddac7b
virt-install prints the total_size value to the progress bar even if it
is meaningless.
This value can be confusing to user, so for execute prosess that doesn't
copy files (total_size = 0B), we hide the total_size value.
For example, 'Creating domain...' doesn't need to print the total_size
value.
Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
Signed-off-by: Haruka Ohata <ohata.haruka@fujitsu.com>
diff --git a/tests/data/meter/meter-zero.txt b/tests/data/meter/meter-zero.txt
new file mode 100644
index 00000000..fc81f21f
--- /dev/null
+++ b/tests/data/meter/meter-zero.txt
@@ -0,0 +1,4 @@
+
+Meter text test 100% [================] 0 B/s | 0 B --:-- ETA
+
+Meter text test | 00:02
diff --git a/tests/test_misc.py b/tests/test_misc.py
index 20f5a626..2cabc338 100644
--- a/tests/test_misc.py
+++ b/tests/test_misc.py
@@ -224,6 +224,20 @@ def test_misc_meter():
out = meter.output.getvalue().replace("\r", "\n")
utils.diff_compare(out, os.path.join(utils.DATADIR, "meter", "meter6.txt"))
+ def _test_meter_zero(m, startval=0, text="Meter text test"):
+ with unittest.mock.patch("time.time", return_value=1.0):
+ m.start(text, startval)
+ with unittest.mock.patch("time.time", return_value=3.0):
+ m.update(0)
+ with unittest.mock.patch("time.time", return_value=3.1):
+ m.end()
+
+ # meter with size 0 and startval size 0
+ meter = _progresspriv.TextMeter(output=io.StringIO())
+ _test_meter_zero(meter, 0)
+ out = meter.output.getvalue().replace("\r", "\n")
+ utils.diff_compare(out, os.path.join(utils.DATADIR, "meter", "meter-zero.txt"))
+
# BaseMeter coverage
meter = _progresspriv.BaseMeter()
_test_meter_values(meter)
diff --git a/virtinst/_progresspriv.py b/virtinst/_progresspriv.py
index a035c9c4..207c6479 100644
--- a/virtinst/_progresspriv.py
+++ b/virtinst/_progresspriv.py
@@ -247,11 +247,15 @@ class TextMeter(BaseMeter):
tl = TerminalLine(8)
# For big screens, make it more readable.
use_hours = bool(tl.llen > 80)
- ui_size = tl.add(' | %5sB' % total_size)
ui_time = tl.add(' %s' % format_time(self.re.elapsed_time(),
use_hours))
ui_end, not_done = _term_add_end(tl, self.size, amount_read)
- dummy = not_done
+ if not not_done and amount_read == 0:
+ # Doesn't need to print total_size
+ ui_size = tl.add(' | %5s ' % ' ')
+ else:
+ ui_size = tl.add(' | %5sB' % total_size)
+
out = '\r%-*.*s%s%s%s\n' % (tl.rest(), tl.rest(), self.text,
ui_size, ui_time, ui_end)
self.output.write(out)

View File

@ -1,24 +0,0 @@
Subject: asyncjob: Fix backtrace when no cursor theme installed
From: Cole Robinson crobinso@redhat.com Thu Jan 19 11:13:56 2023 -0500
Date: Thu Jan 19 11:40:37 2023 -0500:
Git: cc4a39ea94f42bc92765eb3bb56e2b7f9198be67
Fixes: https://github.com/virt-manager/virt-manager/issues/479
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtManager/asyncjob.py b/virtManager/asyncjob.py
index 32d9c0a1..46692ace 100644
--- a/virtManager/asyncjob.py
+++ b/virtManager/asyncjob.py
@@ -265,9 +265,7 @@ class vmmAsyncJob(vmmGObjectUI):
self.topwin.present()
if not self.cancel_cb and self.show_progress:
- gdk_window = self.topwin.get_window()
- gdk_window.set_cursor(
- Gdk.Cursor.new_from_name(gdk_window.get_display(), "progress"))
+ self._set_cursor("progress")
self._bg_thread.start()

View File

@ -1,19 +0,0 @@
Subject: asyncjob: Remove unused import
From: Cole Robinson crobinso@redhat.com Thu Jan 19 11:59:20 2023 -0500
Date: Thu Jan 19 11:59:20 2023 -0500:
Git: fe86f4639f6e055f1e107fed9e0eb8be3fb2a66f
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtManager/asyncjob.py b/virtManager/asyncjob.py
index 46692ace..958320b2 100644
--- a/virtManager/asyncjob.py
+++ b/virtManager/asyncjob.py
@@ -7,7 +7,6 @@
import threading
import traceback
-from gi.repository import Gdk
from gi.repository import GLib
import libvirt

View File

@ -1,36 +0,0 @@
Subject: Packit: initial enablement
From: Lokesh Mandvekar lsm5@fedoraproject.org Mon Dec 5 17:14:30 2022 +0530
Date: Thu Jan 19 14:04:42 2023 -0500:
Git: a63b40aae3835a8b82b23755f1ed45e526af80f9
This commit enables Packit `copr_build` tasks which will run on every PR
and build RPMS using the spec file present upstream with Source0 as
the archive created from HEAD commit of the PR.
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
diff --git a/.packit.yaml b/.packit.yaml
new file mode 100644
index 00000000..15798fe9
--- /dev/null
+++ b/.packit.yaml
@@ -0,0 +1,19 @@
+# See the documentation for more information:
+# https://packit.dev/docs/configuration/
+
+upstream_package_name: virt-manager
+downstream_package_name: virt-manager
+
+specfile_path: virt-manager.spec
+
+jobs:
+ - job: copr_build
+ # Run on every PR
+ trigger: pull_request
+ # Defaults to x86_64 unless architecture is explicitly specified
+ targets:
+ - fedora-rawhide-aarch64
+ - fedora-rawhide-i386
+ - fedora-rawhide-ppc64le
+ - fedora-rawhide-s390x
+ - fedora-rawhide-x86_64

View File

@ -1,31 +0,0 @@
Subject: virt-install: Recommend '--boot uefi'
From: Andrea Bolognani abologna@redhat.com Mon Dec 12 19:32:32 2022 +0100
Date: Thu Feb 9 11:41:00 2023 -0500:
Git: f2b5aaf458764ec7ecf105038e5f2f7cc26b6c17
Firmware autoselection is the way to go in most cases, so
recommend that instead of telling users that they should provide
all information manually.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
diff --git a/man/virt-install.rst b/man/virt-install.rst
index 3a6e8dcd..684f2265 100644
--- a/man/virt-install.rst
+++ b/man/virt-install.rst
@@ -955,13 +955,13 @@ Some examples:
Configure the VM to boot from UEFI. In order for virt-install to know the
correct UEFI parameters, libvirt needs to be advertising known UEFI binaries
via domcapabilities XML, so this will likely only work if using properly
- configured distro packages.
+ configured distro packages. This is the recommended UEFI setup.
``--boot loader=/.../OVMF_CODE.fd,loader.readonly=yes,loader.type=pflash,nvram.template=/.../OVMF_VARS.fd,loader_secure=no``
Specify that the virtual machine use the custom OVMF binary as boot firmware,
mapped as a virtual flash chip. In addition, request that libvirt instantiate
the VM-specific UEFI varstore from the custom "/.../OVMF_VARS.fd" varstore
- template. This is the recommended UEFI setup, and should be used if
+ template. This setup is not recommended, and should only be used if
--boot uefi doesn't know about your UEFI binaries. If your UEFI firmware
supports Secure boot feature you can enable it via loader_secure.

View File

@ -1,51 +0,0 @@
Subject: virt-install: Document Secure Boot setups
From: Andrea Bolognani abologna@redhat.com Mon Dec 12 19:38:22 2022 +0100
Date: Thu Feb 9 11:41:00 2023 -0500:
Git: 33ff193ee9fcfdb74f95d946a1b93239a1a12a61
Provide ready to use recipes for explicitly enabling and
explicitly disabling Secure Boot, as well as a pointer to
the more extensive information found on the libvirt website.
Setting loader_secure=yes is only one part of a proper Secure
Boot setup, so stop documenting it in the section about manual
firmware selection to avoid confusion.
https://bugzilla.redhat.com/show_bug.cgi?id=2112154
https://bugzilla.redhat.com/show_bug.cgi?id=2149971
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
diff --git a/man/virt-install.rst b/man/virt-install.rst
index 684f2265..a0df7328 100644
--- a/man/virt-install.rst
+++ b/man/virt-install.rst
@@ -957,13 +957,26 @@ Some examples:
via domcapabilities XML, so this will likely only work if using properly
configured distro packages. This is the recommended UEFI setup.
+``--boot uefi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=yes,firmware.feature1.name=enrolled-keys,firmware.feature1.enabled=yes``
+ Configure the VM to boot from UEFI with Secure Boot support enabled.
+ Only signed operating systems will be able to boot with this configuration.
+
+``--boot uefi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no``
+ Configure the VM to boot from UEFI with Secure Boot support disabled.
+ This configuration allows both signed and unsigned operating systems to
+ run.
+
+ Additional information about the ``secure-boot`` and
+ ``enrolled-keys`` firmware features and how they can be used to
+ influence firmware selection is available at
+ https://libvirt.org/kbase/secureboot.html
+
``--boot loader=/.../OVMF_CODE.fd,loader.readonly=yes,loader.type=pflash,nvram.template=/.../OVMF_VARS.fd,loader_secure=no``
Specify that the virtual machine use the custom OVMF binary as boot firmware,
mapped as a virtual flash chip. In addition, request that libvirt instantiate
the VM-specific UEFI varstore from the custom "/.../OVMF_VARS.fd" varstore
template. This setup is not recommended, and should only be used if
- --boot uefi doesn't know about your UEFI binaries. If your UEFI firmware
- supports Secure boot feature you can enable it via loader_secure.
+ --boot uefi doesn't know about your UEFI binaries.
Use --boot=? to see a list of all available sub options.
Complete details at https://libvirt.org/formatdomain.html#elementsOS

View File

@ -1,97 +0,0 @@
Subject: cloner: clone serial files
From: Oleg Vasilev oleg.vasilev@virtuozzo.com Wed Nov 30 22:01:08 2022 +0600
Date: Wed Mar 22 17:44:06 2023 -0400:
Git: b2f6e953831aba9ab7cc4b8673c237c3bb434100
Before this, on clone the serial file would remain the same for the cloned
domain. This doesn't make much sense as the output would be an intermix of two
unrelated output sequences.
Here we apply the the same filename changing algorithm, as with disk files.
Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
diff --git a/virtinst/cloner.py b/virtinst/cloner.py
index 9334513c..556bfdbb 100644
--- a/virtinst/cloner.py
+++ b/virtinst/cloner.py
@@ -9,6 +9,7 @@
import re
import os
+from itertools import chain
import libvirt
@@ -20,6 +21,7 @@ from .devices import DeviceInterface
from .devices import DeviceDisk
from .logger import log
from .devices import DeviceChannel
+from .devices import DeviceSerial
def _replace_vm(conn, name):
@@ -70,9 +72,9 @@ def _generate_clone_name(conn, basename):
sep="", start_num=start_num, force_num=force_num)
-def _generate_clone_disk_path(conn, origname, newname, origpath):
+def _generate_clone_path(origname, newname, origpath, cb_exists):
"""
- Generate desired cloned disk path name, derived from the
+ Generate desired cloned path for auxiliary files, derived from the
original path, original VM name, and proposed new VM name
"""
if origpath is None:
@@ -99,9 +101,7 @@ def _generate_clone_disk_path(conn, origname, newname, origpath):
clonebase = newname
clonebase = os.path.join(dirname, clonebase)
- def cb(p):
- return DeviceDisk.path_definitely_exists(conn, p)
- return generatename.generate_name(clonebase, cb, suffix=suffix)
+ return generatename.generate_name(clonebase, cb_exists, suffix=suffix)
def _lookup_vm(conn, name):
@@ -287,7 +287,9 @@ class Cloner(object):
@staticmethod
def generate_clone_disk_path(conn, origname, newname, origpath):
- return _generate_clone_disk_path(conn, origname, newname, origpath)
+ def cb_exists(p):
+ return DeviceDisk.path_definitely_exists(conn, p)
+ return _generate_clone_path(origname, newname, origpath, cb_exists)
@staticmethod
def build_clone_disk(orig_disk, clonepath, allow_create, sparse):
@@ -455,6 +457,21 @@ class Cloner(object):
# Functional methods #
######################
+ def _prepare_serial_files(self):
+ for serial in chain(self._new_guest.devices.console,
+ self._new_guest.devices.serial):
+ if serial.type != DeviceSerial.TYPE_FILE:
+ continue
+
+ def cb_exists(path):
+ # Ignore the check for now
+ return False
+
+ serial.source.path = _generate_clone_path(self.src_name,
+ self.new_guest.name,
+ serial.source.path,
+ cb_exists=cb_exists)
+
def _prepare_nvram(self):
if not self._nvram_diskinfo:
return
@@ -534,6 +551,7 @@ class Cloner(object):
xmldisk.set_source_path(new_disk.get_source_path())
self._prepare_nvram()
+ self._prepare_serial_files()
# Save altered clone xml
diff = xmlutil.diff(self._src_guest.get_xml(),

View File

@ -1,114 +0,0 @@
Subject: tests: cli: test serial file clone
From: Oleg Vasilev oleg.vasilev@virtuozzo.com Thu Dec 1 19:52:47 2022 +0600
Date: Wed Mar 22 17:44:06 2023 -0400:
Git: 77695484117b6a931041454865277e898c0fe5f6
Previous commit added serial file clone, now we test it.
Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
--- /dev/null
+++ b/tests/data/cli/compare/virt-clone-serial.xml
@@ -0,0 +1,31 @@
+<domain type="test">
+ <name>__virtinst_cli_test-clone1</name>
+ <uuid>00000000-1111-2222-3333-444444444444</uuid>
+ <memory>8388608</memory>
+ <currentMemory>2097152</currentMemory>
+ <vcpu>2</vcpu>
+ <os>
+ <type arch="i686">hvm</type>
+ <boot dev="hd"/>
+ </os>
+ <clock offset="utc"/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <serial type="file">
+ <source path="/tmp/__virtinst_cli_test-clone1.file">
+ <seclabel model="dac" relabel="no"/>
+ </source>
+ </serial>
+ <serial type="file">
+ <source path="/tmp/__virtinst_cli_other-serial-clone.file"/>
+ </serial>
+ <serial type="unix">
+ <source mode="connect" path="/tmp/__virtinst_cli_socket.sock"/>
+ </serial>
+ <console type="file">
+ <source path="/tmp/__virtinst_cli_serial-exists-clone.file"/>
+ </console>
+ </devices>
+</domain>
--- /dev/null
+++ b/tests/data/cli/virtclone/clone-serial.xml
@@ -0,0 +1,31 @@
+<domain type="test">
+ <name>__virtinst_cli_test-clone</name>
+ <uuid>00000000-1111-2222-3333-444444444444</uuid>
+ <memory>8388608</memory>
+ <currentMemory>2097152</currentMemory>
+ <vcpu>2</vcpu>
+ <os>
+ <type arch="i686">hvm</type>
+ <boot dev="hd"/>
+ </os>
+ <clock offset="utc"/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <serial type="file">
+ <source path="/tmp/__virtinst_cli_test-clone.file">
+ <seclabel model="dac" relabel="no"/>
+ </source>
+ </serial>
+ <serial type="file">
+ <source path="/tmp/__virtinst_cli_other-serial.file"/>
+ </serial>
+ <serial type="unix">
+ <source mode="connect" path="/tmp/__virtinst_cli_socket.sock"/>
+ </serial>
+ <console type="file">
+ <source path="/tmp/__virtinst_cli_serial-exists.file"/>
+ </console>
+ </devices>
+</domain>
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -52,12 +52,18 @@ NEW_FILES = [
TMP_IMAGE_DIR + "new3.img",
TMP_IMAGE_DIR + "exist1-clone.img",
TMP_IMAGE_DIR + "exist2-clone.img",
+
+ TMP_IMAGE_DIR + "test-clone1.file",
+ TMP_IMAGE_DIR + "other-serial-clone.file",
+ TMP_IMAGE_DIR + "serial-exists-clone-1.file",
]
# Images that are expected to exist before a command is run
EXIST_FILES = [
TMP_IMAGE_DIR + "exist1.img",
TMP_IMAGE_DIR + "exist2.img",
+
+ TMP_IMAGE_DIR + "serial-exists-clone.file",
]
@@ -1491,6 +1497,7 @@ _CLONE_NVRAM_MISSING = "--original-xml %
_CLONE_EMPTY = "--original-xml %s/clone-empty.xml" % _CLONEXMLDIR
_CLONE_NET_RBD = "--original-xml %s/clone-net-rbd.xml" % _CLONEXMLDIR
_CLONE_NET_HTTP = "--original-xml %s/clone-net-http.xml" % _CLONEXMLDIR
+_CLONE_SERIAL = "--original-xml %s/clone-serial.xml" % _CLONEXMLDIR
vclon = App("virt-clone")
@@ -1514,6 +1521,7 @@ c.add_compare(_CLONE_EMPTY + " --auto-cl
c.add_compare("--connect %(URI-KVM-X86)s -o test-clone-simple --auto -f /foo.img --print-xml", "pool-test-cross-pool") # cross pool cloning which fails with test driver but let's confirm the XML
c.add_compare(_CLONE_MANAGED + " --auto-clone", "auto-managed") # Auto flag w/ managed storage
c.add_compare(_CLONE_UNMANAGED + " --auto-clone", "auto-unmanaged") # Auto flag w/ local storage
+c.add_compare(_CLONE_SERIAL + " --auto-clone", "serial") # Auto flag w/ serial console
c.add_valid("--connect %(URI-TEST-FULL)s -o test-clone --auto-clone --nonsparse") # Auto flag, actual VM, skip state check
c.add_valid("--connect %(URI-TEST-FULL)s -o test-clone-simple -n newvm --preserve-data --file %(EXISTIMG1)s") # Preserve data shouldn't complain about existing volume
c.add_valid("-n clonetest " + _CLONE_UNMANAGED + " --file %(EXISTIMG3)s --file %(EXISTIMG4)s --check path_exists=off") # Skip existing file check

View File

@ -1,32 +0,0 @@
Subject: man/virt-install: Add a note about different behavior of --boot on s390x
From: Thomas Huth thuth@redhat.com Tue Jan 31 12:35:49 2023 +0100
Date: Wed Mar 22 17:45:31 2023 -0400:
Git: 102fe52165535f9da9c9f370c6d1c399458ed4dc
It is common on x86 and other architectures to install a guest from
network by using "--boot hd,network" with virt-install - as long as
the hard disk is not bootable yet, the installation will be started
via network, and once it finished, the guest can boot from hd during
the next reboot.
However, this does not work on s390x since this architecture only
supports one single boot device to be passed to the guest. Thus add
a note to the documentation to avoid that people are running again
into this common pitfall.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2032472
Signed-off-by: Thomas Huth <thuth@redhat.com>
diff --git a/man/virt-install.rst b/man/virt-install.rst
index a0df7328..8959df7c 100644
--- a/man/virt-install.rst
+++ b/man/virt-install.rst
@@ -929,6 +929,8 @@ Some examples:
``--boot cdrom,fd,hd,network``
Set the boot device priority as first cdrom, first floppy, first harddisk,
network PXE boot.
+ Note: s390x guests only support one boot device, so everything except
+ the first device type will be ignored.
``--boot kernel=KERNEL,initrd=INITRD,kernel_args="console=/dev/ttyS0"``
Have guest permanently boot off a local kernel/initrd pair, with the

View File

@ -1,20 +0,0 @@
Subject: tests: uitests: Fix window reposition on f38
From: Cole Robinson crobinso@redhat.com Fri May 5 14:54:31 2023 -0400
Date: Fri May 5 14:54:31 2023 -0400:
Git: 909c8aa880396fecb3e1fa174bdf89ce5e8b36c8
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/lib/app.py b/tests/uitests/lib/app.py
index 221808d0..83628a7f 100644
--- a/tests/uitests/lib/app.py
+++ b/tests/uitests/lib/app.py
@@ -222,7 +222,7 @@ class VMMDogtailApp(object):
# Give time for the child window to appear and possibly grab focus
self.sleep(1)
self.get_manager(check_active=False)
- dogtail.rawinput.drag(childwin.title_coordinates(), (1000, 1000))
+ dogtail.rawinput.dragWithTrajectory(childwin.title_coordinates(), (1000, 1000))
self.manager_conn_disconnect(conn_label)
utils.check(lambda: not childwin.showing)

View File

@ -1,28 +0,0 @@
Subject: tests: livetests: work around qemu media change regression
From: Cole Robinson crobinso@redhat.com Fri May 5 15:47:25 2023 -0400
Date: Fri May 5 15:47:25 2023 -0400:
Git: 7f83d23f4fd0772acd5eab2145667686770dfd9d
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/test_livetests.py b/tests/uitests/test_livetests.py
index 3ac0133b..72a96a10 100644
--- a/tests/uitests/test_livetests.py
+++ b/tests/uitests/test_livetests.py
@@ -471,9 +471,16 @@ def _testLiveHotplug(app, fname):
lib.utils.check(lambda: tab.showing)
entry.set_text(fname)
appl.click()
+ # F38 CDROM change is broken:
+ # https://gitlab.com/qemu-project/qemu/-/issues/933
+ # pylint: disable=unreachable
+ app.click_alert_button("changes will take effect", "OK")
+ return
+
lib.utils.check(lambda: not appl.sensitive)
lib.utils.check(lambda: entry.text == fname)
entry.click_secondary_icon()
+
appl.click()
lib.utils.check(lambda: not appl.sensitive)
lib.utils.check(lambda: not entry.text)

View File

@ -1,33 +0,0 @@
Subject: tests: uitests: Fix manager window repositioning test
From: Cole Robinson crobinso@redhat.com Fri May 5 15:36:26 2023 -0400
Date: Fri May 5 15:48:24 2023 -0400:
Git: 6030049cd7e24f59581b818c5da53665d0a76d6c
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/test_manager.py b/tests/uitests/test_manager.py
index 40329022..b01c3691 100644
--- a/tests/uitests/test_manager.py
+++ b/tests/uitests/test_manager.py
@@ -228,15 +228,17 @@ def testManagerWindowReposition(app):
fmenu.find("View Manager", "menu item").click()
lib.utils.check(lambda: manager.active)
- manager.window_maximize()
- newx = manager.position[0]
- newy = manager.position[1]
+ curxy = manager.title_coordinates()
+ newxy = curxy[0] + 200, curxy[1] + 200
+ import dogtail.rawinput
+ dogtail.rawinput.dragWithTrajectory(curxy, newxy)
+ checkxy = manager.position
manager.window_close()
host.click_title()
host.find("File", "menu").click()
host.find("View Manager", "menu item").click()
lib.utils.check(lambda: manager.showing)
- assert manager.position == (newx, newy)
+ assert manager.position == checkxy

View File

@ -1,22 +0,0 @@
Subject: tests: Default --uitests to --verbosity=2
From: Cole Robinson crobinso@redhat.com Sat May 6 16:50:20 2023 -0400
Date: Sat May 6 16:50:20 2023 -0400:
Git: a9cf4945b1dcd45fb205c4adc6f555f2fc47ecfa
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/conftest.py b/tests/conftest.py
index 3d1ca7d1..4a0fc1a0 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -40,6 +40,10 @@ def pytest_addoption(parser):
def pytest_ignore_collect(path, config):
uitests_requested = config.getoption("--uitests")
+ # Default --uitests to --verbosity=2
+ if uitests_requested:
+ config.option.verbose = max(2, config.option.verbose)
+
# Unless explicitly requested, ignore these tests
if "test_dist.py" in str(path):
return True

View File

@ -1,31 +0,0 @@
Subject: uitests: Make hotplug test pass on both f37 and f38
From: Cole Robinson crobinso@redhat.com Sat May 6 13:13:22 2023 -0400
Date: Sat May 6 19:43:24 2023 -0400:
Git: 75422ec75efe254beb8dc85f75715d71fa3ec859
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/test_livetests.py b/tests/uitests/test_livetests.py
index 72a96a10..55c9066b 100644
--- a/tests/uitests/test_livetests.py
+++ b/tests/uitests/test_livetests.py
@@ -471,11 +471,15 @@ def _testLiveHotplug(app, fname):
lib.utils.check(lambda: tab.showing)
entry.set_text(fname)
appl.click()
- # F38 CDROM change is broken:
- # https://gitlab.com/qemu-project/qemu/-/issues/933
# pylint: disable=unreachable
- app.click_alert_button("changes will take effect", "OK")
- return
+ import dogtail.tree
+ try:
+ # F38 CDROM change is broken:
+ # https://gitlab.com/qemu-project/qemu/-/issues/933
+ app.click_alert_button("changes will take effect", "OK")
+ return
+ except dogtail.tree.SearchError:
+ pass
lib.utils.check(lambda: not appl.sensitive)
lib.utils.check(lambda: entry.text == fname)

View File

@ -1,38 +0,0 @@
Subject: uitests: More attempts at making manager reposition test reliable
From: Cole Robinson crobinso@redhat.com Sat May 6 13:34:13 2023 -0400
Date: Sat May 6 19:43:24 2023 -0400:
Git: 509c95ddb9b3f30ea88a61b065cd920055faa5f4
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/test_manager.py b/tests/uitests/test_manager.py
index b01c3691..10709f09 100644
--- a/tests/uitests/test_manager.py
+++ b/tests/uitests/test_manager.py
@@ -228,17 +228,21 @@ def testManagerWindowReposition(app):
fmenu.find("View Manager", "menu item").click()
lib.utils.check(lambda: manager.active)
+ # Use alt+f7 combo to move window
curxy = manager.title_coordinates()
- newxy = curxy[0] + 200, curxy[1] + 200
- import dogtail.rawinput
- dogtail.rawinput.dragWithTrajectory(curxy, newxy)
- checkxy = manager.position
+ newxy = (curxy[0] + 400, curxy[1] + 400)
+ manager.keyCombo("<alt>F7")
+ app.rawinput.click(*newxy)
+ checkxy = manager.position[0], manager.position[1]
manager.window_close()
host.click_title()
host.find("File", "menu").click()
host.find("View Manager", "menu item").click()
lib.utils.check(lambda: manager.showing)
- assert manager.position == checkxy
+
+ # Results can be off by one or two, but it's not a virt-manager bug
+ assert abs(manager.position[0] - checkxy[0]) in range(3)
+ assert abs(manager.position[1] - checkxy[1]) in range(3)

View File

@ -1,47 +0,0 @@
Subject: tests: uitests: make menu operations more robust
From: Cole Robinson crobinso@redhat.com Sat May 6 17:01:44 2023 -0400
Date: Sat May 6 19:43:24 2023 -0400:
Git: 64bd6ba53e383c941df226bbb7f066b0a363d070
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/lib/_node.py b/tests/uitests/lib/_node.py
index 1c6cf107..ad95ff02 100644
--- a/tests/uitests/lib/_node.py
+++ b/tests/uitests/lib/_node.py
@@ -221,24 +221,29 @@ class _VMMDogtailNode(dogtail.tree.Node):
clickX, clickY = self.title_coordinates()
dogtail.rawinput.click(clickX, clickY, button)
+ def is_menuitem(self):
+ submenu = (self.roleName == "menu" and
+ (not self.accessible_parent or
+ self.accessible_parent.roleName == "menu"))
+ return submenu or self.roleName == "menu item"
+
def click(self, *args, **kwargs):
"""
- click wrapper, give up to a second for widget to appear on
- screen, helps reduce some test flakiness
+ click wrapper, check some states first to reduce flakiness
"""
# pylint: disable=arguments-differ,signature-differs
self.check_onscreen()
self.check_sensitive()
+ if self.is_menuitem():
+ self.point()
super().click(*args, **kwargs)
def point(self, *args, **kwargs):
# pylint: disable=signature-differs
super().point(*args, **kwargs)
- if (self.roleName == "menu" and
- self.accessible_parent.roleName == "menu"):
- # Widget is a submenu, make sure the item is in selected
- # state before we return
+ if self.is_menuitem():
+ # Make sure item is selected before we return to caller
utils.check(lambda: self.state_selected)
def set_text(self, text):

View File

@ -1,20 +0,0 @@
Subject: rpm: convert license to SPDX format
From: Daniel P. Berrangé berrange@redhat.com Wed Apr 26 17:49:37 2023 +0100
Date: Sun May 7 12:40:05 2023 -0400:
Git: 6258d536895b1a64a81f111445994c35c0928d4b
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
diff --git a/virt-manager.spec b/virt-manager.spec
index 55c24405..5b939b5d 100644
--- a/virt-manager.spec
+++ b/virt-manager.spec
@@ -12,7 +12,7 @@ Release: 1%{?dist}
%global verrel %{version}-%{release}
Summary: Desktop tool for managing virtual machines via libvirt
-License: GPLv2+
+License: GPL-2.0-or-later
BuildArch: noarch
URL: https://virt-manager.org/
Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz

View File

@ -1,27 +0,0 @@
Subject: uitests: Drop hotplug work around, f38 libvirt is fixed now
From: Cole Robinson crobinso@redhat.com Wed May 24 12:01:46 2023 -0400
Date: Wed May 24 12:49:02 2023 -0400:
Git: 7cd6151a212c4c477a947fe5a7f2b3363dd0dcbd
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/test_livetests.py b/tests/uitests/test_livetests.py
index 55c9066b..64ff7ad9 100644
--- a/tests/uitests/test_livetests.py
+++ b/tests/uitests/test_livetests.py
@@ -471,15 +471,6 @@ def _testLiveHotplug(app, fname):
lib.utils.check(lambda: tab.showing)
entry.set_text(fname)
appl.click()
- # pylint: disable=unreachable
- import dogtail.tree
- try:
- # F38 CDROM change is broken:
- # https://gitlab.com/qemu-project/qemu/-/issues/933
- app.click_alert_button("changes will take effect", "OK")
- return
- except dogtail.tree.SearchError:
- pass
lib.utils.check(lambda: not appl.sensitive)
lib.utils.check(lambda: entry.text == fname)

View File

@ -1,68 +0,0 @@
Subject: virtinst: delay "lookup_capsinfo" until we really need it
From: Laszlo Ersek lersek@redhat.com Sat Aug 26 13:00:16 2023 +0200
Date: Tue Aug 29 13:24:52 2023 +0200:
Git: 4ead4acb440e132c84f2e73365a1e419279d9fb9
When I try to open the details window for a domain that does not use the
system default emulator, I get the following exception:
> Traceback (most recent call last):
> File "virtManager/vmwindow.py", line 40, in get_instance
> cls._instances[key] = vmmVMWindow(vm)
> File "virtManager/vmwindow.py", line 83, in __init__
> self._details = vmmDetails(self.vm, self.builder, self.topwin,
> File "virtManager/details/details.py", line 389, in __init__
> self._init_details()
> File "virtManager/details/details.py", line 807, in _init_details
> vmmAddHardware.build_video_combo(self.vm, video_dev)
> File "virtManager/addhardware.py", line 816, in build_video_combo
> default = DeviceVideo.default_model(vm.xmlobj)
> File "virtinst/devices/video.py", line 47, in default_model
> if (guest.lookup_domcaps().supports_video_virtio() and
> File "virtinst/guest.py", line 656, in lookup_domcaps
> if not self._domcaps or not _compare(self._domcaps):
> File "virtinst/guest.py", line 646, in _compare
> if self.os.machine and not _compare_machine(domcaps):
> File "virtinst/guest.py", line 633, in _compare_machine
> capsinfo = self.lookup_capsinfo()
> File "virtinst/guest.py", line 674, in lookup_capsinfo
> self._capsinfo = self.conn.caps.guest_lookup(
> File "virtinst/capabilities.py", line 319, in guest_lookup
> raise ValueError(msg)
> ValueError: Host does not support domain type kvm with machine
> 'pc-q35-8.1' for virtualization type 'hvm' with architecture 'x86_64'
This is a regression; according to git-bisect, it was introduced in commit
05fcc7410eee ("virtinst: fix caching of domain capabilities", 2022-07-27).
"lookup_capsinfo" (and "guest_lookup" called by it) are unsuitable for
machine type alias checking (or for anything else) if the domain uses an
emulator that differs from the system default emulator. The information
returned by virConnectGetCapabilities() pertains to the system default
emulator. Thus, when using a non-default emulator, we should either not
call "lookup_capsinfo" for machine type alias checking, *or* we should
suppress the exception, and pretend that the alias check was a mismatch.
It turns out that we can avoid the "lookup_capsinfo" call (and thereby the
exception) in practice if we just delay the call until after the direct
(non-alias) comparison.
Fixes: #539
Fixes: 05fcc7410eee ("virtinst: fix caching of domain capabilities", 2022-07-27)
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
diff --git a/virtinst/guest.py b/virtinst/guest.py
index 123abfb2..9232405b 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -630,9 +630,9 @@ class Guest(XMLBuilder):
def lookup_domcaps(self):
def _compare_machine(domcaps):
- capsinfo = self.lookup_capsinfo()
if self.os.machine == domcaps.machine:
return True
+ capsinfo = self.lookup_capsinfo()
if capsinfo.is_machine_alias(self.os.machine, domcaps.machine):
return True
return False

View File

@ -1,52 +0,0 @@
Subject: virtinst: suppress "lookup_capsinfo" exception in machine type alias check
From: Laszlo Ersek lersek@redhat.com Sat Aug 26 13:38:42 2023 +0200
Date: Tue Aug 29 13:24:52 2023 +0200:
Git: 7dbe973b3f3a4311094f772bca72bef58cfdf4d7
Just to be sure, this patch implements the second approach (described in
the previous patch) as well.
Note that there is precedent for suppressing "guest_lookup" exceptions:
refer to the "Error determining machine list" branch from commit
ae7ebc220b15 ("details: Properly limit machine type list by guests
arch/type", 2013-09-01).
(
In fact, that branch gets activated when opening the details window for a
domain that uses a non-default emulator; the "virt-manager --debug" log
contains:
> ERROR (details:613) Error determining machine list
> Traceback (most recent call last):
> File "virtManager/details/details.py", line 605, in _init_details
> capsinfo = caps.guest_lookup(
> File "virtinst/capabilities.py", line 319, in guest_lookup
> raise ValueError(msg)
> ValueError: Host does not support domain type kvm with machine
> 'pc-q35-8.1' for virtualization type 'hvm' with architecture 'x86_64'
)
Fixes: #539
Fixes: 05fcc7410eee ("virtinst: fix caching of domain capabilities", 2022-07-27)
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
diff --git a/virtinst/guest.py b/virtinst/guest.py
index 9232405b..c61c65e7 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -632,7 +632,12 @@ class Guest(XMLBuilder):
def _compare_machine(domcaps):
if self.os.machine == domcaps.machine:
return True
- capsinfo = self.lookup_capsinfo()
+ try:
+ capsinfo = self.lookup_capsinfo()
+ except Exception:
+ log.exception("Error fetching machine list for alias "
+ "resolution, assuming mismatch");
+ return False
if capsinfo.is_machine_alias(self.os.machine, domcaps.machine):
return True
return False

View File

@ -1,63 +0,0 @@
Subject: tests/data: refresh Fedora tree URLs in virt-install-osinfo* expected XMLs
From: Laszlo Ersek lersek@redhat.com Sun Aug 27 09:19:09 2023 +0200
Date: Tue Aug 29 13:24:52 2023 +0200:
Git: 6e5c1db6b4a0af96afeb09a09fb2fc2b73308f01
Libosinfo seems to generate Fedora tree URLs using the "https", not
"http", scheme now; which breaks CI. Update the expected outputs
accordingly.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
diff --git a/tests/data/cli/compare/virt-install-osinfo-unattended-treeapis.xml b/tests/data/cli/compare/virt-install-osinfo-unattended-treeapis.xml
index 1140bf0b..5f3c3474 100644
--- a/tests/data/cli/compare/virt-install-osinfo-unattended-treeapis.xml
+++ b/tests/data/cli/compare/virt-install-osinfo-unattended-treeapis.xml
@@ -13,7 +13,7 @@
<type arch="x86_64" machine="pc-i440fx-6.1">hvm</type>
<kernel>/VIRTINST-TESTSUITE/vmlinuz</kernel>
<initrd>/VIRTINST-TESTSUITE/initrd.img</initrd>
- <cmdline>ks=file:/fedora.ks method=http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/17/Fedora/x86_64/os/</cmdline>
+ <cmdline>ks=file:/fedora.ks method=https://archive.fedoraproject.org/pub/archive/fedora/linux/releases/17/Fedora/x86_64/os/</cmdline>
</os>
<features>
<acpi/>
diff --git a/tests/data/cli/compare/virt-install-osinfo-url-unattended.xml b/tests/data/cli/compare/virt-install-osinfo-url-unattended.xml
index fe653b8b..2388120a 100644
--- a/tests/data/cli/compare/virt-install-osinfo-url-unattended.xml
+++ b/tests/data/cli/compare/virt-install-osinfo-url-unattended.xml
@@ -13,7 +13,7 @@
<type arch="x86_64" machine="q35">hvm</type>
<kernel>/VIRTINST-TESTSUITE/vmlinuz</kernel>
<initrd>/VIRTINST-TESTSUITE/initrd.img</initrd>
- <cmdline>ks=file:/fedora.ks inst.repo=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/26/Server/x86_64/os/</cmdline>
+ <cmdline>ks=file:/fedora.ks inst.repo=https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/26/Server/x86_64/os/</cmdline>
</os>
<features>
<acpi/>
diff --git a/tests/data/cli/compare/virt-install-osinfo-url-with-disk.xml b/tests/data/cli/compare/virt-install-osinfo-url-with-disk.xml
index 99fb90fb..11fce0aa 100644
--- a/tests/data/cli/compare/virt-install-osinfo-url-with-disk.xml
+++ b/tests/data/cli/compare/virt-install-osinfo-url-with-disk.xml
@@ -13,7 +13,7 @@
<type arch="x86_64" machine="q35">hvm</type>
<kernel>/VIRTINST-TESTSUITE/vmlinuz</kernel>
<initrd>/VIRTINST-TESTSUITE/initrd.img</initrd>
- <cmdline>method=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/26/Server/x86_64/os/</cmdline>
+ <cmdline>method=https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/26/Server/x86_64/os/</cmdline>
</os>
<features>
<acpi/>
diff --git a/tests/data/cli/compare/virt-install-osinfo-url.xml b/tests/data/cli/compare/virt-install-osinfo-url.xml
index 37fcc109..ea1937a3 100644
--- a/tests/data/cli/compare/virt-install-osinfo-url.xml
+++ b/tests/data/cli/compare/virt-install-osinfo-url.xml
@@ -13,7 +13,7 @@
<type arch="x86_64" machine="q35">hvm</type>
<kernel>/VIRTINST-TESTSUITE/vmlinuz</kernel>
<initrd>/VIRTINST-TESTSUITE/initrd.img</initrd>
- <cmdline>method=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/26/Server/x86_64/os/</cmdline>
+ <cmdline>method=https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/26/Server/x86_64/os/</cmdline>
</os>
<features>
<acpi/>

View File

@ -1,74 +0,0 @@
Subject: tests: Add unit test coverage for #539
From: Cole Robinson crobinso@redhat.com Tue Aug 29 12:27:40 2023 -0400
Date: Tue Aug 29 12:27:40 2023 -0400:
Git: 19b0f3f446ff8fc3b98c676726ee3a42b0b00b74
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/data/xmlparse/emulator-custom.xml b/tests/data/xmlparse/emulator-custom.xml
new file mode 100644
index 00000000..d39ce024
--- /dev/null
+++ b/tests/data/xmlparse/emulator-custom.xml
@@ -0,0 +1,22 @@
+<domain type='kvm'>
+ <name>manual-emulator-test</name>
+ <metadata>
+ <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
+ <libosinfo:os id="http://fedoraproject.org/fedora/unknown"/>
+ </libosinfo:libosinfo>
+ </metadata>
+ <memory unit='KiB'>8388608</memory>
+ <currentMemory unit='KiB'>8388608</currentMemory>
+ <vcpu placement='static'>8</vcpu>
+ <os>
+ <type arch='mips' machine='some-unknown-machine'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/my/manual/emulator</emulator>
+ </devices>
+</domain>
+
diff --git a/tests/test_xmlparse.py b/tests/test_xmlparse.py
index 1bf0ebe5..781680cf 100644
--- a/tests/test_xmlparse.py
+++ b/tests/test_xmlparse.py
@@ -1170,3 +1170,34 @@ def testDiskSourceAbspath():
# ...unless it's a URL
disk.set_source_path("http://example.com/foobar3")
assert disk.get_source_path() == "http://example.com/foobar3"
+
+
+def testUnknownEmulatorDomcapsLookup(monkeypatch):
+ """
+ Libvirt can handle defining a VM with a custom emulator, one not detected
+ by `virsh capabilities`. An appropriate `virsh domcapabilities` call will
+ inspect the emulator and return relevant info.
+
+ This test ensures that for parsing XML the `virsh capabilities` failure
+ isn't fatal, and we attempt to return valid `virsh domcapabilities` data
+ """
+
+ seen = False
+ def fake_build_from_params(conn, emulator, arch, machine, hvtype):
+ nonlocal seen
+ seen = True
+ assert arch == "mips"
+ assert machine == "some-unknown-machine"
+ assert emulator == "/my/manual/emulator"
+ return virtinst.DomainCapabilities(conn)
+
+ monkeypatch.setattr(
+ "virtinst.DomainCapabilities.build_from_params",
+ fake_build_from_params)
+
+ conn = utils.URIs.open_kvm()
+ xml = open(DATADIR + "emulator-custom.xml").read()
+ guest = virtinst.Guest(conn, xml)
+ assert guest.lookup_domcaps()
+ assert guest.lookup_domcaps()
+ assert seen

View File

@ -1,80 +0,0 @@
Subject: fix indentation of multiline log.exception() invocations
From: Laszlo Ersek lersek@redhat.com Wed Aug 30 10:03:15 2023 +0200
Date: Wed Aug 30 10:48:54 2023 +0200:
Git: 2ebbdb2797c62b9a962bdc4362882115f9445a62
Commit f107e3998908 ("Switch to more traditional logging structure",
2019-06-17) replaced "logging.exception" with "log.exception", effectively
shifting the argument lists 4 characters to the left. The second and
further lines of multiline invocations were not accordingly unindented,
however, which ended up setting a suboptimal precedent as well. Unindent
those lines now.
Reported-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
diff --git a/virtManager/hoststorage.py b/virtManager/hoststorage.py
index 594c6587..0670572c 100644
--- a/virtManager/hoststorage.py
+++ b/virtManager/hoststorage.py
@@ -427,8 +427,7 @@ class vmmHostStorage(vmmGObjectUI):
if not namestr:
namestr = None
except Exception: # pragma: no cover
- log.exception("Failed to determine if storage volume in "
- "use.")
+ log.exception("Failed to determine if storage volume in use.")
sensitive = True
if self._vol_sensitive_cb:
diff --git a/virtManager/lib/inspection.py b/virtManager/lib/inspection.py
index 59f8b413..bc14dd2c 100644
--- a/virtManager/lib/inspection.py
+++ b/virtManager/lib/inspection.py
@@ -115,9 +115,8 @@ def _perform_inspection(conn, vm): # pragma: no cover
g.mount_ro(dev, mp)
filesystems_mounted = True
except Exception:
- log.exception("%s: exception mounting %s on %s "
- "(ignored)",
- prettyvm, dev, mp)
+ log.exception("%s: exception mounting %s on %s (ignored)",
+ prettyvm, dev, mp)
icon = None
apps = None
@@ -154,7 +153,7 @@ def _perform_inspection(conn, vm): # pragma: no cover
apps.append(app)
except Exception:
log.exception("%s: exception while listing apps (ignored)",
- prettyvm)
+ prettyvm)
# Force the libguestfs handle to close right now.
del g
diff --git a/virtManager/object/domain.py b/virtManager/object/domain.py
index 1570b952..e7dc5035 100644
--- a/virtManager/object/domain.py
+++ b/virtManager/object/domain.py
@@ -1429,7 +1429,7 @@ class vmmDomain(vmmLibvirtObject):
self._backend.undefineFlags(flags)
except libvirt.libvirtError:
log.exception("libvirt undefineFlags failed, "
- "falling back to old style")
+ "falling back to old style")
self._backend.undefine()
@vmmLibvirtObject.lifecycle_action
diff --git a/virtinst/guest.py b/virtinst/guest.py
index c61c65e7..0584484f 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -636,7 +636,7 @@ class Guest(XMLBuilder):
capsinfo = self.lookup_capsinfo()
except Exception:
log.exception("Error fetching machine list for alias "
- "resolution, assuming mismatch");
+ "resolution, assuming mismatch");
return False
if capsinfo.is_machine_alias(self.os.machine, domcaps.machine):
return True

View File

@ -1,27 +0,0 @@
Subject: virt-clone: Copy disk permissions as well
From: Martin Kletzander mkletzan@redhat.com Fri Sep 1 21:39:37 2023 +0200
Date: Sun Sep 10 11:19:31 2023 -0400:
Git: 9f8da1f666177694dcffaac6728988b18e27274c
When cloning using libvirt APIs the function virStorageVolCreateXMLFrom
is used. However name and permissions are taken from the new XML [1].
By copying the permissions (only the mode is used) we can avoid some
unexpected issues.
[1] https://libvirt.org/html/libvirt-libvirt-storage.html#virStorageVolCreateXMLFrom
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2115153
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
diff --git a/virtinst/storage.py b/virtinst/storage.py
index f9a9f7a7..fd8a7481 100644
--- a/virtinst/storage.py
+++ b/virtinst/storage.py
@@ -528,6 +528,7 @@ class StorageVolume(_StorageObject):
self.format = parsevol.format
self.capacity = parsevol.capacity
self.allocation = parsevol.allocation
+ self.permissions.mode = parsevol.permissions.mode
if not self._pool:
self.pool = self._input_vol.storagePoolLookupByVolume()

View File

@ -1,19 +0,0 @@
Subject: data: appstream: add launchable tag
From: Pino Toscano ptoscano@redhat.com Sat Sep 9 07:26:20 2023 +0200
Date: Sun Sep 10 11:20:29 2023 -0400:
Git: ccd47575337cfa8e8b96197310b3ff4dabd2ab69
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
diff --git a/data/virt-manager.appdata.xml.in b/data/virt-manager.appdata.xml.in
index 0383852e..fd8f6e48 100644
--- a/data/virt-manager.appdata.xml.in
+++ b/data/virt-manager.appdata.xml.in
@@ -40,6 +40,7 @@
<keyword>kvm</keyword>
</keywords>
<content_rating type="oars-1.1"/>
+ <launchable type="desktop-id">virt-manager.desktop</launchable>
<releases>
<release version="4.1.0" date="2022-08-04"/>
<release version="4.0.0" date="2022-03-02"/>

View File

@ -1,71 +0,0 @@
Subject: Fix some pylint
From: Cole Robinson crobinso@redhat.com Tue Sep 12 11:54:04 2023 -0400
Date: Tue Sep 12 11:54:04 2023 -0400:
Git: 0f706cf87436af598b8694aecf4b42657bfa5b11
Signed-off-by: Cole Robinson <crobinso@redhat.com>
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -449,7 +449,7 @@ class App(object):
self._add(cat, args, None, check_success=True, **kwargs)
def add_invalid(self, cat, args, **kwargs):
if "grep" not in kwargs:
- raise Exception("grep= must be passed for add_invalid")
+ raise RuntimeError("grep= must be passed for add_invalid")
self._add(cat, args, None, check_success=False, **kwargs)
def add_compare(self, cat, args, compbase, **kwargs):
self._add(cat, args, compbase,
--- a/tests/test_xmlparse.py
+++ b/tests/test_xmlparse.py
@@ -1183,7 +1183,7 @@ def testUnknownEmulatorDomcapsLookup(mon
"""
seen = False
- def fake_build_from_params(conn, emulator, arch, machine, hvtype):
+ def fake_build_from_params(conn, emulator, arch, machine, _hvtype):
nonlocal seen
seen = True
assert arch == "mips"
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -1276,7 +1276,7 @@ class _InitClass(type):
but without giving us an explicit dep on python 3.6
"""
- def __new__(cls, *args, **kwargs):
+ def __new__(cls, *args, **kwargs): # pylint: disable=bad-mcs-classmethod-argument
if len(args) != 3:
return super().__new__(cls, *args) # pragma: no cover
dummy = kwargs
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -636,7 +636,7 @@ class Guest(XMLBuilder):
capsinfo = self.lookup_capsinfo()
except Exception:
log.exception("Error fetching machine list for alias "
- "resolution, assuming mismatch");
+ "resolution, assuming mismatch")
return False
if capsinfo.is_machine_alias(self.os.machine, domcaps.machine):
return True
@@ -743,7 +743,7 @@ class Guest(XMLBuilder):
if original_machine_type.startswith(prefix):
self.os.machine = machine_alias
return
- raise Exception("Don't know how to refresh machine type '%s'" %
+ raise RuntimeError("Don't know how to refresh machine type '%s'" %
original_machine_type)
def set_smbios_serial_cloudinit(self):
--- a/virtinst/xmlbuilder.py
+++ b/virtinst/xmlbuilder.py
@@ -54,7 +54,7 @@ class XMLManualAction(object):
val = self.xpath_value
else:
if "=" not in str(xpath):
- raise Exception(
+ raise ValueError(
"%s: Setting xpath must be in the form of XPATH=VALUE" %
xpath)
xpath, val = xpath.rsplit("=", 1)

View File

@ -1,154 +0,0 @@
Subject: connectauth: Drop sanity checking for libvirtd
From: Cole Robinson crobinso@redhat.com Tue Sep 12 13:18:42 2023 -0400
Date: Sun Sep 24 16:31:58 2023 -0400:
Git: 775edfd5dc668c26ffbdf07f6404ca80d91c3a3a
Nowadays with libvirt split daemons, libvirtd isn't required to
be installed for a first run local connection to succeed, so we
are needlessly blocking the app from 'just working' in many cases.
Especially considering that many distros often have libvirt running
out of the box due to gnome-boxes pulling it in.
Drop the daemon checking entirely.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/test_cli.py b/tests/uitests/test_cli.py
index 7e7ab6ea..b317bf28 100644
--- a/tests/uitests/test_cli.py
+++ b/tests/uitests/test_cli.py
@@ -139,15 +139,12 @@ def testCLIFirstRunURIBad(app):
app.click_alert_button("bad:///uri", "Close")
-def testCLIFirstRunNoLibvirtd(app):
+def testCLIFirstRunNoURI(app):
# Emulate first run with no libvirtd detected
- app.open(use_uri=False, firstrun_uri="bad:///uri",
- extra_opts=["--test-options=fake-no-libvirtd"])
+ app.open(use_uri=False, firstrun_uri="")
errlabel = app.topwin.find("error-label")
lib.utils.check(
lambda: "Checking for virtualization" in errlabel.text)
- lib.utils.check(
- lambda: "libvirtd service does not appear" in errlabel.text)
lib.utils.check(
lambda: "detect a default hypervisor" in errlabel.text)
diff --git a/virtManager/engine.py b/virtManager/engine.py
index 58fd8026..a90b5464 100644
--- a/virtManager/engine.py
+++ b/virtManager/engine.py
@@ -131,14 +131,14 @@ class vmmEngine(vmmGObject):
"""
from .lib import connectauth
- tryuri = vmmCreateConn.default_uri()
- log.debug("Probed default URI=%s", tryuri)
+ detected_uri = vmmCreateConn.default_uri()
+ log.debug("Probed default URI=%s", detected_uri)
if self.config.CLITestOptions.firstrun_uri is not None:
- tryuri = self.config.CLITestOptions.firstrun_uri or None
- log.debug("Using test-options firstrun_uri=%s", tryuri)
+ detected_uri = self.config.CLITestOptions.firstrun_uri or None
+ log.debug("Using test-options firstrun_uri=%s", detected_uri)
manager = self._get_manager()
- msg = connectauth.setup_first_uri(self.config, tryuri)
+ msg = connectauth.setup_first_uri(self.config, detected_uri)
if msg:
manager.set_startup_error(msg)
return
@@ -149,7 +149,7 @@ class vmmEngine(vmmGObject):
if ConnectError:
self._handle_conn_error(c, ConnectError)
- conn = vmmConnectionManager.get_instance().add_conn(tryuri)
+ conn = vmmConnectionManager.get_instance().add_conn(detected_uri)
conn.set_autoconnect(True)
conn.connect_once("open-completed", _open_completed)
conn.open()
diff --git a/virtManager/lib/connectauth.py b/virtManager/lib/connectauth.py
index 71e1b21f..9baec603 100644
--- a/virtManager/lib/connectauth.py
+++ b/virtManager/lib/connectauth.py
@@ -7,7 +7,6 @@
import collections
import os
import re
-import shutil
import time
from gi.repository import GLib
@@ -161,7 +160,7 @@ def connect_error(conn, errmsg, tb, warnconsole):
"or install an SSH askpass package locally.")
show_errmsg = False
else:
- hint += _("Verify that the 'libvirtd' daemon is running "
+ hint += _("Verify that an appropriate libvirt daemon is running "
"on the remote host.")
elif conn.is_xen(): # pragma: no cover
@@ -176,8 +175,8 @@ def connect_error(conn, errmsg, tb, warnconsole):
"may not be able to connect to libvirt as a "
"regular user. Try running as root.")
show_errmsg = False
- elif re.search(r"libvirt-sock", tb): # pragma: no cover
- hint += _("Verify that the 'libvirtd' daemon is running.")
+ elif re.search(r"virt[a-z]*-sock", tb): # pragma: no cover
+ hint += _("Verify that an appropriate libvirt daemon is running.")
show_errmsg = False
msg = _("Unable to connect to libvirt %s." % conn.get_uri())
@@ -203,27 +202,11 @@ def connect_error(conn, errmsg, tb, warnconsole):
# App first run connection setup #
##################################
-def setup_first_uri(config, tryuri):
- # Add /usr/sbin to the path in case non-root user launches virt-manager
- libvirtd_installed = bool(shutil.which("libvirtd", path=os.environ['PATH'] + os.pathsep + "/usr/sbin"))
- if config.CLITestOptions.fake_no_libvirtd:
- libvirtd_installed = False
-
- if tryuri and libvirtd_installed:
- return
-
- # Manager fail message
+def setup_first_uri(_config, detected_uri):
msg = ""
- if not libvirtd_installed: # pragma: no cover
- msg += _("The libvirtd service does not appear to be installed. "
- "Install and run the libvirtd service to manage "
- "virtualization on this host.")
-
- if not tryuri or "qemu" not in tryuri:
- if msg:
- msg += "\n\n" # pragma: no cover
+ if not detected_uri:
msg += _("Could not detect a default hypervisor. Make "
- "sure the appropriate QEMU/KVM virtualization "
+ "sure the appropriate QEMU/KVM virtualization and libvirt "
"packages are installed to manage virtualization "
"on this host.")
diff --git a/virtManager/lib/testmock.py b/virtManager/lib/testmock.py
index 1f3e91ac..d2ee6972 100644
--- a/virtManager/lib/testmock.py
+++ b/virtManager/lib/testmock.py
@@ -168,8 +168,6 @@ class CLITestOptionsClass:
* firstrun-uri: If set, use this as the initial connection URI
if we are doing firstrun testing
- * fake-no-libvirtd: If doing firstrun testing, fake that
- libvirtd is not installed
* fake-vnc-username: Fake VNC username auth request
* fake-console-resolution: Fake viewer console resolution response.
Spice doesn't return values here when we are just testing
@@ -223,7 +221,6 @@ class CLITestOptionsClass:
self.test_vm_run_fail = _get("test-vm-run-fail")
self.spice_agent = _get("spice-agent")
self.firstrun_uri = _get_value("firstrun-uri")
- self.fake_no_libvirtd = _get("fake-no-libvirtd")
self.fake_vnc_username = _get("fake-vnc-username")
self.fake_console_resolution = _get("fake-console-resolution")
self.fake_systray = _get("fake-systray")

View File

@ -1,70 +0,0 @@
Subject: delete: Fix ambiguity that confused pylint
From: Cole Robinson crobinso@redhat.com Sun Sep 24 16:13:00 2023 -0400
Date: Sun Sep 24 16:31:58 2023 -0400:
Git: ab0a318a46b1ab5c7827fc805b8c4e21635d66ab
virtManager/delete.py:219:11: E0601: Using variable 'error' before assignment (used-before-assignment)
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtManager/delete.py b/virtManager/delete.py
index f050534b..2195a5d9 100644
--- a/virtManager/delete.py
+++ b/virtManager/delete.py
@@ -179,8 +179,9 @@ class _vmmDeleteBase(vmmGObjectUI):
self._set_vm(None)
def _async_delete(self, asyncjob, vm, paths):
- details = ""
+ errdata = None
storage_errors = []
+
try:
self._destroy_vm(vm)
@@ -191,33 +192,32 @@ class _vmmDeleteBase(vmmGObjectUI):
self._delete_vm(vm)
vm.conn.schedule_priority_tick(pollvm=True)
except Exception as e: # pragma: no cover
- error = _("Error deleting virtual machine '%(vm)s': %(error)s") % {
- "vm": vm.get_name(),
- "error": str(e),
- }
- details = "".join(traceback.format_exc())
+ errdata = (
+ (_("Error deleting virtual machine '%(vm)s': %(error)s") %
+ {"vm": vm.get_name(), "error": str(e)}),
+ "".join(traceback.format_exc()))
+
+ if not storage_errors and not errdata:
+ return
storage_errstr = ""
for errinfo in storage_errors:
storage_errstr += "%s\n%s\n" % (errinfo[0], errinfo[1])
- if not storage_errstr and not details:
- return
-
# We had extra storage errors. If there was another error message,
# errors to it. Otherwise, build the main error around them.
- if details: # pragma: no cover
+ if errdata: # pragma: no cover
+ error, details = errdata
details += "\n\n"
details += _("Additionally, there were errors removing"
- " certain storage devices: \n")
+ " certain storage devices: \n")
details += storage_errstr
else:
error = _("Errors encountered while removing certain "
- "storage devices.")
+ "storage devices.")
details = storage_errstr
- if error:
- asyncjob.set_error(error, details)
+ asyncjob.set_error(error, details)
def _async_delete_paths(self, paths, conn, meter):
storage_errors = []

View File

@ -1,65 +0,0 @@
Subject: Fix filesystem socket.source
From: Jonathon Jongsma jjongsma@redhat.com Mon Oct 23 14:42:19 2023 -0500
Date: Tue Oct 24 10:30:37 2023 +0200:
Git: 40b73fec1b251da866485ac8534ba61aaca14fe7
When specifying the socket.source option for filesystem devices, like
this:
--filesystem type=mount,driver.type=virtiofs,source.socket=/xyz.sock,target.dir=tag1
virt-install is writing the xml as:
<filesystem type="mount">
<source>
<socket>/xyz.sock</socket>
</source>
<target dir="tag1"/>
<driver type="virtiofs"/>
</filesystem>
This produces an error such as:
ERROR missing source information for device mount_tag1
But the socket should be an attribute of source rather than a child
element. After this patch, the same command results in the following XML
and no error is produced:
<filesystem type="mount">
<source socket="/xyz.sock"/>
<target dir="tag1"/>
<driver type="virtiofs"/>
</filesystem>
Resolves: RHEL-1126
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
index e4a7da8f..8eca4e5b 100644
--- a/tests/data/cli/compare/virt-install-many-devices.xml
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
@@ -509,9 +509,7 @@
<readonly/>
<space_hard_limit>1234</space_hard_limit>
<space_soft_limit>500</space_soft_limit>
- <source pool="pool1" volume="vol">
- <socket>/tmp/foo.sock</socket>
- </source>
+ <source pool="pool1" volume="vol" socket="/tmp/foo.sock"/>
<target dir="/foo"/>
<binary path="/foo/virtiofsd" xattr="off">
<cache mode="always"/>
diff --git a/virtinst/devices/filesystem.py b/virtinst/devices/filesystem.py
index 975548f4..e38e35c3 100644
--- a/virtinst/devices/filesystem.py
+++ b/virtinst/devices/filesystem.py
@@ -53,7 +53,7 @@ class DeviceFilesystem(Device):
source_units = XMLProperty("./source/@units")
source_pool = XMLProperty("./source/@pool")
source_volume = XMLProperty("./source/@volume")
- source_socket = XMLProperty("./source/socket")
+ source_socket = XMLProperty("./source/@socket")
binary_path = XMLProperty("./binary/@path")
binary_xattr = XMLProperty("./binary/@xattr", is_onoff=True)

View File

@ -1,65 +0,0 @@
Subject: uri: Mock domcaps returning NO_SUPPORT
From: Cole Robinson crobinso@redhat.com Mon Jan 22 17:07:31 2024 -0500
Date: Mon Jan 22 17:07:31 2024 -0500:
Git: 2e3db754d1d596f8fed6b327017ace922838eb49
With libvirt 9.8.0, the test driver now has a stub getDomainCapabilities
implementation. But we still have some code that needs to handle
a driver with missing domcaps.
Make our magicuri mock return NO_SUPPORT for domcaps, when the URI
doesn't have any domcaps XML passed in. This is enough for our test
purposes.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtinst/uri.py b/virtinst/uri.py
index c83aaa78..c4be1960 100644
--- a/virtinst/uri.py
+++ b/virtinst/uri.py
@@ -173,23 +173,39 @@ class MagicURI(object):
capsxml = open(self.capsfile).read()
conn.getCapabilities = lambda: capsxml
+ def _raise_nosupport_error(msg):
+ import libvirt
+ err = [libvirt.VIR_ERR_NO_SUPPORT, None, msg, None, None, None]
+ exc = libvirt.libvirtError(msg)
+ exc.err = err
+ raise exc
+
# Fake domcapabilities. This is insufficient since output should
# vary per type/arch/emulator combo, but it can be expanded later
# if needed
+ domcapsxml = None
if self.domcapsfile:
domcapsxml = open(self.domcapsfile).read()
- def fake_domcaps(emulator, arch, machine, virttype, flags=0):
- ignore = emulator
- ignore = flags
- ignore = machine
- ignore = virttype
+ def fake_domcaps(emulator, arch, machine, virttype, flags=0):
+ ignore = emulator
+ ignore = flags
+ ignore = machine
+ ignore = virttype
+
+ if domcapsxml:
ret = domcapsxml
if arch:
ret = re.sub("arch>.+</arch", "arch>%s</arch" % arch, ret)
return ret
- conn.getDomainCapabilities = fake_domcaps
+ # In libvirt 9.8.0 the test suite added a stub domcaps
+ # impl. Fall back to raising NO_SUPPORT for our magic URIs, so
+ # we can keep getting code coverage of the old code paths
+ _raise_nosupport_error(
+ "virtinst test driver fake domcaps nosupport")
+
+ conn.getDomainCapabilities = fake_domcaps
if self.fakeuri:
origcreate = conn.createXML

View File

@ -1,23 +0,0 @@
Subject: tests: cli: Adjust hotplug test for latest libvirt
From: Cole Robinson crobinso@redhat.com Mon Jan 22 17:10:41 2024 -0500
Date: Mon Jan 22 17:10:41 2024 -0500:
Git: 83fcc5b2e8f2cede84564387756fe8971de72188
The libvirt test driver now has implementations for hotplug routines,
which broke string matching for one case.
Loosen it up to work for old and new libvirt versions.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1334,7 +1334,7 @@ c.add_invalid("test --edit --cpu host-pa
c.add_invalid("test --edit", grep="No change specified.")
c.add_invalid("test --edit 2 --cpu host-passthrough", grep="'--edit 2' requested but there's only 1 --cpu object in the XML")
c.add_invalid("test-for-virtxml --edit 5 --tpm /dev/tpm", grep="'--edit 5' requested but there's only 1 --tpm object in the XML")
-c.add_invalid("test-for-virtxml --add-device --host-device 0x04b3:0x4485 --update --confirm", input_text="yes", grep="not supported by the connection driver: virDomainAttachDevice")
+c.add_invalid("test-for-virtxml --add-device --host-device 0x04b3:0x4485 --update --confirm", input_text="yes", grep="not supported")
c.add_invalid("test-for-virtxml --remove-device --host-device 1 --update --confirm", input_text="foo\nyes\n", grep="not supported by the connection driver: virDomainDetachDevice")
c.add_invalid("test-for-virtxml --edit --graphics password=foo,keymap= --update --confirm", input_text="yes", grep="not supported by the connection driver: virDomainUpdateDeviceFlags")
c.add_invalid("--build-xml --memory 10,maxmemory=20", grep="--build-xml not supported for --memory")

View File

@ -1,35 +0,0 @@
Subject: Fix some pylint
From: Cole Robinson crobinso@redhat.com Mon Jan 22 17:15:11 2024 -0500
Date: Mon Jan 22 17:15:11 2024 -0500:
Git: c399353e00b37ae00c614c7e52a1369e6e816820
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtManager/details/viewers.py b/virtManager/details/viewers.py
index 68c97bdb..2a8a7857 100644
--- a/virtManager/details/viewers.py
+++ b/virtManager/details/viewers.py
@@ -618,8 +618,8 @@ class SpiceViewer(Viewer):
self._main_channel, "notify::agent-connected",
self._agent_connected_cb)
- elif (type(channel) == SpiceClientGLib.DisplayChannel and
- not self._display):
+ elif (isinstance(channel, SpiceClientGLib.DisplayChannel) and
+ not self._display):
channel_id = channel.get_property("channel-id")
if channel_id != 0: # pragma: no cover
diff --git a/virtinst/diskbackend.py b/virtinst/diskbackend.py
index 5f80c437..abfaab26 100644
--- a/virtinst/diskbackend.py
+++ b/virtinst/diskbackend.py
@@ -753,7 +753,7 @@ class StorageBackend(_StorageBase):
self._exists = True
elif self._path is None:
self._exists = True
- elif (not self.get_dev_type() == "network" and
+ elif (self.get_dev_type() != "network" and
not self._conn.is_remote() and
os.path.exists(self._path)):
self._exists = True

View File

@ -1,24 +0,0 @@
Subject: tests: ui: make newvm test start less flakey
From: Cole Robinson crobinso@redhat.com Tue Jan 23 08:59:34 2024 -0500
Date: Tue Jan 23 09:07:29 2024 -0500:
Git: acf3cedbbf85de9dd50c483547e2ea258c529583
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/test_createvm.py b/tests/uitests/test_createvm.py
index f430c14c..6fe894b4 100644
--- a/tests/uitests/test_createvm.py
+++ b/tests/uitests/test_createvm.py
@@ -12,7 +12,11 @@ from . import lib
###################
def _open_newvm(app):
- app.root.find("New", "push button").click()
+ button = app.root.find("New", "push button")
+ # Launching the dialog can be very flakey without this explicit
+ # point() call, not sure why
+ button.point()
+ button.click()
return app.find_window("New VM")

View File

@ -1,22 +0,0 @@
Subject: tests: ui: make creatnet test start less flakey
From: Cole Robinson crobinso@redhat.com Tue Jan 23 11:18:49 2024 -0500
Date: Tue Jan 23 13:28:07 2024 -0500:
Git: 4e2bec5b1410649232165fa33091a6ed9b9b48d9
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/tests/uitests/lib/app.py b/tests/uitests/lib/app.py
index 83628a7f..672b5ced 100644
--- a/tests/uitests/lib/app.py
+++ b/tests/uitests/lib/app.py
@@ -215,7 +215,9 @@ class VMMDogtailApp(object):
self.root.find_fuzzy("Edit", "menu").click()
self.root.find_fuzzy("Connection Details", "menu item").click()
win = self.find_window("%s - Connection Details" % conn_label)
- win.find_fuzzy(tab, "page tab").click()
+ tab = win.find_fuzzy(tab, "page tab")
+ tab.point()
+ tab.click()
return win
def manager_test_conn_window_cleanup(self, conn_label, childwin):

View File

@ -16,7 +16,7 @@ Signed-off-by: Cole Robinson <crobinso@redhat.com>
--- a/man/virt-install.rst
+++ b/man/virt-install.rst
@@ -1055,8 +1055,8 @@ all other settings off or unset.
@@ -1062,8 +1062,8 @@ all other settings off or unset.
By default, virt-install will always attempt ``--osinfo detect=on``
for appropriate install media. If no OS is detected, we will fail
@ -29,7 +29,7 @@ Signed-off-by: Cole Robinson <crobinso@redhat.com>
VIRTINSTALL_OSINFO_DISABLE_REQUIRE=1.
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1181,7 +1181,6 @@ c.add_compare("--connect %(URI-KVM-ARMV7
@@ -1246,7 +1246,6 @@ c.add_compare("--connect %(URI-KVM-ARMV7
#################
c.add_valid("--arch aarch64 --osinfo fedora19 --nodisks --pxe --connect " + utils.URIs.kvm_x86_nodomcaps, grep="Libvirt version does not support UEFI") # attempt to default to aarch64 UEFI, but it fails, but should only print warnings

View File

@ -2,7 +2,7 @@
X-SuSE-translate=true
X-SuSE-DocTeamID=ycc_xen
Type=Application
Categories=GTK;GNOME;System;Monitor;X-SuSE-YaST;X-SuSE-YaST-Virtualization;
Categories=System;X-SuSE-YaST;X-SuSE-YaST-Virtualization;
X-KDE-ModuleType=Library
X-KDE-RootOnly=true

BIN
virt-manager-4.1.0.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
virt-manager-5.0.0.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,265 @@
-------------------------------------------------------------------
Thu Dec 5 07:25:57 MST 2024 - carnold@suse.com
- bsc#1234215 - fail to install a guest with virt-install and
report "AttributeError: 'str' object has no attribute 'removeprefix'"
virtinst-drop-removeprefix-usage.patch
-------------------------------------------------------------------
Tue Nov 26 14:30:04 MST 2024 - carnold@suse.com
- Update to Version 5.0.0 (jsc#PED-8910)
* virt-clone: colne serial files (Oleg Vasilev)
* virt-clone: Copy disk permissions as well (Martin Kletzander)
* virt-install: Add properties for AMD SEV-SNP (Daniel P. Berrangé)
* virt-install: Add passt backend for user network interface
* virt-install: Add support for --sound multichannel,stream (Lin Ma)
* virt-install: Add support for --tpm backend.debug,backend.source (Lin Ma)
* virt-xml: add --edit --convert-to-q35
* virt-xml: add --edit --convert-to-vnc
* virt-xml: Add --edit --boot uefi
* virt-manager: Fix opening graphical console with egl-headless (Feng Jiang)
* virt-manager: Add support to create external snapshots
* virt-manager: Default to scaling=Always for consoles
* virt-manager: switch to not forking by default
* cli: Add more --disk options (Lin Ma)
* cli: Add --memdev target.address_base for virtio-mem and virtio-pmem (Lin Ma)
* cli: Add --features kvm.pv-ipi.state=on|off (Lin Ma)
* cli: Add --video model.blob=on|off (Lin Ma)
* Add missing Hyper-V features and enable most of them by default
* Add loongarch support (Xianglai Li)
* Add support for hvf domain type (Mohamed Akram)
* Support creating sparse volumes on ZFS pools (Iain Buclaw)
* UEFI improvements for riscv64 and loongarch64 VMs (Andrea Bolognani)
* Add graphcis to riscv64 and aarch64
* build: swtich from setuptools to meson
* diskbackend: Drop support for sheepdog (Lin Ma)
* cli: Deprecate --cpu host in favor of --cpu host-model (Andrea Bolognani)
- Drop the following upstream patches contained in new tarball
001-cli-disk-Add-driver.metadata_cache-options.patch
002-tests-cli-Fix-test-output-after-previous-commit.patch
003-fsdetails-Fix-an-error-with-source.socket-of-virtiofs.patch
004-cli-Drop-unnecessary-disk-prop-aliases.patch
005-tests-testdriver-Add-filesystem-socket-example.patch
006-virtinstall-split-no_install-conditional-apart-to-track-code-coverage.patch
007-virtinstall-fix-regression-with-boot-and-no-install-method.patch
008-tests-Add-a-compat-check-for-linux2020-in-amd-sev-test-case.patch
009-cli-cpu-Add-maxphysaddr.mode-bits-options.patch
010-virt-install-help-required-options-are-wrong.patch
011-cloner-Sync-uuid-and-sysinfo-system-uuid.patch
012-virt-install-unattended-and-cloud-init-conflict.patch
013-virt-install-Reuse-cli.fail_conflicting.patch
014-cli-support-boot-loader.stateless-.patch
015-diskbackend-Drop-support-for-sheepdog.patch
016-Fix-pylint-pycodestyle-warnings-with-latest-versions.patch
017-tests-cpio-set-owner-to-00.patch
018-addhardware-Fix-backtrace-when-controller.index-is-None.patch
019-Clean-up-FileChooser-usage-a-bit.patch
020-guest-Query-availability-of-usb-redirdevs-in-domcaps.patch
021-guest-Query-availability-of-spicevmc-channels-in-domcaps.patch
022-tests-Add-domcaps-coverage-for-usb-redir-spicevmc-channel-checks.patch
023-tests-Update-to-latest-kvm-domcaps.patch
024-progress-Fix-showing-correct-final-total.patch
025-virtinstall-Fix-the-allocating-disk-size-printed-by-the-progress-bar.patch
026-virtinstall-Hide-total_size-in-the-progress-bar-if-it-doesnt-need.patch
027-asyncjob-Fix-backtrace-when-no-cursor-theme-installed.patch
029-asyncjob-Remove-unused-import.patch
030-Packit-initial-enablement.patch
031-virt-install-Recommend-boot-uefi.patch
032-virt-install-Document-Secure-Boot-setups.patch
033-cloner-clone-serial-files.patch
034-tests-cli-test-serial-file-clone.patch
035-man-virt-install-Add-a-note-about-different-behavior-of-boot-on-s390x.patch
036-tests-uitests-Fix-window-reposition-on-f38.patch
037-tests-livetests-work-around-qemu-media-change-regression.patch
038-tests-uitests-Fix-manager-window-repositioning-test.patch
039-tests-Default-uitests-to-verbosity-2.patch
040-uitests-Make-hotplug-test-pass-on-both-f37-and-f38.patch
041-uitests-More-attempts-at-making-manager-reposition-test-reliable.patch
042-tests-uitests-make-menu-operations-more-robust.patch
043-rpm-convert-license-to-SPDX-format.patch
044-uitests-Drop-hotplug-work-around-f38-libvirt-is-fixed-now.patch
045-virtinst-delay-lookup_capsinfo-until-we-really-need-it.patch
046-virtinst-suppress-lookup_capsinfo-exception-in-machine-type-alias-check.patch
047-tests-data-refresh-Fedora-tree-URLs-in-virt-install-osinfo-expected-XMLs.patch
048-tests-Add-unit-test-coverage-for-539.patch
049-fix-indentation-of-multiline-log.exception-invocations.patch
050-virt-clone-Copy-disk-permissions-as-well.patch
051-data-appstream-add-launchable-tag.patch
052-Fix-some-pylint.patch
055-connectauth-Drop-sanity-checking-for-libvirtd.patch
056-delete-Fix-ambiguity-that-confused-pylint.patch
057-Fix-filesystem-socket.source.patch
058-uri-Mock-domcaps-returning-NO_SUPPORT.patch
059-tests-cli-Adjust-hotplug-test-for-latest-libvirt.patch
060-Fix-some-pylint.patch
061-tests-ui-make-newvm-test-start-less-flakey.patch
062-tests-ui-make-creatnet-test-start-less-flakey.patch
063-Support-creating-sparse-volumes-on-ZFS-pools.patch
064-domain-rename-handle-firmware-ending-with-.qcow2.patch
065-testdriver-Add-portgroups-example-to-test-many-devices.patch
066-netlist-Fix-UI-error-when-virtual-network-doesnt-exist.patch
067-ui-details-fix-Applications-width.patch
068-ui-details-Increased-scrolledview6s-height-request.patch
069-uitests-Fix-walkUI-flakyness.patch
070-uitests-Handle-slow-app-launch-on-fedora-39.patch
071-createvm-Replace-deprecated-pkgutil.find_loader.patch
072-Fix-pylint-3.1.0-issues.patch
073-console-Move-embeddable_graphics-to-console.py.patch
074-domain-Add-idx-parameter-to-open_graphics_fd.patch
075-console-Select-the-first-embeddable-graphics-device-as-graphical-console.patch
076-console-Cleanup-and-improve-console-menu-handling.patch
077-cli-add-show-systray-option.patch
078-man-document-show-systray-option.patch
079-baseclass-Avoid-glib-Source-ID-XX-not-found-at-app-shutdown.patch
080-uitests-More-handling-for-slow-startup-on-f39.patch
081-systray-Cleanups-and-improvements-for-show-systray.patch
082-virtinst-add-external-snapshot-capability.patch
083-virtinst-snapshot-add-memory-file-attribute.patch
084-virtManager-domain-allow-disk-only-snapshots.patch
085-virtManager-add-support-to-create-external-snapshots.patch
086-virtManager-ignore-agen-livecycle-event-for-shutoff-VMs.patch
087-Allow-serial-console-resize-to-beyond-80-columns.patch
088-tests-Fix-host-copy-XML-with-libvirt-10.1.0.patch
089-hostdev-Fix-error-when-mdev-type_id-is-missing.patch
090-db1b2fbc-Use-GtkFileChooserNative.patch
091-uitests-Fix-with-GtkFileChooserNative.patch
092-cli-Use-regex-for-grep-and-nogrep-args.patch
093-cli-Fix-with-latest-libvirt.patch
094-uitests-handle-newer-libvirt-test-driver-UpdateDevice-support.patch
095-uitests-force-internal-snapshots-in-test_snapshot.py.patch
- Drop the following downstream patches no longer required
virtinst-dont-create-storage-pool-for-dryrun.patch
virtinst-add-pvh-support.patch
virtinst-enable-video-virtio-for-arm.patch
virtinst-add-hyperv-performance-options.patch
virtman-dont-specify-gtksource-version.patch
virtman-language-fixes.patch
-------------------------------------------------------------------
Tue Nov 5 13:51:57 MST 2024 - carnold@suse.com
- dbus-1-x11 is being removed from Tumbleweed so drop dependency in
virt-manager. Add dependency on python3-dbus-python.
-------------------------------------------------------------------
Tue Oct 8 09:29:00 MDT 2024 - carnold@suse.com
- bsc#1231400 - Virt-manager is missing support for AMD sev-snp
virtman-add-sev-memory-support.patch
-------------------------------------------------------------------
Tue Sep 17 14:30:56 MDT 2024 - carnold@suse.com
- Fix SUSE SL Micro detection
virtinst-add-slem60-detection-support.patch
-------------------------------------------------------------------
Mon Aug 26 15:11:42 MDT 2024 - carnold@suse.com
- Solve bsc#1228384 --dry-run creating pools in a different way
virtinst-dont-create-storage-pool-for-dryrun.patch
-------------------------------------------------------------------
Thu Aug 22 10:44:23 MDT 2024 - carnold@suse.com
- Upstream bug fixes (bsc#1027942) (jsc#PED-8910)
094-uitests-handle-newer-libvirt-test-driver-UpdateDevice-support.patch
095-uitests-force-internal-snapshots-in-test_snapshot.py.patch
-------------------------------------------------------------------
Tue Aug 6 10:13:04 MDT 2024 - carnold@suse.com
- Fix test failure with libvirt version 10.6.0
092-cli-Use-regex-for-grep-and-nogrep-args.patch
093-cli-Fix-with-latest-libvirt.patch
-------------------------------------------------------------------
Mon Jul 29 15:29:29 MDT 2024 - carnold@suse.com
- bsc#1228384 - virt-install generates unwanted libvirt storage
pools when running with --dry-run --print-xml
virtinst-dont-create-storage-pool-for-dryrun.patch
-------------------------------------------------------------------
Tue Jul 23 14:12:20 MDT 2024 - carnold@suse.com
- bsc#1228227 - libvirt missing default hyperv options causes
windows guest performance degredation.
virtinst-add-hyperv-performance-options.patch
-------------------------------------------------------------------
Sat Jun 29 06:52:23 MDT 2024 - carnold@suse.com
- bsc#1227116 - osinfo still uses deprecated SL-Micro name
virtinst-add-slem60-detection-support.patch
Dropped virtinst-add-slm-detection-support.patch
-------------------------------------------------------------------
Thu Jun 20 13:40:47 UTC 2024 - Markéta Machová <mmachova@suse.com>
- remove dependency on /usr/bin/python3 using
%python3_fix_shebang macro, [bsc#1212476]
-------------------------------------------------------------------
Wed Jun 19 02:24:29 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Skip some tests that fail under Pytest 8.x.
-------------------------------------------------------------------
Tue Jun 11 13:24:45 MDT 2024 - carnold@suse.com
- bsc#1226173 - virt-manager: Browse local does not work anymore
090-db1b2fbc-Use-GtkFileChooserNative.patch
Renamed 090-uitests-Fix-with-GtkFileChooserNative.patch to
091-uitests-Fix-with-GtkFileChooserNative.patch
-------------------------------------------------------------------
Thu May 23 13:34:59 MDT 2024 - carnold@suse.com
- Upstream bug fixes (bsc#1027942) (jsc#PED-6305)
088-tests-Fix-host-copy-XML-with-libvirt-10.1.0.patch
089-hostdev-Fix-error-when-mdev-type_id-is-missing.patch
090-uitests-Fix-with-GtkFileChooserNative.patch
-------------------------------------------------------------------
Thu May 16 14:14:23 MDT 2024 - carnold@suse.com
- Upstream bug fixes (bsc#1027942) (jsc#PED-6305)
063-Support-creating-sparse-volumes-on-ZFS-pools.patch
064-domain-rename-handle-firmware-ending-with-.qcow2.patch
065-testdriver-Add-portgroups-example-to-test-many-devices.patch
066-netlist-Fix-UI-error-when-virtual-network-doesnt-exist.patch
067-ui-details-fix-Applications-width.patch
068-ui-details-Increased-scrolledview6s-height-request.patch
069-uitests-Fix-walkUI-flakyness.patch
070-uitests-Handle-slow-app-launch-on-fedora-39.patch
071-createvm-Replace-deprecated-pkgutil.find_loader.patch
072-Fix-pylint-3.1.0-issues.patch
073-console-Move-embeddable_graphics-to-console.py.patch
074-domain-Add-idx-parameter-to-open_graphics_fd.patch
075-console-Select-the-first-embeddable-graphics-device-as-graphical-console.patch
076-console-Cleanup-and-improve-console-menu-handling.patch
077-cli-add-show-systray-option.patch
078-man-document-show-systray-option.patch
079-baseclass-Avoid-glib-Source-ID-XX-not-found-at-app-shutdown.patch
080-uitests-More-handling-for-slow-startup-on-f39.patch
081-systray-Cleanups-and-improvements-for-show-systray.patch
082-virtinst-add-external-snapshot-capability.patch
083-virtinst-snapshot-add-memory-file-attribute.patch
084-virtManager-domain-allow-disk-only-snapshots.patch
085-virtManager-add-support-to-create-external-snapshots.patch
086-virtManager-ignore-agen-livecycle-event-for-shutoff-VMs.patch
087-Allow-serial-console-resize-to-beyond-80-columns.patch
- Modifications to the Categories in virt-install.desktop and
virtman-desktop.patch
-------------------------------------------------------------------
Thu May 9 11:52:06 MDT 2024 - carnold@suse.com
- Enable mdev tests with the introduction of libvirt 10.3.0
virt-manager.spec
-------------------------------------------------------------------
Tue May 7 13:30:54 MDT 2024 - carnold@suse.com

View File

@ -30,140 +30,78 @@
%endif
Name: virt-manager%{psuffix}
Version: 4.1.0
Version: 5.0.0
Release: 0
Summary: Virtual Machine Manager
License: GPL-2.0-or-later
Group: System/Monitoring
URL: http://virt-manager.org/
Source0: https://releases.pagure.org/virt-manager/virt-manager-%{version}.tar.gz
Source0: https://releases.pagure.org/virt-manager/virt-manager-%{version}.tar.xz
Source1: virt-install.rb
Source2: virt-install.desktop
Source3: virt-manager-supportconfig
# Upstream Patches
Patch1: 001-cli-disk-Add-driver.metadata_cache-options.patch
Patch2: 002-tests-cli-Fix-test-output-after-previous-commit.patch
Patch3: 003-fsdetails-Fix-an-error-with-source.socket-of-virtiofs.patch
Patch4: 004-cli-Drop-unnecessary-disk-prop-aliases.patch
Patch5: 005-tests-testdriver-Add-filesystem-socket-example.patch
Patch6: 006-virtinstall-split-no_install-conditional-apart-to-track-code-coverage.patch
Patch7: 007-virtinstall-fix-regression-with-boot-and-no-install-method.patch
Patch8: 008-tests-Add-a-compat-check-for-linux2020-in-amd-sev-test-case.patch
Patch9: 009-cli-cpu-Add-maxphysaddr.mode-bits-options.patch
Patch10: 010-virt-install-help-required-options-are-wrong.patch
Patch11: 011-cloner-Sync-uuid-and-sysinfo-system-uuid.patch
Patch12: 012-virt-install-unattended-and-cloud-init-conflict.patch
Patch13: 013-virt-install-Reuse-cli.fail_conflicting.patch
Patch14: 014-cli-support-boot-loader.stateless-.patch
Patch15: 015-diskbackend-Drop-support-for-sheepdog.patch
Patch16: 016-Fix-pylint-pycodestyle-warnings-with-latest-versions.patch
Patch17: 017-tests-cpio-set-owner-to-00.patch
Patch18: 018-addhardware-Fix-backtrace-when-controller.index-is-None.patch
Patch19: 019-Clean-up-FileChooser-usage-a-bit.patch
Patch20: 020-guest-Query-availability-of-usb-redirdevs-in-domcaps.patch
Patch21: 021-guest-Query-availability-of-spicevmc-channels-in-domcaps.patch
Patch22: 022-tests-Add-domcaps-coverage-for-usb-redir-spicevmc-channel-checks.patch
Patch23: 023-tests-Update-to-latest-kvm-domcaps.patch
Patch24: 024-progress-Fix-showing-correct-final-total.patch
Patch25: 025-virtinstall-Fix-the-allocating-disk-size-printed-by-the-progress-bar.patch
Patch26: 026-virtinstall-Hide-total_size-in-the-progress-bar-if-it-doesnt-need.patch
Patch27: 027-asyncjob-Fix-backtrace-when-no-cursor-theme-installed.patch
Patch29: 029-asyncjob-Remove-unused-import.patch
Patch30: 030-Packit-initial-enablement.patch
Patch31: 031-virt-install-Recommend-boot-uefi.patch
Patch32: 032-virt-install-Document-Secure-Boot-setups.patch
Patch33: 033-cloner-clone-serial-files.patch
Patch34: 034-tests-cli-test-serial-file-clone.patch
Patch35: 035-man-virt-install-Add-a-note-about-different-behavior-of-boot-on-s390x.patch
Patch36: 036-tests-uitests-Fix-window-reposition-on-f38.patch
Patch37: 037-tests-livetests-work-around-qemu-media-change-regression.patch
Patch38: 038-tests-uitests-Fix-manager-window-repositioning-test.patch
Patch39: 039-tests-Default-uitests-to-verbosity-2.patch
Patch40: 040-uitests-Make-hotplug-test-pass-on-both-f37-and-f38.patch
Patch41: 041-uitests-More-attempts-at-making-manager-reposition-test-reliable.patch
Patch42: 042-tests-uitests-make-menu-operations-more-robust.patch
Patch43: 043-rpm-convert-license-to-SPDX-format.patch
Patch44: 044-uitests-Drop-hotplug-work-around-f38-libvirt-is-fixed-now.patch
Patch45: 045-virtinst-delay-lookup_capsinfo-until-we-really-need-it.patch
Patch46: 046-virtinst-suppress-lookup_capsinfo-exception-in-machine-type-alias-check.patch
Patch47: 047-tests-data-refresh-Fedora-tree-URLs-in-virt-install-osinfo-expected-XMLs.patch
Patch48: 048-tests-Add-unit-test-coverage-for-539.patch
Patch49: 049-fix-indentation-of-multiline-log.exception-invocations.patch
Patch50: 050-virt-clone-Copy-disk-permissions-as-well.patch
Patch51: 051-data-appstream-add-launchable-tag.patch
Patch52: 052-Fix-some-pylint.patch
Patch55: 055-connectauth-Drop-sanity-checking-for-libvirtd.patch
Patch56: 056-delete-Fix-ambiguity-that-confused-pylint.patch
Patch57: 057-Fix-filesystem-socket.source.patch
Patch58: 058-uri-Mock-domcaps-returning-NO_SUPPORT.patch
Patch59: 059-tests-cli-Adjust-hotplug-test-for-latest-libvirt.patch
Patch60: 060-Fix-some-pylint.patch
Patch61: 061-tests-ui-make-newvm-test-start-less-flakey.patch
Patch62: 062-tests-ui-make-creatnet-test-start-less-flakey.patch
Patch69: revert-363fca41-virt-install-Require-osinfo-for-non-x86-HVM-case-too.patch
Patch100: revert-363fca41-virt-install-Require-osinfo-for-non-x86-HVM-case-too.patch
# SUSE Only
Patch70: virtman-desktop.patch
Patch71: virtman-kvm.patch
Patch72: virtman-show-suse-install-repos.patch
Patch73: virtman-dont-allow-grub.xen-to-be-deleted.patch
Patch74: virtinst-pvgrub2-bootloader.patch
Patch75: virtinst-change-location-for-grub_xen.patch
Patch76: virtinst-set-qemu-emulator.patch
Patch150: virtman-desktop.patch
Patch151: virtman-kvm.patch
Patch152: virtman-show-suse-install-repos.patch
Patch153: virtman-dont-allow-grub.xen-to-be-deleted.patch
Patch154: virtinst-pvgrub2-bootloader.patch
Patch155: virtinst-change-location-for-grub_xen.patch
Patch156: virtinst-set-qemu-emulator.patch
# Features or Enhancements
Patch103: virtman-load-stored-uris.patch
Patch104: virtman-add-tooltip-to-firmware.patch
Patch105: virtman-modify-gui-defaults.patch
Patch106: virtman-add-sev-memory-support.patch
Patch120: virtinst-default-xen-to-qcow2-format.patch
Patch121: virtinst-detect-oes-distros.patch
Patch122: virtinst-vol-default-nocow.patch
Patch123: virtinst-set-cache-mode-unsafe-for-install.patch
Patch124: virtinst-s390x-disable-graphics.patch
Patch125: virtinst-add-caasp-support.patch
Patch126: virtinst-add-sle15-detection-support.patch
Patch127: virtinst-add-pvh-support.patch
Patch128: virtinst-media-detection.patch
Patch129: virtinst-enable-video-virtio-for-arm.patch
Patch203: virtman-load-stored-uris.patch
Patch204: virtman-add-tooltip-to-firmware.patch
Patch205: virtman-modify-gui-defaults.patch
Patch206: virtman-add-sev-memory-support.patch
Patch220: virtinst-default-xen-to-qcow2-format.patch
Patch221: virtinst-detect-oes-distros.patch
Patch222: virtinst-vol-default-nocow.patch
Patch223: virtinst-set-cache-mode-unsafe-for-install.patch
Patch224: virtinst-s390x-disable-graphics.patch
Patch225: virtinst-add-caasp-support.patch
Patch226: virtinst-add-sle15-detection-support.patch
Patch227: virtinst-media-detection.patch
# Bug Fixes
Patch151: virtman-increase-setKeepAlive-count.patch
Patch152: virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch
Patch153: virtman-allow-creating-i686-vm.patch
Patch154: virtman-dont-specify-vte-version.patch
Patch155: virtman-dont-specify-gtksource-version.patch
Patch156: virtman-fix-restore-vm-menu-selection.patch
Patch157: virtman-disallow-adding-floppy-disk.patch
Patch158: virtman-register-delete-event-for-details-dialog.patch
Patch159: 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
Patch173: virtinst-use-xenpae-kernel-for-32bit.patch
Patch174: virtinst-use-qemu-for-cdrom-device.patch
Patch175: virtinst-keep-install-iso-attached.patch
Patch176: virtinst-dont-use-special-copy-cpu-features.patch
Patch177: virtinst-set-default-nic.patch
Patch178: virtinst-sap-detection.patch
Patch179: virtinst-smbios-unsupported-for-xenpv.patch
Patch180: virtinst-keep-iso-for-xenpv.patch
Patch181: virtinst-add-slem-detection-support.patch
Patch182: virtinst-add-sle-hpc-support.patch
Patch183: virtinst-add-oracle-linux-support.patch
Patch184: virtinst-add-slm-detection-support.patch
Patch185: virtinst-windows-server-detection.patch
Patch186: virtman-fix-shared-disk-request-alignment-error.patch
Patch187: virtman-language-fixes.patch
Patch188: virtman-fix-inspection-apps-window.patch
Patch251: virtman-increase-setKeepAlive-count.patch
Patch252: virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch
Patch253: virtman-allow-creating-i686-vm.patch
Patch254: virtman-dont-specify-vte-version.patch
Patch255: virtman-fix-restore-vm-menu-selection.patch
Patch256: virtman-disallow-adding-floppy-disk.patch
Patch257: virtman-register-delete-event-for-details-dialog.patch
Patch258: virtman-revert-use-of-AyatanaAppIndicator3.patch
Patch259: virtman-fix-inspection-apps-window.patch
Patch260: virtman-fix-shared-disk-request-alignment-error.patch
Patch270: virtinst-xen-drive-type.patch
Patch271: virtinst-xenbus-disk-index-fix.patch
Patch272: virtinst-refresh_before_fetch_pool.patch
Patch273: virtinst-use-xenpae-kernel-for-32bit.patch
Patch274: virtinst-use-qemu-for-cdrom-device.patch
Patch275: virtinst-keep-install-iso-attached.patch
Patch276: virtinst-dont-use-special-copy-cpu-features.patch
Patch277: virtinst-set-default-nic.patch
Patch278: virtinst-sap-detection.patch
Patch279: virtinst-smbios-unsupported-for-xenpv.patch
Patch280: virtinst-keep-iso-for-xenpv.patch
Patch281: virtinst-add-slem-detection-support.patch
Patch282: virtinst-add-sle-hpc-support.patch
Patch283: virtinst-add-oracle-linux-support.patch
Patch284: virtinst-add-slem60-detection-support.patch
Patch285: virtinst-windows-server-detection.patch
Patch286: virtinst-drop-removeprefix-usage.patch
BuildArch: noarch
%define verrel %{version}-%{release}
Requires: dbus-1-x11
Requires: dconf
Requires: gstreamer-plugins-good
Requires: gtk3
Requires: python3-gobject
# For console widget
Requires: python3-cairo
Requires: python3-dbus-python
Requires: python3-gobject-Gdk
Requires: python3-gobject-cairo
Recommends: python3-SpiceClientGtk
@ -176,6 +114,7 @@ Requires: python3-libguestfs
%endif
BuildRequires: gettext
BuildRequires: meson
BuildRequires: python3-devel
BuildRequires: python3-docutils
BuildRequires: python3-setuptools
@ -240,18 +179,21 @@ machine).
%if %{default_hvs}
%global _default_hvs --default-hvs %{default_hvs}
%endif
python3 setup.py configure \
--prefix=%{_prefix} \
--default-graphics="spice" \
%{?_default_hvs}
%meson \
-Ddefault-hvs=%{default_hvs} \
-Dupdate-icon-cache=false \
-Dcompile-schemas=false \
-Dtests=disabled
%meson_build
%install
python3 setup.py \
--no-update-icon-cache \
--no-compile-schemas install \
--prefix=%{_prefix} \
-O1 --root=%{buildroot}
%meson_install
#python3 setup.py \
# --no-update-icon-cache \
# --no-compile-schemas install \
# --prefix=%{_prefix} \
# -O1 --root=%{buildroot}
mkdir -p %{buildroot}/%{_datadir}/YaST2/clients/
install -m644 %SOURCE1 %{buildroot}/%{_datadir}/YaST2/clients/virt-install.rb
mkdir -p %{buildroot}/%{_datadir}/applications/YaST2/
@ -261,6 +203,8 @@ mkdir -p %{buildroot}/usr/lib/supportconfig/plugins
install -m 755 %SOURCE3 %{buildroot}/usr/lib/supportconfig/plugins/virt_manager
chmod -x %{buildroot}%{_datadir}/virt-manager/virtManager/virtmanager.py
%python3_fix_shebang
%find_lang %{name}
%endif
@ -270,35 +214,48 @@ chmod -x %{buildroot}%{_datadir}/virt-manager/virtManager/virtmanager.py
# different device names
donttest="test_disk_numtotarget"
donttest="$donttest or testCLI0001virt_install_many_devices"
# depends on osc/obs host cpu?
donttest="$donttest or testCLI0003virt_install_singleton_config_2"
donttest="$donttest or testCLI0004virt_install_singleton_config_2"
donttest="$donttest or testCLI0101virt_install_cloud_init_default"
donttest="$donttest or testCLI0101virt_install_cloud_init_options1"
donttest="$donttest or testCLI0102virt_install_cloud_init_options1"
donttest="$donttest or testCLI0113virt_install_reinstall_cdrom"
donttest="$donttest or testCLI0117virt_install_reinstall_cdrom"
donttest="$donttest or testCLI0147virt_install_win11"
donttest="$donttest or testCLI0147virt_install_win11_no_uefi"
donttest="$donttest or testCLI0148virt_install_win11_no_uefi"
donttest="$donttest or testCLI0151virt_install_location_iso_and_cloud_init"
donttest="$donttest or testCLI0165virt_install"
donttest="$donttest or testCLI0173virt_install"
donttest="$donttest or testCLI0172virt_install_s390x_cdrom"
# Fedora specific
donttest="$donttest or testCLI0178virt_install_arm_defaultmach_f20"
donttest="$donttest or testCLI0179virt_install_arm_kvm_import"
donttest="$donttest or testCLI0180virt_install_s390x_cdrom"
donttest="$donttest or testCLI0186virt_install_riscv64_cloud_init"
donttest="$donttest or testCLI0187virt_install_riscv64_cdrom"
donttest="$donttest or testCLI0188virt_install_riscv64_unattended"
donttest="$donttest or testCLI0200virt_install_aarch64_cloud_init"
donttest="$donttest or testCLI0204virt_install_loongarch64_cloud_init"
donttest="$donttest or testCLI0205virt_install_loongarch64_cdrom"
donttest="$donttest or testCLI0206virt_install_loongarch64_unattended"
donttest="$donttest or testCLI0193virt_install_xen_default"
donttest="$donttest or testCLI0194virt_install_xen_pv"
donttest="$donttest or testCLI0195virt_install_xen_hvm"
donttest="$donttest or testCLI0196virt_install_xen_hvm"
donttest="$donttest or testCLI0203virt_install_bhyve_default_f27"
donttest="$donttest or testCLI0280virt_xml_build_disk_domain"
donttest="$donttest or testCLI0287virt_xml_edit_cpu_host_copy"
donttest="$donttest or testCLI0288virt_xml_build_pool_logical_disk"
# Disabled tests for libvirt 10.1.0
donttest="$donttest or testDASDMdev"
donttest="$donttest or testAPQNMdev"
donttest="$donttest or testPCIMdev"
donttest="$donttest or testPCIMdevNewFormat"
donttest="$donttest or testCLI0369virt_xml_add_hostdev_mdev"
donttest="$donttest or testCLI0377virt_xml_add_hostdev_mdev_start"
# End disabled tests for libvirt 10.1.0
donttest="$donttest or testCLI0375virt_xml_add_disk_create_storage_start"
# Due to the above skips:
# "there are XML properties that are untested in the test suite"
donttest="$donttest or testCLI0216virt_install_xen_default"
donttest="$donttest or testCLI0217virt_install_xenpvh"
donttest="$donttest or testCLI0218virt_install_xen_pv"
donttest="$donttest or testCLI0219virt_install_xen_hvm"
donttest="$donttest or testCLI0220virt_install_xen_hvm"
donttest="$donttest or testCLI0227virt_install_bhyve_default_f27"
donttest="$donttest or testCLI0307virt_xml_build_disk_domain"
donttest="$donttest or testCLI0315virt_xml_edit_cpu_host_copy"
donttest="$donttest or testCLI0316virt_xml_build_pool_logical_disk"
donttest="$donttest or testCLI0416virt_xml_add_disk_create_storage_start"
donttest="$donttest or testCLI0438virt_clone_auto_unmanaged"
donttest="$donttest or testCLI0442virt_clone"
donttest="$donttest or testCLI0443virt_clone"
donttest="$donttest or testCLI0457virt_clone"
donttest="$donttest or testCLI0458virt_clone"
donttest="$donttest or testCLI0460virt_clone"
donttest="$donttest or testCLI0461virt_clone"
donttest="$donttest or testCLI0468virt_clone"
donttest="$donttest or testCheckXMLBuilderProps"
# "These command line arguments or aliases are not checked in the test suite"
donttest="$donttest or testCheckCLISuboptions"
#
pytest -v -rfEs -k "not ($donttest)"

View File

@ -1,69 +0,0 @@
References: fate#326698 - Add pvh support to virt-manager
At this time support is disabled in this patch.
Index: virt-manager-4.1.0/virtManager/createvm.py
===================================================================
--- virt-manager-4.1.0.orig/virtManager/createvm.py
+++ virt-manager-4.1.0/virtManager/createvm.py
@@ -844,6 +844,9 @@ class vmmCreateVM(vmmGObjectUI):
break
if label is None:
continue
+ # xenpvh is currently unsupported
+ if guest.os_type == "xenpvh":
+ continue
# Determine if this is the default given by guest_lookup
if (gtype == self._capsinfo.os_type and
Index: virt-manager-4.1.0/virtinst/domain/os.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/domain/os.py
+++ virt-manager-4.1.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"]
+ def is_xenpvh(self):
+ return self.os_type in ["xenpvh", "linux"]
def is_container(self):
return self.os_type == "exe"
Index: virt-manager-4.1.0/virtinst/guest.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/guest.py
+++ virt-manager-4.1.0/virtinst/guest.py
@@ -910,7 +910,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 = True
if (self.os.is_arm_machvirt() or
self.os.is_riscv_virt() or
Index: virt-manager-4.1.0/virtManager/object/domain.py
===================================================================
--- virt-manager-4.1.0.orig/virtManager/object/domain.py
+++ virt-manager-4.1.0/virtManager/object/domain.py
@@ -1310,6 +1310,8 @@ class vmmDomain(vmmLibvirtObject):
return self.get_xmlobj().os.is_xenpv()
def is_hvm(self):
return self.get_xmlobj().os.is_hvm()
+ def is_xenpvh(self):
+ return self.get_xmlobj().os.is_xenpvh()
def get_uuid(self):
if self._uuid is None:
Index: virt-manager-4.1.0/virtManager/connection.py
===================================================================
--- virt-manager-4.1.0.orig/virtManager/connection.py
+++ virt-manager-4.1.0/virtManager/connection.py
@@ -211,6 +211,8 @@ class vmmConnection(vmmGObject):
label = "xen (paravirt)"
elif gtype == "hvm":
label = "xen (fullvirt)"
+ elif gtype == "xenpvh":
+ label = "xen (pvh - Technical Preview)"
elif domtype == "test":
if gtype == "xen":
label = "test (xen)"

View File

@ -1,7 +1,9 @@
Add support for detecting SUSE Linux Micro 6.0 and newer.
See also the osinfo-db package for the description file.
Note that starting with Micro version 6.0, the word "Enterprise" was
dropped from the Micro version name.
temporarily dropped from the Micro version name, then added
back as the official name upon release but the ISO media does not
have the word Enterprise.
Index: virt-manager-4.1.0/virtinst/install/urldetect.py
===================================================================
@ -19,33 +21,19 @@ Index: virt-manager-4.1.0/virtinst/install/urldetect.py
sle_version = self.product_name.strip().rsplit(' ')[6]
else:
- sle_version = self.product_name.strip().rsplit(' ')[4]
+ if "SUSE Linux Micro" in self.product_name:
+ if "SUSE SL Micro" in self.product_name:
+ sle_version = self.product_name.strip().rsplit(' ')[3]
+ else:
+ sle_version = self.product_name.strip().rsplit(' ')[4]
if len(self.product_name.strip().rsplit(' ')) > 5 and not " Micro " in self.product_name:
if " SAP " in self.product_name:
sle_version = (sle_version + '.' +
@@ -708,6 +711,14 @@ class _MICRODistro(_SuseDistro):
@@ -704,7 +707,7 @@ class _MICRODistro(_SuseDistro):
PRETTY_NAME = "SLES"
matching_distros = ["slem"]
_variant_prefix = "slem"
- _suse_regex = [".*SUSE Linux Enterprise Micro*", ".*SUSE Micro*"]
+ _suse_regex = [".*SUSE Linux Enterprise Micro*", ".*SUSE Linux Micro*", ".*SUSE Micro*", ".*SUSE SL Micro*"]
famregex = ".*SUSE Linux Enterprise Micro.*"
+class _SLMICRODistro(_SuseDistro):
+ PRETTY_NAME = "SLES"
+ matching_distros = ["slm"]
+ _variant_prefix = "slm"
+ _suse_regex = [".*SUSE Linux Micro*", ".*SUSE Micro*"]
+ famregex = ".*SUSE Linux Micro.*"
+
+
class _CAASPDistro(_SuseDistro):
PRETTY_NAME = "SLES"
matching_distros = ["caasp"]
@@ -977,6 +988,7 @@ def _build_distro_list(osobj):
_SLEDDistro,
_OpensuseDistro,
_MICRODistro,
+ _SLMICRODistro,
_CAASPDistro,
_OESDistro,
_DebianDistro,

View File

@ -1,10 +1,10 @@
References: fate#326960, bsc#1123942
Index: virt-manager-4.1.0/virtinst/install/installer.py
Index: virt-manager-4.2.0/virtinst/install/installer.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/install/installer.py
+++ virt-manager-4.1.0/virtinst/install/installer.py
@@ -592,7 +592,10 @@ class Installer(object):
--- virt-manager-4.2.0.orig/virtinst/install/installer.py
+++ virt-manager-4.2.0/virtinst/install/installer.py
@@ -622,7 +622,10 @@ class Installer(object):
guest.bootloader = "pygrub"
else:
guest.bootloader = None
@ -16,10 +16,10 @@ Index: virt-manager-4.1.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-4.1.0/virtManager/delete.py
Index: virt-manager-4.2.0/virtManager/delete.py
===================================================================
--- virt-manager-4.1.0.orig/virtManager/delete.py
+++ virt-manager-4.1.0/virtManager/delete.py
--- virt-manager-4.2.0.orig/virtManager/delete.py
+++ virt-manager-4.2.0/virtManager/delete.py
@@ -459,7 +459,7 @@ def _populate_storage_list(storage_list,
model.clear()

View File

@ -0,0 +1,16 @@
References: bsc#1234215
--- virt-manager-5.0.0/virtinst/devices/disk.py.orig 2024-12-05 07:15:41.023613127 -0700
+++ virt-manager-5.0.0/virtinst/devices/disk.py 2024-12-05 07:22:16.587622553 -0700
@@ -677,7 +677,10 @@ class DeviceDisk(Device):
# Some file managers use 'file://' when passing files to
# virt-manager, we need to strip it from the newpath.
if newpath is not None:
- newpath = newpath.removeprefix("file://")
+ # str.removeprefix(prefix, /) available in python 3.9 or newer
+ prefix = "file://"
+ if newpath.startswith(prefix):
+ newpath = newpath[len(prefix):]
if self._storage_backend.will_create_storage():
raise xmlutil.DevError(

View File

@ -1,181 +0,0 @@
References: bsc#1201748
Enable video virtio on arm if domain caps reports it is supported.
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-cdrom.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-aarch64-cdrom.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-cdrom.xml
@@ -63,6 +63,18 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
+ <channel type="spicevmc">
+ <target type="virtio" name="com.redhat.spice.0"/>
+ </channel>
+ <input type="tablet" bus="usb"/>
+ <input type="keyboard" bus="usb"/>
+ <graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
+ <image compression="off"/>
+ </graphics>
+ <sound model="ich9"/>
+ <video>
+ <model type="virtio"/>
+ </video>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
@@ -131,6 +143,18 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
+ <channel type="spicevmc">
+ <target type="virtio" name="com.redhat.spice.0"/>
+ </channel>
+ <input type="tablet" bus="usb"/>
+ <input type="keyboard" bus="usb"/>
+ <graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
+ <image compression="off"/>
+ </graphics>
+ <sound model="ich9"/>
+ <video>
+ <model type="virtio"/>
+ </video>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-firmware-no-override.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-aarch64-firmware-no-override.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-firmware-no-override.xml
@@ -43,6 +43,12 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
+ <input type="tablet" bus="usb"/>
+ <input type="keyboard" bus="usb"/>
+ <graphics type="vnc" port="-1"/>
+ <video>
+ <model type="virtio"/>
+ </video>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
@@ -95,6 +101,12 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
+ <input type="tablet" bus="usb"/>
+ <input type="keyboard" bus="usb"/>
+ <graphics type="vnc" port="-1"/>
+ <video>
+ <model type="virtio"/>
+ </video>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-kvm-gic.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-aarch64-kvm-gic.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-kvm-gic.xml
@@ -56,6 +56,12 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
+ <input type="tablet" bus="usb"/>
+ <input type="keyboard" bus="usb"/>
+ <graphics type="vnc" port="-1"/>
+ <video>
+ <model type="virtio"/>
+ </video>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-machdefault.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-aarch64-machdefault.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-machdefault.xml
@@ -55,6 +55,18 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
+ <channel type="spicevmc">
+ <target type="virtio" name="com.redhat.spice.0"/>
+ </channel>
+ <input type="tablet" bus="usb"/>
+ <input type="keyboard" bus="usb"/>
+ <graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
+ <image compression="off"/>
+ </graphics>
+ <sound model="ich9"/>
+ <video>
+ <model type="virtio"/>
+ </video>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-machvirt.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-aarch64-machvirt.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-machvirt.xml
@@ -55,6 +55,18 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
+ <channel type="spicevmc">
+ <target type="virtio" name="com.redhat.spice.0"/>
+ </channel>
+ <input type="tablet" bus="usb"/>
+ <input type="keyboard" bus="usb"/>
+ <graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
+ <image compression="off"/>
+ </graphics>
+ <sound model="ich9"/>
+ <video>
+ <model type="virtio"/>
+ </video>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
Index: virt-manager-4.1.0/virtinst/guest.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/guest.py
+++ virt-manager-4.1.0/virtinst/guest.py
@@ -1029,7 +1029,10 @@ class Guest(XMLBuilder):
return
if (not self.os.is_x86() and
not self.os.is_pseries()):
- return
+ if (not self.os.is_arm_machvirt() or
+ not self.lookup_domcaps().supports_video_virtio()):
+ log.debug("Domain caps reports video virtio is not supported.")
+ return
self.add_device(DeviceGraphics(self.conn))
def _add_default_rng(self):
Index: virt-manager-4.1.0/virtinst/devices/video.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/devices/video.py
+++ virt-manager-4.1.0/virtinst/devices/video.py
@@ -6,6 +6,7 @@
from .device import Device
from ..xmlbuilder import XMLProperty
+from ..logger import log
class DeviceVideo(Device):
@@ -32,8 +33,11 @@ class DeviceVideo(Device):
if guest.os.is_pseries():
return "vga"
if guest.os.is_arm_machvirt():
- # For all cases here the hv and guest are new enough for virtio
- return "virtio"
+ if guest.lookup_domcaps().supports_video_virtio():
+ # For all cases here the hv and guest are new enough for virtio
+ return "virtio"
+ log.debug("Domain caps reports video virtio is not supported.")
+ return "none"
if guest.os.is_riscv_virt():
# For all cases here the hv and guest are new enough for virtio
return "virtio"

View File

@ -2,11 +2,11 @@ Reference: bnc#863821
grub.xen is required to boot PV VMs that use the BTRFS filesystem.
This patch forces the use of grub.xen (instead of using pygrub) for
suse distros SLE12GA, openSUSE 13.2, and newer.
Index: virt-manager-4.0.0/virtinst/install/installer.py
Index: virt-manager-4.2.0/virtinst/install/installer.py
===================================================================
--- 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):
--- virt-manager-4.2.0.orig/virtinst/install/installer.py
+++ virt-manager-4.2.0/virtinst/install/installer.py
@@ -229,7 +229,8 @@ class Installer(object):
def _alter_treemedia_bootconfig(self, guest):
if not self._treemedia:
@ -16,10 +16,10 @@ Index: virt-manager-4.0.0/virtinst/install/installer.py
kernel, initrd, kernel_args = self._treemedia_bootconfig
if kernel:
@@ -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)
@@ -612,6 +613,21 @@ class Installer(object):
if self.requires_postboot_xml_changes():
initial_xml, final_xml = self._build_postboot_xml(
guest, final_xml, meter)
+ if (guest.os.is_xenpv() and
+ not guest.os.kernel):
+ os_ver = guest.osinfo.name

View File

@ -1,9 +1,9 @@
Reference: bnc#869024
Disable graphics on s390x
Index: virt-manager-4.1.0/virtinst/guest.py
Index: virt-manager-4.2.0/virtinst/guest.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/guest.py
+++ virt-manager-4.1.0/virtinst/guest.py
--- virt-manager-4.2.0.orig/virtinst/guest.py
+++ virt-manager-4.2.0/virtinst/guest.py
@@ -208,7 +208,10 @@ class Guest(XMLBuilder):
self.skip_default_channel = False
self.skip_default_sound = False
@ -15,8 +15,8 @@ Index: virt-manager-4.1.0/virtinst/guest.py
+ 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
@@ -358,7 +361,7 @@ class Guest(XMLBuilder):
self.skip_default_input = False
@@ -361,7 +364,7 @@ class Guest(XMLBuilder):
if not os_support:
return False
@ -25,7 +25,7 @@ Index: virt-manager-4.1.0/virtinst/guest.py
return True
return False # pragma: no cover
@@ -957,7 +960,7 @@ class Guest(XMLBuilder):
@@ -1149,7 +1152,7 @@ class Guest(XMLBuilder):
self.add_device(dev)
def _add_default_video_device(self):

View File

@ -1,12 +1,12 @@
Set cache mode for target installation disk to unsafe for better
performance.
Index: virt-manager-4.1.0/virtinst/install/installer.py
Index: virt-manager-4.2.0/virtinst/install/installer.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/install/installer.py
+++ virt-manager-4.1.0/virtinst/install/installer.py
@@ -567,16 +567,29 @@ class Installer(object):
--- virt-manager-4.2.0.orig/virtinst/install/installer.py
+++ virt-manager-4.2.0/virtinst/install/installer.py
@@ -571,6 +571,15 @@ class Installer(object):
def _build_postboot_xml(self, final_xml, meter):
def _build_postboot_xml(self, guest_ro, 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
@ -20,7 +20,9 @@ Index: virt-manager-4.1.0/virtinst/install/installer.py
self._alter_bootconfig(initial_guest)
self._alter_install_resources(initial_guest, meter)
if self.has_cloudinit():
initial_guest.set_smbios_serial_cloudinit()
@@ -601,11 +610,15 @@ class Installer(object):
"TPM for the first boot")
initial_guest.remove_device(initial_guest.devices.tpm[0])
+ install_xml = initial_guest.get_xml()
+ if saved_cache != "None":
@ -35,10 +37,10 @@ Index: virt-manager-4.1.0/virtinst/install/installer.py
def _build_xml(self, guest, meter):
initial_xml = None
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cdrom-url.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-cdrom-url.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-cdrom-url.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-cdrom-url.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-cdrom-url.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-cdrom-url.xml
@@ -24,6 +24,7 @@
</source>
<target dev="hda" bus="ide"/>
@ -47,10 +49,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cdrom-url.xml
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-memory-hotplug.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-memory-hotplug.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-memory-hotplug.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-memory-hotplug.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-memory-hotplug.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-memory-hotplug.xml
@@ -35,7 +35,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -60,10 +62,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-memory-hotplug.xml
<source file="/var/lib/libvirt/images/fedora.qcow2"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cdrom-double.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-cdrom-double.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-cdrom-double.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-cdrom-double.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-cdrom-double.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-cdrom-double.xml
@@ -22,6 +22,7 @@
<disk type="file" device="disk">
<source file="/var/lib/libvirt/images/vm1.qcow2"/>
@ -72,10 +74,58 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cdrom-double.xml
</disk>
<disk type="file" device="cdrom">
<source file="/pool-dir/testvol1.img"/>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-default.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-default.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-cloud-init-default.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-default.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-cloud-init-default.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-default.xml
@@ -33,6 +33,7 @@
<driver name="qemu" type="qcow2"/>
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
+ <driver cache="unsafe"/>
</disk>
<controller type="usb" model="qemu-xhci" ports="15"/>
<controller type="pci" model="pcie-root"/>
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-options1.xml
===================================================================
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-cloud-init-options1.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-options1.xml
@@ -44,6 +44,7 @@ chpasswd:
<driver name="qemu" type="qcow2"/>
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
+ <driver cache="unsafe"/>
</disk>
<controller type="usb" model="qemu-xhci" ports="15"/>
<controller type="pci" model="pcie-root"/>
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-options2.xml
===================================================================
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-cloud-init-options2.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-options2.xml
@@ -39,6 +39,7 @@ ssh_authorized_keys:
<disk type="file" device="disk">
<source file="/pool-dir/testvol1.img"/>
<target dev="hda" bus="ide"/>
+ <driver cache="unsafe"/>
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-options3.xml
===================================================================
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-cloud-init-options3.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-options3.xml
@@ -33,6 +33,7 @@ users:
<disk type="file" device="disk">
<source file="/pool-dir/testvol1.img"/>
<target dev="hda" bus="ide"/>
+ <driver cache="unsafe"/>
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-options4.xml
===================================================================
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-cloud-init-options4.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-options4.xml
@@ -26,6 +26,7 @@
<disk type="file" device="disk">
<source file="/pool-dir/testvol1.img"/>
@ -84,46 +134,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-default
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-options1.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-options5.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-cloud-init-options1.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-options1.xml
@@ -37,6 +37,7 @@ chpasswd:
<disk type="file" device="disk">
<source file="/pool-dir/testvol1.img"/>
<target dev="hda" bus="ide"/>
+ <driver cache="unsafe"/>
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-options2.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-cloud-init-options2.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-options2.xml
@@ -37,6 +37,7 @@ users:
<disk type="file" device="disk">
<source file="/pool-dir/testvol1.img"/>
<target dev="hda" bus="ide"/>
+ <driver cache="unsafe"/>
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-options3.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-cloud-init-options3.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-options3.xml
@@ -32,6 +32,7 @@ users:
<disk type="file" device="disk">
<source file="/pool-dir/testvol1.img"/>
<target dev="hda" bus="ide"/>
+ <driver cache="unsafe"/>
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-options4.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-cloud-init-options4.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-options4.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-cloud-init-options5.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-cloud-init-options5.xml
@@ -26,6 +26,7 @@
<disk type="file" device="disk">
<source file="/pool-dir/testvol1.img"/>
@ -132,22 +146,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-options
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-options5.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-osinfo-multiple-short-id.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-cloud-init-options5.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-cloud-init-options5.xml
@@ -26,6 +26,7 @@
<disk type="file" device="disk">
<source file="/pool-dir/testvol1.img"/>
<target dev="hda" bus="ide"/>
+ <driver cache="unsafe"/>
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-multiple-short-id.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-osinfo-multiple-short-id.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-multiple-short-id.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-osinfo-multiple-short-id.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-osinfo-multiple-short-id.xml
@@ -31,7 +31,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -157,10 +159,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-multiple-sh
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-url-with-disk.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-osinfo-url-with-disk.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-osinfo-url-with-disk.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-url-with-disk.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-osinfo-url-with-disk.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-osinfo-url-with-disk.xml
@@ -32,7 +32,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -170,11 +172,11 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-url-with-di
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-win7-unattended.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-osinfo-win7-unattended.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-osinfo-win7-unattended.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-win7-unattended.xml
@@ -36,7 +36,7 @@
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-osinfo-win7-unattended.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-osinfo-win7-unattended.xml
@@ -45,7 +45,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type="file" device="cdrom">
@ -183,10 +185,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-win7-unatte
<source file="TESTSUITE_SCRUBBED/tests/data/fakemedia/fake-win7.iso"/>
<target dev="sda" bus="sata"/>
<readonly/>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-osvariant-defaults-pxe.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-osvariant-defaults-pxe.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-osvariant-defaults-pxe.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-osvariant-defaults-pxe.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-osvariant-defaults-pxe.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-osvariant-defaults-pxe.xml
@@ -28,6 +28,7 @@
<disk type="file" device="disk">
<source file="/var/lib/libvirt/images/fedora26.qcow2"/>
@ -195,10 +197,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-osvariant-defaults
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-reinstall-location.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-reinstall-location.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-reinstall-location.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-reinstall-location.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-reinstall-location.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-reinstall-location.xml
@@ -22,7 +22,7 @@
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
@ -208,10 +210,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-reinstall-location
<source file="/pool-dir/test-clone-simple.img"/>
<target dev="hda" bus="ide"/>
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-reinstall-pxe.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-reinstall-pxe.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-reinstall-pxe.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-reinstall-pxe.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-reinstall-pxe.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-reinstall-pxe.xml
@@ -21,7 +21,7 @@
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
@ -221,11 +223,11 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-reinstall-pxe.xml
<source file="/pool-dir/test-clone-simple.img"/>
<target dev="hda" bus="ide"/>
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-w2k3-cdrom.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-w2k3-cdrom.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-w2k3-cdrom.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-w2k3-cdrom.xml
@@ -35,6 +35,7 @@
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-w2k3-cdrom.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-w2k3-cdrom.xml
@@ -30,6 +30,7 @@
<disk type="file" device="disk">
<source file="/pool-dir/testvol1.img"/>
<target dev="hda" bus="ide"/>
@ -233,10 +235,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-w2k3-cdrom.xml
</disk>
<disk type="file" device="cdrom">
<source file="/pool-dir/testvol2.img"/>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-cdrom.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-aarch64-cdrom.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-aarch64-cdrom.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-cdrom.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-aarch64-cdrom.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-aarch64-cdrom.xml
@@ -26,7 +26,7 @@
<devices>
<emulator>/usr/bin/qemu-system-aarch64</emulator>
@ -246,10 +248,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-aarch64-cdrom.xml
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cdrom-centos-label.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-cdrom-centos-label.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-cdrom-centos-label.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-cdrom-centos-label.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-cdrom-centos-label.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-cdrom-centos-label.xml
@@ -32,7 +32,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -259,10 +261,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-cdrom-centos-label
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-centos7.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-centos7.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-kvm-centos7.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-centos7.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-kvm-centos7.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-centos7.xml
@@ -32,7 +32,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -272,10 +274,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-centos7.xml
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-cpu-default-fallback.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-cpu-default-fallback.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-kvm-cpu-default-fallback.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-cpu-default-fallback.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-kvm-cpu-default-fallback.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-cpu-default-fallback.xml
@@ -34,7 +34,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -285,10 +287,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-cpu-default-fa
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-cpu-hostmodel-fallback.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-cpu-hostmodel-fallback.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-kvm-cpu-hostmodel-fallback.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-cpu-hostmodel-fallback.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-kvm-cpu-hostmodel-fallback.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-cpu-hostmodel-fallback.xml
@@ -32,7 +32,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -298,10 +300,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-cpu-hostmodel-
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-fedoralatest-url.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-fedoralatest-url.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-kvm-fedoralatest-url.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-fedoralatest-url.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-kvm-fedoralatest-url.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-fedoralatest-url.xml
@@ -33,7 +33,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -311,10 +313,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-fedoralatest-u
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-rhel5.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-rhel5.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-kvm-rhel5.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-rhel5.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-kvm-rhel5.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-rhel5.xml
@@ -32,7 +32,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -324,10 +326,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-rhel5.xml
<source file="/pool-dir/testvol1.img"/>
<target dev="hda" bus="ide"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-rhel6.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-rhel6.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-kvm-rhel6.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-rhel6.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-kvm-rhel6.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-rhel6.xml
@@ -33,7 +33,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -337,10 +339,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-rhel6.xml
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-rhel7.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-rhel7.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-kvm-rhel7.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-rhel7.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-kvm-rhel7.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-rhel7.xml
@@ -33,7 +33,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -350,10 +352,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-rhel7.xml
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-session-defaults.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-session-defaults.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-kvm-session-defaults.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-session-defaults.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-kvm-session-defaults.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-session-defaults.xml
@@ -32,7 +32,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -363,11 +365,11 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-session-defaul
<source file="/tmp/.local/share/libvirt/images/fedora21.qcow2"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-win10.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-win10.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-kvm-win10.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-win10.xml
@@ -38,7 +38,7 @@
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-kvm-win10.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-win10.xml
@@ -47,7 +47,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type="file" device="disk">
@ -376,11 +378,11 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-win10.xml
<source file="/pool-dir/testvol1.img"/>
<target dev="sda" bus="sata"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-win2k3-cdrom.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-win2k3-cdrom.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-kvm-win2k3-cdrom.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-win2k3-cdrom.xml
@@ -38,7 +38,7 @@
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-kvm-win2k3-cdrom.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-kvm-win2k3-cdrom.xml
@@ -47,7 +47,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type="file" device="disk">
@ -389,10 +391,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-kvm-win2k3-cdrom.x
<source file="/pool-dir/testvol1.img"/>
<target dev="hda" bus="ide"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-linux2020.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-linux2020.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-linux2020.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-linux2020.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-linux2020.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-linux2020.xml
@@ -32,7 +32,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -402,10 +404,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-linux2020.xml
<source file="/var/lib/libvirt/images/linux2020.qcow2"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-location-iso.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-location-iso.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-location-iso.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-location-iso.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-location-iso.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-location-iso.xml
@@ -32,7 +32,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -415,10 +417,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-location-iso.xml
<source file="/pool-dir/testvol1.img"/>
<target dev="vda" bus="virtio"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-location-manual-kernel.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-location-manual-kernel.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-location-manual-kernel.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-location-manual-kernel.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-location-manual-kernel.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-location-manual-kernel.xml
@@ -27,7 +27,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -428,10 +430,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-location-manual-ke
<source file="TESTSUITE_SCRUBBED/tests/data/fakemedia/fake-no-osinfo.iso"/>
<target dev="hda" bus="ide"/>
<readonly/>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-netinst-unattended.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-osinfo-netinst-unattended.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-osinfo-netinst-unattended.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-netinst-unattended.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-osinfo-netinst-unattended.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-osinfo-netinst-unattended.xml
@@ -32,7 +32,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -441,10 +443,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-osinfo-netinst-una
<source file="TESTSUITE_SCRUBBED/tests/data/fakemedia/fake-f26-netinst.iso"/>
<target dev="sda" bus="sata"/>
<readonly/>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-q35-defaults.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-q35-defaults.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-q35-defaults.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-q35-defaults.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-q35-defaults.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-q35-defaults.xml
@@ -27,7 +27,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
@ -454,10 +456,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-q35-defaults.xml
<source file="/pool-dir/testvol1.img"/>
<target dev="sda" bus="sata"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-remote-storage.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-remote-storage.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-remote-storage.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-remote-storage.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-remote-storage.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-remote-storage.xml
@@ -22,6 +22,7 @@
<disk type="file" device="disk">
<source file="/foo/bar/baz"/>
@ -466,11 +468,11 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-remote-storage.xml
</disk>
<disk type="block" device="disk">
<source dev="/dev/zde"/>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-unattended-remote-cdrom.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-unattended-remote-cdrom.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-unattended-remote-cdrom.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-unattended-remote-cdrom.xml
@@ -32,6 +32,7 @@
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-unattended-remote-cdrom.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-unattended-remote-cdrom.xml
@@ -27,6 +27,7 @@
<source file="/pool-dir/testvol1.img"/>
<target dev="hda" bus="ide"/>
<readonly/>
@ -478,11 +480,11 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-unattended-remote-
</disk>
<controller type="usb" model="ich9-ehci1"/>
<controller type="usb" model="ich9-uhci1">
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-win7-uefi.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-win7-uefi.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-win7-uefi.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-win7-uefi.xml
@@ -40,7 +40,7 @@
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-win7-uefi.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-win7-uefi.xml
@@ -49,7 +49,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type="file" device="disk">
@ -491,10 +493,10 @@ Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-win7-uefi.xml
<source file="/pool-dir/testvol1.img"/>
<target dev="sda" bus="sata"/>
</disk>
Index: virt-manager-4.1.0/tests/data/cli/compare/virt-install-xen-pv.xml
Index: virt-manager-4.2.0/tests/data/cli/compare/virt-install-xen-pv.xml
===================================================================
--- virt-manager-4.1.0.orig/tests/data/cli/compare/virt-install-xen-pv.xml
+++ virt-manager-4.1.0/tests/data/cli/compare/virt-install-xen-pv.xml
--- virt-manager-4.2.0.orig/tests/data/cli/compare/virt-install-xen-pv.xml
+++ virt-manager-4.2.0/tests/data/cli/compare/virt-install-xen-pv.xml
@@ -16,7 +16,7 @@
</os>
<devices>

View File

@ -1,11 +1,11 @@
References: bsc#1172356, bsc#1177620
Libvirt doesn't accept "Hypervisor default" as a model name
Index: virt-manager-4.0.0/virtinst/devices/interface.py
Index: virt-manager-4.2.0/virtinst/devices/interface.py
===================================================================
--- virt-manager-4.0.0.orig/virtinst/devices/interface.py
+++ virt-manager-4.0.0/virtinst/devices/interface.py
@@ -305,6 +305,9 @@ class DeviceInterface(Device):
--- virt-manager-4.2.0.orig/virtinst/devices/interface.py
+++ virt-manager-4.2.0/virtinst/devices/interface.py
@@ -365,6 +365,9 @@ class DeviceInterface(Device):
return "e1000e"
if not guest.os.is_x86():
return None

View File

@ -1,11 +1,11 @@
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-4.1.0/virtinst/guest.py
Index: virt-manager-4.2.0/virtinst/guest.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/guest.py
+++ virt-manager-4.1.0/virtinst/guest.py
@@ -802,6 +802,10 @@ class Guest(XMLBuilder):
--- virt-manager-4.2.0.orig/virtinst/guest.py
+++ virt-manager-4.2.0/virtinst/guest.py
@@ -991,6 +991,10 @@ class Guest(XMLBuilder):
self._add_default_tpm()
self.clock.set_defaults(self)

View File

@ -1,10 +1,10 @@
References: bsc#1180069
Index: virt-manager-4.1.0/virtinst/guest.py
Index: virt-manager-4.2.0/virtinst/guest.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/guest.py
+++ virt-manager-4.1.0/virtinst/guest.py
@@ -711,6 +711,8 @@ class Guest(XMLBuilder):
--- virt-manager-4.2.0.orig/virtinst/guest.py
+++ virt-manager-4.2.0/virtinst/guest.py
@@ -737,6 +737,8 @@ class Guest(XMLBuilder):
self.type != "kvm"):
log.warning( # pragma: no cover
"KVM acceleration not available, using '%s'", self.type)

View File

@ -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-4.1.0/virtinst/devices/disk.py
Index: virt-manager-4.2.0/virtinst/devices/disk.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/devices/disk.py
+++ virt-manager-4.1.0/virtinst/devices/disk.py
@@ -533,7 +533,8 @@ class DeviceDisk(Device):
--- virt-manager-4.2.0.orig/virtinst/devices/disk.py
+++ virt-manager-4.2.0/virtinst/devices/disk.py
@@ -566,7 +566,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

View File

@ -4,11 +4,11 @@ issue on btrfs.
Signed-off-by: Chunyan Liu <cyliu@suse.com>
Index: virt-manager-4.1.0/virtinst/storage.py
Index: virt-manager-4.2.0/virtinst/storage.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/storage.py
+++ virt-manager-4.1.0/virtinst/storage.py
@@ -567,6 +567,11 @@ class StorageVolume(_StorageObject):
--- virt-manager-4.2.0.orig/virtinst/storage.py
+++ virt-manager-4.2.0/virtinst/storage.py
@@ -572,6 +572,11 @@ class StorageVolume(_StorageObject):
return self._pool_xml.get_disk_type()
file_type = property(_get_vol_type)
@ -20,11 +20,11 @@ Index: virt-manager-4.1.0/virtinst/storage.py
##################
# XML properties #
Index: virt-manager-4.1.0/virtinst/support.py
Index: virt-manager-4.2.0/virtinst/support.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/support.py
+++ virt-manager-4.1.0/virtinst/support.py
@@ -269,6 +269,7 @@ class SupportCache:
--- virt-manager-4.2.0.orig/virtinst/support.py
+++ virt-manager-4.2.0/virtinst/support.py
@@ -267,6 +267,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})
conn_riscv_virt_pci_default = _make(version="5.3.0", hv_version={"qemu": "4.0.0"})

View File

@ -4,9 +4,11 @@ so libosinfo can't really tell them apart.
This hack after detecting a windows ISO just looks at the
ISO filename for an extra clue.
--- virt-manager-3.2.0/virtinst/install/installer.py.orig 2022-01-20 15:40:27.849623677 -0700
+++ virt-manager-3.2.0/virtinst/install/installer.py 2022-01-20 15:42:22.229628567 -0700
@@ -541,6 +541,14 @@ class Installer(object):
Index: virt-manager-4.2.0/virtinst/install/installer.py
===================================================================
--- virt-manager-4.2.0.orig/virtinst/install/installer.py
+++ virt-manager-4.2.0/virtinst/install/installer.py
@@ -545,6 +545,14 @@ class Installer(object):
osguess = OSDB.guess_os_by_iso(self.cdrom)
if osguess:
ret = osguess[0]

View File

@ -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-4.1.0/virtinst/devices/disk.py
Index: virt-manager-4.2.0/virtinst/devices/disk.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/devices/disk.py
+++ virt-manager-4.1.0/virtinst/devices/disk.py
@@ -550,6 +550,10 @@ class DeviceDisk(Device):
--- virt-manager-4.2.0.orig/virtinst/devices/disk.py
+++ virt-manager-4.2.0/virtinst/devices/disk.py
@@ -583,6 +583,10 @@ class DeviceDisk(Device):
https://lists.gnu.org/archive/html/qemu-devel/2008-04/msg00675.html
"""
if self.driver_name != self.DRIVER_NAME_QEMU:

View File

@ -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-4.1.0/virtinst/devices/disk.py
Index: virt-manager-4.2.0/virtinst/devices/disk.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/devices/disk.py
+++ virt-manager-4.1.0/virtinst/devices/disk.py
@@ -903,6 +903,17 @@ class DeviceDisk(Device):
--- virt-manager-4.2.0.orig/virtinst/devices/disk.py
+++ virt-manager-4.2.0/virtinst/devices/disk.py
@@ -941,6 +941,17 @@ class DeviceDisk(Device):
:returns: generated target
"""
prefix, maxnode = self.get_target_prefix()
@ -28,7 +28,7 @@ Index: virt-manager-4.1.0/virtinst/devices/disk.py
skip_targets = [t for t in skip_targets if t and t.startswith(prefix)]
skip_targets.sort()
@@ -910,11 +921,18 @@ class DeviceDisk(Device):
@@ -948,11 +959,18 @@ class DeviceDisk(Device):
first_found = None
for i in range(maxnode):

View File

@ -1,10 +1,10 @@
References: bsc#1196806, jsc#SLE-18834
Index: virt-manager-4.1.0/ui/details.ui
Index: virt-manager-4.2.0/ui/details.ui
===================================================================
--- virt-manager-4.1.0.orig/ui/details.ui
+++ virt-manager-4.1.0/ui/details.ui
@@ -1925,7 +1925,20 @@
--- virt-manager-4.2.0.orig/ui/details.ui
+++ virt-manager-4.2.0/ui/details.ui
@@ -1927,7 +1927,20 @@
</packing>
</child>
<child>
@ -26,10 +26,10 @@ Index: virt-manager-4.1.0/ui/details.ui
</child>
</object>
<packing>
Index: virt-manager-4.1.0/virtManager/details/details.py
Index: virt-manager-4.2.0/virtManager/details/details.py
===================================================================
--- virt-manager-4.1.0.orig/virtManager/details/details.py
+++ virt-manager-4.1.0/virtManager/details/details.py
--- virt-manager-4.2.0.orig/virtManager/details/details.py
+++ virt-manager-4.2.0/virtManager/details/details.py
@@ -49,6 +49,7 @@ from ..delete import vmmDeleteStorage
EDIT_MEM,
@ -80,11 +80,11 @@ Index: virt-manager-4.1.0/virtManager/details/details.py
shared_mem, shared_mem_err = self.vm.has_shared_mem()
self.widget("shared-memory").set_active(shared_mem)
self.widget("shared-memory").set_sensitive(not bool(shared_mem_err))
Index: virt-manager-4.1.0/virtManager/object/domain.py
Index: virt-manager-4.2.0/virtManager/object/domain.py
===================================================================
--- virt-manager-4.1.0.orig/virtManager/object/domain.py
+++ virt-manager-4.1.0/virtManager/object/domain.py
@@ -706,15 +706,33 @@ class vmmDomain(vmmLibvirtObject):
--- virt-manager-4.2.0.orig/virtManager/object/domain.py
+++ virt-manager-4.2.0/virtManager/object/domain.py
@@ -675,15 +675,33 @@ class vmmDomain(vmmLibvirtObject):
guest.memoryBacking.access_mode = access_mode
def define_memory(self, memory=_SENTINEL, maxmem=_SENTINEL,
@ -119,7 +119,7 @@ Index: virt-manager-4.1.0/virtManager/object/domain.py
self._redefine_xmlobj(guest)
@@ -1328,6 +1346,9 @@ class vmmDomain(vmmLibvirtObject):
@@ -1310,6 +1328,9 @@ class vmmDomain(vmmLibvirtObject):
def get_description(self):
return self.get_xmlobj().description
@ -129,10 +129,10 @@ Index: virt-manager-4.1.0/virtManager/object/domain.py
def get_boot_order(self):
legacy = not self.can_use_device_boot_order()
return self.xmlobj.get_boot_order(legacy=legacy)
Index: virt-manager-4.1.0/virtinst/domain/memorybacking.py
Index: virt-manager-4.2.0/virtinst/domain/memorybacking.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/domain/memorybacking.py
+++ virt-manager-4.1.0/virtinst/domain/memorybacking.py
--- virt-manager-4.2.0.orig/virtinst/domain/memorybacking.py
+++ virt-manager-4.2.0/virtinst/domain/memorybacking.py
@@ -27,6 +27,9 @@ class DomainMemoryBacking(XMLBuilder):
XML_NAME = "memoryBacking"
_XML_PROP_ORDER = ["hugepages", "nosharepages", "locked", "pages"]
@ -143,10 +143,10 @@ Index: virt-manager-4.1.0/virtinst/domain/memorybacking.py
hugepages = XMLProperty("./hugepages", is_bool=True)
nosharepages = XMLProperty("./nosharepages", is_bool=True)
locked = XMLProperty("./locked", is_bool=True)
Index: virt-manager-4.1.0/virtinst/domcapabilities.py
Index: virt-manager-4.2.0/virtinst/domcapabilities.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/domcapabilities.py
+++ virt-manager-4.1.0/virtinst/domcapabilities.py
--- virt-manager-4.2.0.orig/virtinst/domcapabilities.py
+++ virt-manager-4.2.0/virtinst/domcapabilities.py
@@ -93,6 +93,9 @@ def _make_capsblock(xml_root_name):
class _SEV(XMLBuilder):
XML_NAME = "sev"
@ -157,7 +157,7 @@ Index: virt-manager-4.1.0/virtinst/domcapabilities.py
maxESGuests = XMLProperty("./maxESGuests")
@@ -406,6 +409,9 @@ class DomainCapabilities(XMLBuilder):
@@ -415,6 +418,9 @@ class DomainCapabilities(XMLBuilder):
self.features.sev.maxESGuests)
return bool(self.features.sev.supported)
@ -167,12 +167,12 @@ Index: virt-manager-4.1.0/virtinst/domcapabilities.py
def supports_video_bochs(self):
"""
Returns False if either libvirt or qemu do not have support to bochs
Index: virt-manager-4.1.0/virtinst/domain/launch_security.py
Index: virt-manager-4.2.0/virtinst/domain/launch_security.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/domain/launch_security.py
+++ virt-manager-4.1.0/virtinst/domain/launch_security.py
@@ -19,8 +19,12 @@ class DomainLaunchSecurity(XMLBuilder):
kernelHashes = XMLProperty("./@kernelHashes", is_yesno=True)
--- virt-manager-4.2.0.orig/virtinst/domain/launch_security.py
+++ virt-manager-4.2.0/virtinst/domain/launch_security.py
@@ -25,8 +25,12 @@ class DomainLaunchSecurity(XMLBuilder):
vcek = XMLProperty("./@vcek", is_yesno=True)
def _set_defaults_sev(self, guest):
- if not guest.os.is_q35() or not guest.is_uefi():
@ -186,25 +186,25 @@ Index: virt-manager-4.1.0/virtinst/domain/launch_security.py
# The 'policy' is a mandatory 4-byte argument for the SEV firmware.
# If missing, we use 0x03 for the original SEV implementation and
Index: virt-manager-4.1.0/virtinst/devices/interface.py
Index: virt-manager-4.2.0/virtinst/devices/interface.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/devices/interface.py
+++ virt-manager-4.1.0/virtinst/devices/interface.py
@@ -287,6 +287,9 @@ class DeviceInterface(Device):
self.type = nettype
self.source = source
--- virt-manager-4.2.0.orig/virtinst/devices/interface.py
+++ virt-manager-4.2.0/virtinst/devices/interface.py
@@ -310,6 +310,9 @@ class DeviceInterface(Device):
portForward = XMLChildProperty(_PortForward)
+ def set_rom_bar(self, value):
+ self.rom_bar = value
+
##################
# Default config #
Index: virt-manager-4.1.0/virtManager/addhardware.py
#############
# Build API #
Index: virt-manager-4.2.0/virtManager/addhardware.py
===================================================================
--- virt-manager-4.1.0.orig/virtManager/addhardware.py
+++ virt-manager-4.1.0/virtManager/addhardware.py
@@ -1444,6 +1444,9 @@ class vmmAddHardware(vmmGObjectUI):
--- virt-manager-4.2.0.orig/virtManager/addhardware.py
+++ virt-manager-4.2.0/virtManager/addhardware.py
@@ -1429,6 +1429,9 @@ class vmmAddHardware(vmmGObjectUI):
mac = self.widget("create-mac-address").get_text()
dev = self._netlist.build_device(mac, model)

View File

@ -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.3.0/virtManager/createvm.py
Index: virt-manager-4.2.0/virtManager/createvm.py
===================================================================
--- virt-manager-3.3.0.orig/virtManager/createvm.py
+++ virt-manager-3.3.0/virtManager/createvm.py
@@ -869,11 +869,6 @@ class vmmCreateVM(vmmGObjectUI):
--- virt-manager-4.2.0.orig/virtManager/createvm.py
+++ virt-manager-4.2.0/virtManager/createvm.py
@@ -866,11 +866,6 @@ class vmmCreateVM(vmmGObjectUI):
for guest in self.conn.caps.guests:
if guest.os_type == self._capsinfo.os_type:
archs.append(guest.arch)

View File

@ -1,7 +1,7 @@
Index: virt-manager-3.3.0/data/virt-manager.desktop.in
Index: virt-manager-4.1.0/data/virt-manager.desktop.in
===================================================================
--- virt-manager-3.3.0.orig/data/virt-manager.desktop.in
+++ virt-manager-3.3.0/data/virt-manager.desktop.in
--- virt-manager-4.1.0.orig/data/virt-manager.desktop.in
+++ virt-manager-4.1.0/data/virt-manager.desktop.in
@@ -1,9 +1,20 @@
[Desktop Entry]
Name=Virtual Machine Manager
@ -14,9 +14,8 @@ Index: virt-manager-3.3.0/data/virt-manager.desktop.in
Type=Application
Terminal=false
Keywords=vmm;
-Categories=System;
+Encoding=UTF-8
+Categories=GTK;GNOME;System;Monitor;X-SuSE-YaST;X-SuSE-YaST-Virtualization;
Categories=System;
+X-KDE-ModuleType=Library
+X-KDE-RootOnly=true
+X-KDE-HasReadOnlyMode=false

View File

@ -4,11 +4,11 @@ in this patch anyways to correctly set up a bus if a floppy were
added.
Index: virt-manager-4.1.0/virtManager/addhardware.py
Index: virt-manager-4.2.0/virtManager/addhardware.py
===================================================================
--- virt-manager-4.1.0.orig/virtManager/addhardware.py
+++ virt-manager-4.1.0/virtManager/addhardware.py
@@ -490,6 +490,9 @@ class vmmAddHardware(vmmGObjectUI):
--- virt-manager-4.2.0.orig/virtManager/addhardware.py
+++ virt-manager-4.2.0/virtManager/addhardware.py
@@ -489,6 +489,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-4.1.0/virtManager/addhardware.py
bus_map = {
"disk": ["ide", "sata", "scsi", "sd", "usb", "virtio", "xen"],
@@ -509,6 +512,7 @@ class vmmAddHardware(vmmGObjectUI):
@@ -508,6 +511,7 @@ class vmmAddHardware(vmmGObjectUI):
"usb": _("USB"),
"virtio": _("VirtIO"),
"xen": _("Xen"),
@ -26,7 +26,7 @@ Index: virt-manager-4.1.0/virtManager/addhardware.py
}
return bus_mappings.get(bus, bus)
@@ -676,8 +680,9 @@ class vmmAddHardware(vmmGObjectUI):
@@ -665,8 +669,9 @@ class vmmAddHardware(vmmGObjectUI):
"drive-harddisk", _("Disk device")])
target_model.append([DeviceDisk.DEVICE_CDROM,
"media-optical", _("CDROM device")])

View File

@ -1,18 +0,0 @@
Index: virt-manager-3.2.0/virtManager/xmleditor.py
===================================================================
--- virt-manager-3.2.0.orig/virtManager/xmleditor.py
+++ virt-manager-3.2.0/virtManager/xmleditor.py
@@ -7,12 +7,7 @@ import gi
from virtinst import log
# We can use either gtksourceview3 or gtksourceview4
-try:
- gi.require_version("GtkSource", "4")
- log.debug("Using GtkSource 4")
-except ValueError: # pragma: no cover
- gi.require_version("GtkSource", "3.0")
- log.debug("Using GtkSource 3.0")
+gi.require_version("GtkSource", "3.0")
from gi.repository import GtkSource
from .lib import uiutil

View File

@ -1,8 +1,10 @@
References: bsc#1213790
--- virt-manager-4.1.0/ui/details.ui.orig 2023-07-31 10:58:34.089070956 -0600
+++ virt-manager-4.1.0/ui/details.ui 2023-07-31 10:59:05.625072305 -0600
@@ -808,7 +808,7 @@
Index: virt-manager-4.1.0/ui/details.ui
===================================================================
--- virt-manager-4.1.0.orig/ui/details.ui
+++ virt-manager-4.1.0/ui/details.ui
@@ -810,7 +810,7 @@
</child>
</object>
<packing>

View File

@ -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-4.0.0/virtManager/object/domain.py
Index: virt-manager-4.2.0/virtManager/object/domain.py
===================================================================
--- virt-manager-4.0.0.orig/virtManager/object/domain.py
+++ virt-manager-4.0.0/virtManager/object/domain.py
@@ -1620,7 +1620,8 @@ class vmmDomain(vmmLibvirtObject):
--- virt-manager-4.2.0.orig/virtManager/object/domain.py
+++ virt-manager-4.2.0/virtManager/object/domain.py
@@ -1603,7 +1603,8 @@ class vmmDomain(vmmLibvirtObject):
return (self.is_stoppable() or
self.status() in [libvirt.VIR_DOMAIN_CRASHED])
def is_runable(self):

View File

@ -11,11 +11,11 @@ libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 2023
Cannot get 'write' permission without 'resize': Image size is not a multiple of request alignment
Index: virt-manager-4.1.0/virtManager/createvol.py
Index: virt-manager-4.1.1/virtManager/createvol.py
===================================================================
--- virt-manager-4.1.0.orig/virtManager/createvol.py
+++ virt-manager-4.1.0/virtManager/createvol.py
@@ -246,7 +246,13 @@ class vmmCreateVolume(vmmGObjectUI):
--- virt-manager-4.1.1.orig/virtManager/createvol.py
+++ virt-manager-4.1.1/virtManager/createvol.py
@@ -248,7 +248,13 @@ class vmmCreateVolume(vmmGObjectUI):
vol = self._make_stub_vol()
vol.name = volname
vol.capacity = (cap * 1024 * 1024 * 1024)
@ -29,11 +29,11 @@ Index: virt-manager-4.1.0/virtManager/createvol.py
if backing:
vol.backing_store = backing
if fmt:
Index: virt-manager-4.1.0/virtinst/devices/disk.py
Index: virt-manager-4.1.1/virtinst/devices/disk.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/devices/disk.py
+++ virt-manager-4.1.0/virtinst/devices/disk.py
@@ -361,6 +361,9 @@ class DeviceDisk(Device):
--- virt-manager-4.1.1.orig/virtinst/devices/disk.py
+++ virt-manager-4.1.1/virtinst/devices/disk.py
@@ -389,6 +389,9 @@ class DeviceDisk(Device):
volname, poolobj.name())
cap = (size * 1024 * 1024 * 1024)

View File

@ -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-4.1.0/virtManager/connection.py
Index: virt-manager-4.2.0/virtManager/connection.py
===================================================================
--- virt-manager-4.1.0.orig/virtManager/connection.py
+++ virt-manager-4.1.0/virtManager/connection.py
@@ -966,7 +966,7 @@ class vmmConnection(vmmGObject):
--- virt-manager-4.2.0.orig/virtManager/connection.py
+++ virt-manager-4.2.0/virtManager/connection.py
@@ -973,7 +973,7 @@ class vmmConnection(vmmGObject):
self._add_conn_events()
try:

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
While AyatanaAppIndicator3 is available on Tumbleweed,
it is not available on SLE15.
Index: virt-manager-3.3.0/virtManager/systray.py
Index: virt-manager-4.2.0/virtManager/systray.py
===================================================================
--- virt-manager-3.3.0.orig/virtManager/systray.py
+++ virt-manager-3.3.0/virtManager/systray.py
--- virt-manager-4.2.0.orig/virtManager/systray.py
+++ virt-manager-4.2.0/virtManager/systray.py
@@ -6,7 +6,6 @@
import os
@ -13,14 +13,11 @@ Index: virt-manager-3.3.0/virtManager/systray.py
from gi.repository import Gio
from gi.repository import Gtk
@@ -17,25 +16,14 @@ from . import vmmenu
from .baseclass import vmmGObject
@@ -18,11 +17,11 @@ 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')
@ -33,14 +30,3 @@ Index: virt-manager-3.3.0/virtManager/systray.py
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