Compare commits

...

No commits in common. "c8" and "c9s" have entirely different histories.
c8 ... c9s

25 changed files with 1513 additions and 1236 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/virt-manager-3.2.0.tar.gz
/virt-manager-*.tar.gz

View File

@ -1 +0,0 @@
f620494a41f898422581846ccf38b0e4540ea54e SOURCES/virt-manager-3.2.0.tar.gz

View File

@ -1,112 +0,0 @@
From 3e150cab1c478e1ce95f4f1466ecbac0b693e375 Mon Sep 17 00:00:00 2001
From: Jonathon Jongsma <jjongsma@redhat.com>
Date: Tue, 26 Oct 2021 14:18:40 -0500
Subject: [PATCH] Handle new nodedev name for mediated devices
libvirt recently changed the nodedev names for mediated devices due to
the fact that mdevctl supports defining multiple mediated devices with
the same UUID as long as only one is active at a time. This means that
the nodedev name changed from the format 'mdev_$UUID' to the format
'mdev_$UUID_$PARENT'.
Unfortunately, virt-install was parsing the nodedev name to extract the
UUID of a mediated device. This fails with the new name format.
Fortunately, in libvirt 7.3.0, a <uuid> field was added to the xml
schema for mdev devices, so we can simply use this instead, and fall
back to the name parsing if it doesn't exist.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
(cherry picked from commit 0c146b250384ddddcefd2cc0d76b9e808377ebe5)
https://bugzilla.redhat.com/show_bug.cgi?id=2020241
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
tests/data/testdriver/testdriver.xml | 14 ++++++++++++++
tests/test_nodedev.py | 14 ++++++++++++++
virtinst/nodedev.py | 7 +++++++
3 files changed, 35 insertions(+)
diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml
index 5875732a..e4880936 100644
--- a/tests/data/testdriver/testdriver.xml
+++ b/tests/data/testdriver/testdriver.xml
@@ -3725,4 +3725,18 @@ ba</description>
</capability>
</device>
+<device>
+ <name>mdev_35ceae7f_eea5_4f28_b7f3_7b12a3e62d3c_0000_06_00_0</name>
+ <path>/sys/devices/pci0000:00/0000:00:02.0/35ceae7f-eea5-4f28-b7f3-7b12a3e62d3c</path>
+ <parent>pci_0000_06_00_0</parent>
+ <driver>
+ <name>vfio_mdev</name>
+ </driver>
+ <capability type='mdev'>
+ <type id='nvidia-11'/>
+ <iommuGroup number='12'/>
+ <uuid>35ceae7f-eea5-4f28-b7f3-7b12a3e62d3c</uuid>
+ </capability>
+</device>
+
</node>
diff --git a/tests/test_nodedev.py b/tests/test_nodedev.py
index 79678bc8..41435262 100644
--- a/tests/test_nodedev.py
+++ b/tests/test_nodedev.py
@@ -8,6 +8,7 @@
import os.path
import pytest
+import libvirt
from virtinst import Guest
from virtinst import NodeDevice
@@ -154,6 +155,19 @@ def testPCIMdev():
assert dev.parent == "pci_0000_06_00_0"
assert dev.device_type == "mdev"
assert dev.type_id == "nvidia-11"
+ assert dev.get_mdev_uuid() == "4b20d080-1b54-4048-85b3-a6a62d165c01"
+
+# libvirt <7.3.0 doesn't support <uuid> in the mdev node device xml
+@pytest.mark.skipif(libvirt.getVersion() < 7003000, reason="libvirt version doesn't support new mdev format")
+def testPCIMdevNewFormat():
+ conn = utils.URIs.open_testdriver_cached()
+ devname = "mdev_35ceae7f_eea5_4f28_b7f3_7b12a3e62d3c_0000_06_00_0"
+ dev = _nodeDevFromName(conn, devname)
+ assert dev.name == devname
+ assert dev.parent == "pci_0000_06_00_0"
+ assert dev.device_type == "mdev"
+ assert dev.type_id == "nvidia-11"
+ assert dev.get_mdev_uuid() == "35ceae7f-eea5-4f28-b7f3-7b12a3e62d3c"
# NodeDevice 2 Device XML tests
diff --git a/virtinst/nodedev.py b/virtinst/nodedev.py
index f54a311c..248723b9 100644
--- a/virtinst/nodedev.py
+++ b/virtinst/nodedev.py
@@ -94,6 +94,12 @@ class NodeDevice(XMLBuilder):
device_type = XMLProperty("./capability/@type")
def get_mdev_uuid(self):
+ # libvirt 7.3.0 added a <uuid> element to the nodedev xml for mdev
+ # types. For older versions, we unfortunately have to parse the nodedev
+ # name, which uses the format "mdev_$UUID_WITH_UNDERSCORES"
+ if self.uuid is not None:
+ return self.uuid
+
return self.name[5:].replace('_', '-')
def compare_to_hostdev(self, hostdev):
@@ -191,6 +197,7 @@ class NodeDevice(XMLBuilder):
# type='mdev' options
type_id = XMLProperty("./capability/type/@id")
+ uuid = XMLProperty("./capability/uuid")
def _AddressStringToHostdev(conn, addrstr):
--
2.31.1

View File

@ -1,33 +0,0 @@
From b533019b5776207412ed1aa886d97ead2550695a Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Sat, 21 Nov 2020 17:17:33 -0500
Subject: [PATCH] addstorage: Don't pass None to widget.set_active()
Older pygobject can't handle it. Mentioned here:
https://github.com/virt-manager/virt-manager/issues/188
Signed-off-by: Cole Robinson <crobinso@redhat.com>
(cherry picked from commit e7222b5058c8874b15fbfd998e5eeb233f571075)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2026987
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
virtManager/device/addstorage.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virtManager/device/addstorage.py b/virtManager/device/addstorage.py
index dee0160c..49d0b693 100644
--- a/virtManager/device/addstorage.py
+++ b/virtManager/device/addstorage.py
@@ -310,7 +310,7 @@ class vmmAddStorage(vmmGObjectUI):
detect_zeroes = disk.driver_detect_zeroes
ro = disk.read_only
share = disk.shareable
- removable = disk.removable
+ removable = bool(disk.removable)
serial = disk.serial
self.set_disk_bus(disk.bus)
--
2.31.1

View File

@ -1,112 +0,0 @@
From fa5f5f8f9b2b00b7580cb55f82c17e66e54b438d Mon Sep 17 00:00:00 2001
From: Jonathon Jongsma <jjongsma@redhat.com>
Date: Tue, 11 Jan 2022 11:21:39 -0600
Subject: [PATCH] cli: add 'ioapic.driver' to --features
Add the ability to set the ioapic driver using the --features argument:
$ virt-install --features ioapic.driver=qemu ...
This results in the following xml:
<features>
...
<ioapic driver="qemu"/>
</features>
This is required in order to install a guest with >255 cpus. Such a
configuration requires an iommu with extended interrupt mode enabled,
which in turn requires IOMMU interrupt remapping to be enabled, which in
turn requires a split I/O APIC.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
(cherry picked from commit 9766beea0432faad7cded9e0285d05851659020e)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2037202
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
tests/data/cli/compare/virt-install-singleton-config-3.xml | 1 +
tests/data/xmlparse/change-guest-out.xml | 1 +
tests/test_cli.py | 2 +-
tests/test_xmlparse.py | 1 +
virtinst/cli.py | 1 +
virtinst/domain/features.py | 1 +
6 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/data/cli/compare/virt-install-singleton-config-3.xml b/tests/data/cli/compare/virt-install-singleton-config-3.xml
index d2e7a363..a36c7bf2 100644
--- a/tests/data/cli/compare/virt-install-singleton-config-3.xml
+++ b/tests/data/cli/compare/virt-install-singleton-config-3.xml
@@ -73,6 +73,7 @@
<pvspinlock state="off"/>
<smm state="off"/>
<vmcoreinfo state="on"/>
+ <ioapic driver="qemu"/>
</features>
<cpu>
<topology sockets="1" cores="3" threads="2"/>
diff --git a/tests/data/xmlparse/change-guest-out.xml b/tests/data/xmlparse/change-guest-out.xml
index 17af0826..3faf8783 100644
--- a/tests/data/xmlparse/change-guest-out.xml
+++ b/tests/data/xmlparse/change-guest-out.xml
@@ -32,6 +32,7 @@
<hidden state="on"/>
</kvm>
<pvspinlock state="on"/>
+ <ioapic driver="qemu"/>
</features>
<numatune>
<memory nodeset="2,4,6"/>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 9f0cdfe9..75a891f0 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -558,7 +558,7 @@ c.add_compare("""
--vcpus vcpu.current=3,maxvcpus=4,vcpu.placement=auto
--memory hotplugmemorymax=2048,hotplugmemoryslots=2
--disk none
---features apic.eoi=off,hap=on,hyperv.synic.state=on,hyperv.reset.state=off,hyperv.spinlocks.state=on,hyperv.spinlocks.retries=5678,pae=on,pmu.state=on,pvspinlock.state=off,smm.state=off,viridian=on,vmcoreinfo.state=on,vmport.state=off,kvm.hidden.state=on,hyperv.vapic.state=off,hyperv.relaxed.state=off,gic.version=host,kvm.hint-dedicated.state=on
+--features apic.eoi=off,hap=on,hyperv.synic.state=on,hyperv.reset.state=off,hyperv.spinlocks.state=on,hyperv.spinlocks.retries=5678,pae=on,pmu.state=on,pvspinlock.state=off,smm.state=off,viridian=on,vmcoreinfo.state=on,vmport.state=off,kvm.hidden.state=on,hyperv.vapic.state=off,hyperv.relaxed.state=off,gic.version=host,kvm.hint-dedicated.state=on,ioapic.driver=qemu
--clock rtc_present=no,pit_present=yes,pit_tickpolicy=catchup,tsc_present=no,platform_present=no,hypervclock_present=no,platform_tickpolicy=foo,hpet_tickpolicy=bar,tsc_tickpolicy=wibble,kvmclock_tickpolicy=wobble,hypervclock_tickpolicy=woo
--boot bios.useserial=no,bios.rebootTimeout=60,cmdline=root=/foo,smbios.mode=host,bootmenu.enable=yes,loader_ro=yes,loader.type=rom,loader=/tmp/foo
--memorybacking access.mode=shared,source.type=anonymous,hugepages=on
diff --git a/tests/test_xmlparse.py b/tests/test_xmlparse.py
index 6d1aaddb..ac2fb38d 100644
--- a/tests/test_xmlparse.py
+++ b/tests/test_xmlparse.py
@@ -160,6 +160,7 @@ def testAlterGuest():
check("kvm_hidden", None, True)
check("pvspinlock", None, True)
check("gic_version", None, False)
+ check("ioapic_driver", None, "qemu")
check = _make_checker(guest.cpu)
check("match", "exact", "strict")
diff --git a/virtinst/cli.py b/virtinst/cli.py
index e1a988f9..dbd4a545 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -2777,6 +2777,7 @@ class ParserFeatures(VirtCLIParser):
cls.add_arg("smm.state", "smm", is_onoff=True)
cls.add_arg("vmcoreinfo.state", "vmcoreinfo", is_onoff=True)
+ cls.add_arg("ioapic.driver", "ioapic_driver")
###################
diff --git a/virtinst/domain/features.py b/virtinst/domain/features.py
index 246839f2..7d32edc0 100644
--- a/virtinst/domain/features.py
+++ b/virtinst/domain/features.py
@@ -41,6 +41,7 @@ class DomainFeatures(XMLBuilder):
smm = XMLProperty("./smm/@state", is_onoff=True)
vmcoreinfo = XMLProperty("./vmcoreinfo/@state", is_onoff=True)
+ ioapic_driver = XMLProperty("./ioapic/@driver")
##################
--
2.34.1

View File

@ -1,71 +0,0 @@
From c1da35159c20e0d633f6c568bb984311a4fed861 Mon Sep 17 00:00:00 2001
From: Pavel Hrdina <phrdina@redhat.com>
Date: Tue, 14 Sep 2021 17:08:35 +0200
Subject: [PATCH] cli: introduce --resource fibrechannel.appid option
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit 0953e1aea1fd16cd1825c03f3b032c7f12f3322f)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2011327
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
tests/data/cli/compare/virt-install-singleton-config-1.xml | 1 +
tests/test_cli.py | 2 +-
virtinst/cli.py | 1 +
virtinst/domain/resource.py | 3 ++-
4 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/data/cli/compare/virt-install-singleton-config-1.xml b/tests/data/cli/compare/virt-install-singleton-config-1.xml
index 518a0099..b50d806e 100644
--- a/tests/data/cli/compare/virt-install-singleton-config-1.xml
+++ b/tests/data/cli/compare/virt-install-singleton-config-1.xml
@@ -19,6 +19,7 @@
</numatune>
<resource>
<partition>/virtualmachines/production</partition>
+ <fibrechannel appid="myapplication"/>
</resource>
<os>
<type arch="x86_64" machine="q35">hvm</type>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 5e69a135..5b174933 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -480,7 +480,7 @@ c.add_compare("""
--memorybacking hugepages=on
--features apic=off
--clock offset=localtime
---resource /virtualmachines/production
+--resource /virtualmachines/production,fibrechannel.appid=myapplication
--events on_crash=restart
--metadata genid_enable=yes
--sysinfo host
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 8e5b13cd..e1a988f9 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -1999,6 +1999,7 @@ class ParserResource(VirtCLIParser):
def _init_class(cls, **kwargs):
VirtCLIParser._init_class(**kwargs)
cls.add_arg("partition", "partition")
+ cls.add_arg("fibrechannel.appid", "fibrechannel_appid", can_comma=True)
######################
diff --git a/virtinst/domain/resource.py b/virtinst/domain/resource.py
index d0962db9..8ad3df54 100644
--- a/virtinst/domain/resource.py
+++ b/virtinst/domain/resource.py
@@ -14,6 +14,7 @@ class DomainResource(XMLBuilder):
"""
XML_NAME = "resource"
- _XML_PROP_ORDER = ["partition"]
+ _XML_PROP_ORDER = ["partition", "fibrechannel_appid"]
partition = XMLProperty("./partition")
+ fibrechannel_appid = XMLProperty("./fibrechannel/@appid")
--
2.31.1

View File

@ -1,50 +0,0 @@
From 61e24e595852a552019912b9a9d6884f5012dc6e Mon Sep 17 00:00:00 2001
From: Pavel Hrdina <phrdina@redhat.com>
Date: Fri, 5 Feb 2021 12:15:46 +0100
Subject: [PATCH] console: fix error with old pygobject
The code doesn't work as expected. From python documentation:
x and y
is the same as
x if not x or y
so in the code if for some reasone `dev` is None the value stored in
`sensitive` will be None as well.
No the code itself works with pygobject >= 3.31.3 where they allowed
None as a valid boolean value, but with older versions it will fail
with this error message:
TypeError: Argument 1 does not allow None as a value
Resolves: https://github.com/virt-manager/virt-manager/issues/226
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit cf93e2dbff28fe05d6d45364c579f923b157beb1)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2026987
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
virtManager/details/console.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virtManager/details/console.py b/virtManager/details/console.py
index c4ed478ed..18f9ddd91 100644
--- a/virtManager/details/console.py
+++ b/virtManager/details/console.py
@@ -258,7 +258,7 @@ class _ConsoleMenu:
cb = toggled_cb
cbdata = dev
- sensitive = dev and not tooltip
+ sensitive = bool(dev and not tooltip)
active = False
if oldlabel is None and sensitive:
--
2.35.1

View File

@ -1,35 +0,0 @@
From 99d841337bab8134c173168cabd93e9b133f6049 Mon Sep 17 00:00:00 2001
From: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Date: Mon, 31 May 2021 21:54:27 +0200
Subject: [PATCH] hostdev: use method get_mdev_uuid()
Use method get_mdev_uuid() to retrieve the UUID of MDEV node device
object.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
(cherry picked from commit f87e96d3d40891f1403601abc389c24800ba1069)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1995125
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
virtinst/devices/hostdev.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virtinst/devices/hostdev.py b/virtinst/devices/hostdev.py
index e8d0fae2..b3717430 100644
--- a/virtinst/devices/hostdev.py
+++ b/virtinst/devices/hostdev.py
@@ -78,7 +78,7 @@ class DeviceHostdev(Device):
_("Don't know how to generate nodedev for mdev type id '%s'") %
nodedev.type_id)
- self.uuid = nodedev.name[5:].replace('_', '-')
+ self.uuid = nodedev.get_mdev_uuid()
else:
raise ValueError(_("Unknown node device type %s") % nodedev)
--
2.31.1

View File

@ -1,230 +0,0 @@
From a243508cc0a896dd35a73277ca651fa8638b086b Mon Sep 17 00:00:00 2001
From: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Date: Mon, 31 May 2021 21:54:28 +0200
Subject: [PATCH] tests: verify MDEV support
Add tests to verify add, edit and remove features of mediated
devices.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
(cherry picked from commit 9d4002ee0f7088c490748ffb3144c006f4e39c68)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1995125
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
.../virt-xml-add-hostdev-mdev-start.xml | 12 +++++++
.../cli/compare/virt-xml-add-hostdev-mdev.xml | 14 ++++++++
tests/data/cli/compare/virt-xml-edit-all.xml | 7 ++++
.../compare/virt-xml-edit-hostdev-mdev.xml | 11 +++++++
.../compare/virt-xml-edit-simple-redirdev.xml | 2 +-
.../compare/virt-xml-remove-hostdev-mdev.xml | 15 +++++++++
tests/data/testdriver/testsuite.xml | 32 +++++++++++++++++++
tests/test_cli.py | 4 +++
tests/utils.py | 2 +-
9 files changed, 97 insertions(+), 2 deletions(-)
create mode 100644 tests/data/cli/compare/virt-xml-add-hostdev-mdev-start.xml
create mode 100644 tests/data/cli/compare/virt-xml-add-hostdev-mdev.xml
create mode 100644 tests/data/cli/compare/virt-xml-edit-hostdev-mdev.xml
create mode 100644 tests/data/cli/compare/virt-xml-remove-hostdev-mdev.xml
diff --git a/tests/data/cli/compare/virt-xml-add-hostdev-mdev-start.xml b/tests/data/cli/compare/virt-xml-add-hostdev-mdev-start.xml
new file mode 100644
index 00000000..3742d454
--- /dev/null
+++ b/tests/data/cli/compare/virt-xml-add-hostdev-mdev-start.xml
@@ -0,0 +1,12 @@
+ <model type="cirrus" vram="16384" heads="1" primary="yes"/>
+ </video>
+ <memballoon model="virtio"/>
++ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
++ <source>
++ <address uuid="8e37ee90-2b51-45e3-9b25-bf8283c03110"/>
++ </source>
++ </hostdev>
+ </devices>
+ </domain>
+
+Domain 'test-state-shutoff' started successfully.
diff --git a/tests/data/cli/compare/virt-xml-add-hostdev-mdev.xml b/tests/data/cli/compare/virt-xml-add-hostdev-mdev.xml
new file mode 100644
index 00000000..c2acff8f
--- /dev/null
+++ b/tests/data/cli/compare/virt-xml-add-hostdev-mdev.xml
@@ -0,0 +1,14 @@
+ <vsock model="virtio">
+ <cid auto="no" address="5"/>
+ </vsock>
++ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
++ <source>
++ <address uuid="8e37ee90-2b51-45e3-9b25-bf8283c03110"/>
++ </source>
++ </hostdev>
+ </devices>
+ <seclabel type="dynamic" model="selinux" relabel="yes"/>
+ <keywrap>
+
+Domain 'test-for-virtxml' defined successfully.
+Changes will take effect after the domain is fully powered off.
diff --git a/tests/data/cli/compare/virt-xml-edit-all.xml b/tests/data/cli/compare/virt-xml-edit-all.xml
index ed09effc..5bdee2aa 100644
--- a/tests/data/cli/compare/virt-xml-edit-all.xml
+++ b/tests/data/cli/compare/virt-xml-edit-all.xml
@@ -8,6 +8,13 @@
<address domain="0x0000" bus="0x00" slot="0x19" function="0x0"/>
</source>
<rom bar="off"/>
++ <driver name="vfio"/>
+ </hostdev>
+ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
+ <source>
+ <address uuid="b1ae8bf6-38b0-4c81-9d44-78ce3f520496"/>
+ </source>
+ <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0002"/>
+ <driver name="vfio"/>
</hostdev>
<redirdev bus="usb" type="tcp">
diff --git a/tests/data/cli/compare/virt-xml-edit-hostdev-mdev.xml b/tests/data/cli/compare/virt-xml-edit-hostdev-mdev.xml
new file mode 100644
index 00000000..ef5523db
--- /dev/null
+++ b/tests/data/cli/compare/virt-xml-edit-hostdev-mdev.xml
@@ -0,0 +1,11 @@
+ <source>
+ <address uuid="b1ae8bf6-38b0-4c81-9d44-78ce3f520496"/>
+ </source>
+- <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0002"/>
++ <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0008"/>
+ </hostdev>
+ <redirdev bus="usb" type="tcp">
+ <source mode="connect" host="localhost" service="4000"/>
+
+Domain 'test-for-virtxml' defined successfully.
+Changes will take effect after the domain is fully powered off.
diff --git a/tests/data/cli/compare/virt-xml-edit-simple-redirdev.xml b/tests/data/cli/compare/virt-xml-edit-simple-redirdev.xml
index 52ffddfe..f1a0ff6c 100644
--- a/tests/data/cli/compare/virt-xml-edit-simple-redirdev.xml
+++ b/tests/data/cli/compare/virt-xml-edit-simple-redirdev.xml
@@ -1,5 +1,5 @@
</source>
- <rom bar="off"/>
+ <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0002"/>
</hostdev>
- <redirdev bus="usb" type="tcp">
- <source mode="connect" host="localhost" service="4000"/>
diff --git a/tests/data/cli/compare/virt-xml-remove-hostdev-mdev.xml b/tests/data/cli/compare/virt-xml-remove-hostdev-mdev.xml
new file mode 100644
index 00000000..d4c33804
--- /dev/null
+++ b/tests/data/cli/compare/virt-xml-remove-hostdev-mdev.xml
@@ -0,0 +1,15 @@
+ </source>
+ <rom bar="off"/>
+ </hostdev>
+- <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
+- <source>
+- <address uuid="b1ae8bf6-38b0-4c81-9d44-78ce3f520496"/>
+- </source>
+- <address type="ccw" cssid="0xfe" ssid="0x0" devno="0x0002"/>
+- </hostdev>
+ <redirdev bus="usb" type="tcp">
+ <source mode="connect" host="localhost" service="4000"/>
+ <protocol type="raw"/>
+
+Domain 'test-for-virtxml' defined successfully.
+Changes will take effect after the domain is fully powered off.
diff --git a/tests/data/testdriver/testsuite.xml b/tests/data/testdriver/testsuite.xml
index fd255138..a073cbce 100644
--- a/tests/data/testdriver/testsuite.xml
+++ b/tests/data/testdriver/testsuite.xml
@@ -259,6 +259,12 @@
</source>
<rom bar='off'/>
</hostdev>
+ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
+ <source>
+ <address uuid="b1ae8bf6-38b0-4c81-9d44-78ce3f520496"/>
+ </source>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
+ </hostdev>
<serial type='null'/>
@@ -737,5 +743,31 @@
</capability>
</device>
+<device>
+ <name>mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110</name>
+ <path>/sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110</path>
+ <parent>css_0_0_0023</parent>
+ <driver>
+ <name>vfio_mdev</name>
+ </driver>
+ <capability type='mdev'>
+ <type id='vfio_ccw-io'/>
+ <iommuGroup number='0'/>
+ </capability>
+</device>
+
+<device>
+ <name>mdev_b1ae8bf6_38b0_4c81_9d44_78ce3f520496</name>
+ <path>/sys/devices/css0/0.0.0023/b1ae8bf6-38b0-4c81-9d44-78ce3f520496</path>
+ <parent>css_0_0_0023</parent>
+ <driver>
+ <name>vfio_mdev</name>
+ </driver>
+ <capability type='mdev'>
+ <type id='vfio_ccw-io'/>
+ <iommuGroup number='0'/>
+ </capability>
+</device>
+
</node>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 5f94e009..9f0cdfe9 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1274,6 +1274,7 @@ c.add_compare("--edit mac=00:11:7f:33:44:55 --network target=nic55", "edit-selec
c.add_compare("--edit target=hda --disk boot_order=1", "edit-select-disk-bootorder")
c.add_compare("--edit path=/dev/null --disk path=,target=fdb,boot_order=12", "edit-disk-unset") # --disk matching, using empty value to unset path
c.add_compare("--edit --memballoon none", "edit-disable-memballoon")
+c.add_compare("--edit address.devno=0x0002 --hostdev address.devno=0x0008", "edit-hostdev-mdev")
c = vixml.add_category("edit and start selection", "test-state-shutoff --print-diff --start")
c.add_compare("--define --edit target=vda --disk boot_order=1", "start-select-disk-bootorder")
@@ -1308,6 +1309,8 @@ c.add_compare("--remove-device --disk /dev/null", "remove-disk-path")
c.add_compare("--remove-device --video all", "remove-video-all")
c.add_compare("--remove-device --host-device 0x04b3:0x4485", "remove-hostdev-name")
c.add_compare("--remove-device --memballoon all", "remove-memballoon")
+c.add_compare("--add-device --hostdev mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110", "add-hostdev-mdev")
+c.add_compare("--remove-device --hostdev mdev_b1ae8bf6_38b0_4c81_9d44_78ce3f520496", "remove-hostdev-mdev")
c = vixml.add_category("add/rm devices and start", "test-state-shutoff --print-diff --start")
c.add_invalid("--add-device --pm suspend_to_disk=yes") # --add-device without a device
@@ -1318,6 +1321,7 @@ c.add_compare("--define --add-device --host-device usb_device_4b3_4485_noserial"
c.add_compare("--add-device --disk %(EXISTIMG1)s,bus=virtio,target=vdf", "add-disk-basic-start")
c.add_compare("--add-device --disk %(NEWIMG1)s,size=.01", "add-disk-create-storage-start")
c.add_compare("--remove-device --disk /dev/null", "remove-disk-path-start")
+c.add_compare("--add-device --hostdev mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110", "add-hostdev-mdev-start")
c = vixml.add_category("add/rm devices OS KVM", "--connect %(URI-KVM)s test --print-diff --define")
c.add_compare("--add-device --disk %(EXISTIMG1)s", "kvm-add-disk-os-from-xml") # Guest OS (none) from XML
diff --git a/tests/utils.py b/tests/utils.py
index 16ba26b4..62443ca8 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -231,7 +231,7 @@ def diff_compare(actual_out, filename=None, expect_out=None):
open(filename, "w").write(actual_out)
expect_out = open(filename).read()
- diff = xmlutil.diff(expect_out, actual_out,
+ diff = xmlutil.diff(expect_out.rstrip(), actual_out.rstrip(),
filename or '', "Generated output")
if diff:
raise AssertionError("Conversion outputs did not match.\n%s" % diff)
--
2.31.1

View File

@ -1,256 +0,0 @@
From 5245be196682b78c225e67f211c02e3802ca4bd6 Mon Sep 17 00:00:00 2001
From: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Date: Wed, 14 Apr 2021 17:18:55 +0200
Subject: [PATCH] virt-install: add mediated device
Add support to install a virtual server with passed-through mediated
device. Mediated device can be created using vGPU attached to
vfio_pci driver or DASD attached to vfio_ccw driver or APQNs attached
to vfio_ap driver.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
(cherry picked from commit 965480e8bc85caf8a4f36b4a2f07963067b63cf6)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1995125
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
.../cli/compare/virt-install-many-devices.xml | 19 +++++++++
tests/data/testdriver/testdriver.xml | 40 +++++++++++++++++++
tests/test_cli.py | 3 ++
tests/test_nodedev.py | 30 ++++++++++++++
virtinst/devices/hostdev.py | 36 ++++++++++++++++-
virtinst/nodedev.py | 4 ++
6 files changed, 131 insertions(+), 1 deletion(-)
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
index 49e9dcc7..3bd756b3 100644
--- a/tests/data/cli/compare/virt-install-many-devices.xml
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
@@ -592,6 +592,25 @@
<char>/dev/pty7</char>
</source>
</hostdev>
+ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ccw">
+ <address type="ccw" cssid="0xfe" ssid="0x1" devno="0x0008"/>
+ <source>
+ <address uuid="8e37ee90-2b51-45e3-9b25-bf8283c03110"/>
+ </source>
+ </hostdev>
+ <hostdev mode="subsystem" type="mdev" managed="no" model="vfio-ap">
+ <source>
+ <address uuid="11f92c9d-b0b0-4016-b306-a8071277f8b9"/>
+ </source>
+ </hostdev>
+ <hostdev mode="subsystem" type="mdev" managed="yes" model="vfio-pci" display="off" ramfb="off">
+ <address type="pci" domain="0" bus="1" slot="1" function="0">
+ <zpci uid="0x0001" fid="0x00000001"/>
+ </address>
+ <source>
+ <address uuid="4b20d080-1b54-4048-85b3-a6a62d165c01"/>
+ </source>
+ </hostdev>
<redirdev bus="usb" type="spicevmc"/>
<redirdev bus="usb" type="tcp">
<source host="localhost" service="4000"/>
diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml
index ea90f0f7..b8d67bac 100644
--- a/tests/data/testdriver/testdriver.xml
+++ b/tests/data/testdriver/testdriver.xml
@@ -3645,5 +3645,45 @@ ba</description>
</capability>
</device>
+<device>
+ <name>mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110</name>
+ <path>/sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110</path>
+ <parent>css_0_0_0023</parent>
+ <driver>
+ <name>vfio_mdev</name>
+ </driver>
+ <capability type='mdev'>
+ <type id='vfio_ccw-io'/>
+ <iommuGroup number='0'/>
+ </capability>
+</device>
+
+<device>
+ <name>mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9</name>
+ <path>/sys/devices/vfio_ap/matrix/11f92c9d-b0b0-4016-b306-a8071277f8b9</path>
+ <parent>ap_matrix</parent>
+ <driver>
+ <name>vfio_mdev</name>
+ </driver>
+ <capability type='mdev'>
+ <type id='vfio_ap-passthrough'/>
+ <iommuGroup number='2'/>
+ <attr name='assign_adapter' value='1'/>
+ <attr name='assign_domain' value='2'/>
+ </capability>
+</device>
+
+<device>
+ <name>mdev_4b20d080_1b54_4048_85b3_a6a62d165c01</name>
+ <path>/sys/devices/pci0000:00/0000:00:02.0/4b20d080-1b54-4048-85b3-a6a62d165c01</path>
+ <parent>pci_0000_06_00_0</parent>
+ <driver>
+ <name>vfio_mdev</name>
+ </driver>
+ <capability type='mdev'>
+ <type id='nvidia-11'/>
+ <iommuGroup number='12'/>
+ </capability>
+</device>
</node>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 5b174933..5f94e009 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -675,6 +675,9 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser
--hostdev wlan0,type=net
--hostdev /dev/vdz,type=storage
--hostdev /dev/pty7,type=misc
+--hostdev mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110,address.type=ccw,address.cssid=0xfe,address.ssid=0x1,address.devno=0x0008
+--hostdev mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9
+--hostdev mdev_4b20d080_1b54_4048_85b3_a6a62d165c01,address.type=pci,address.domain=0x0000,address.bus=0x01,address.slot=0x01,address.function=0x0,address.zpci.uid=0x0001,address.zpci.fid=0x00000001
--filesystem /source,/target,alias.name=testfsalias,driver.ats=on,driver.iommu=off,driver.packed=on
diff --git a/tests/test_nodedev.py b/tests/test_nodedev.py
index 406e321f..79678bc8 100644
--- a/tests/test_nodedev.py
+++ b/tests/test_nodedev.py
@@ -126,6 +126,36 @@ def testDRMDevice():
assert dev.get_devnode("frob")
+def testDASDMdev():
+ conn = utils.URIs.open_testdriver_cached()
+ devname = "mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110"
+ dev = _nodeDevFromName(conn, devname)
+ assert dev.name == devname
+ assert dev.parent == "css_0_0_0023"
+ assert dev.device_type == "mdev"
+ assert dev.type_id == "vfio_ccw-io"
+
+
+def testAPQNMdev():
+ conn = utils.URIs.open_testdriver_cached()
+ devname = "mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9"
+ dev = _nodeDevFromName(conn, devname)
+ assert dev.name == devname
+ assert dev.parent == "ap_matrix"
+ assert dev.device_type == "mdev"
+ assert dev.type_id == "vfio_ap-passthrough"
+
+
+def testPCIMdev():
+ conn = utils.URIs.open_testdriver_cached()
+ devname = "mdev_4b20d080_1b54_4048_85b3_a6a62d165c01"
+ dev = _nodeDevFromName(conn, devname)
+ assert dev.name == devname
+ assert dev.parent == "pci_0000_06_00_0"
+ assert dev.device_type == "mdev"
+ assert dev.type_id == "nvidia-11"
+
+
# NodeDevice 2 Device XML tests
def testNodeDev2USB1():
diff --git a/virtinst/devices/hostdev.py b/virtinst/devices/hostdev.py
index 3e9de2ad..e8d0fae2 100644
--- a/virtinst/devices/hostdev.py
+++ b/virtinst/devices/hostdev.py
@@ -4,6 +4,8 @@
# This work is licensed under the GNU GPLv2 or later.
# See the COPYING file in the top-level directory.
+import re
+
from .device import Device
from ..nodedev import NodeDevice
from ..xmlbuilder import XMLProperty
@@ -53,16 +55,45 @@ class DeviceHostdev(Device):
self.scsi_unit = nodedev.lun
self.managed = False
+ elif nodedev.device_type == nodedev.CAPABILITY_TYPE_MDEV:
+ self.type = "mdev"
+
+ if nodedev.type_id == "vfio_ccw-io":
+ self.model = "vfio-ccw"
+ self.managed = "no"
+
+ elif nodedev.type_id == "vfio_ap-passthrough":
+ self.model = "vfio-ap"
+ self.managed = "no"
+
+ elif (re.match("^nvidia-[0-9]{2}", nodedev.type_id) or
+ re.match("^i915-GVTg_V[0-9]_[0-9]", nodedev.type_id)):
+ self.model = "vfio-pci"
+ self.managed = "yes"
+ self.display = "off"
+ self.ramfb = "off"
+
+ else:
+ raise ValueError( # pragma: no cover
+ _("Don't know how to generate nodedev for mdev type id '%s'") %
+ nodedev.type_id)
+
+ self.uuid = nodedev.name[5:].replace('_', '-')
+
else:
raise ValueError(_("Unknown node device type %s") % nodedev)
_XML_PROP_ORDER = ["mode", "type", "managed", "vendor", "product",
- "domain", "bus", "slot", "function"]
+ "domain", "bus", "slot", "function", "model",
+ "display", "ramfb"]
mode = XMLProperty("./@mode")
type = XMLProperty("./@type")
managed = XMLProperty("./@managed", is_yesno=True)
+ model = XMLProperty("./@model")
+ display = XMLProperty("./@display")
+ ramfb = XMLProperty("./@ramfb")
vendor = XMLProperty("./source/vendor/@id")
product = XMLProperty("./source/product/@id")
@@ -92,6 +123,9 @@ class DeviceHostdev(Device):
# type=misc handling
storage_block = XMLProperty("./source/block")
+ # type=mdev
+ uuid = XMLProperty("./source/address/@uuid")
+
##################
# Default config #
diff --git a/virtinst/nodedev.py b/virtinst/nodedev.py
index 9d2c8f10..97841794 100644
--- a/virtinst/nodedev.py
+++ b/virtinst/nodedev.py
@@ -40,6 +40,7 @@ class NodeDevice(XMLBuilder):
CAPABILITY_TYPE_SCSIBUS = "scsi_host"
CAPABILITY_TYPE_SCSIDEV = "scsi"
CAPABILITY_TYPE_DRM = "drm"
+ CAPABILITY_TYPE_MDEV = "mdev"
@staticmethod
def lookupNodedevFromString(conn, idstring):
@@ -168,6 +169,9 @@ class NodeDevice(XMLBuilder):
if len(self.devnodes) > 0:
return self.devnodes[0]
+ # type='mdev' options
+ type_id = XMLProperty("./capability/type/@id")
+
def _AddressStringToHostdev(conn, addrstr):
from .devices import DeviceHostdev
--
2.31.1

View File

@ -1,164 +0,0 @@
From bacab3883858b137f82ab2b3dea308289f65138c Mon Sep 17 00:00:00 2001
From: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Date: Mon, 7 Jun 2021 11:34:21 +0200
Subject: [PATCH] virt-manager: enable MDEV support
Enable virt-manager GUI to support add, edit, remove, hot-plug and
hot-unplug of mediated devices (like DASDs, APQNs and PCIs) in virtual
server.
It is not possible to edit MDEV when a virtual server is in
running state, as this is not supported by libvirt.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
(cherry picked from commit 0e15cd51dfbdaa09f7d34ed1edce2f5416130361)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1995125
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
tests/data/testdriver/testdriver.xml | 39 ++++++++++++++++++++++++++++
tests/uitests/test_addhardware.py | 6 +++++
virtManager/addhardware.py | 19 +++++++++++++-
3 files changed, 63 insertions(+), 1 deletion(-)
diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml
index b8d67bac..5875732a 100644
--- a/tests/data/testdriver/testdriver.xml
+++ b/tests/data/testdriver/testdriver.xml
@@ -3645,6 +3645,27 @@ ba</description>
</capability>
</device>
+<device>
+ <name>css_0_0_0023</name>
+ <path>/sys/devices/css0/0.0.0023</path>
+ <parent>computer</parent>
+ <driver>
+ <name>vfio_ccw</name>
+ </driver>
+ <capability type='css'>
+ <cssid>0x0</cssid>
+ <ssid>0x0</ssid>
+ <devno>0x0023</devno>
+ <capability type='mdev_types'>
+ <type id='vfio_ccw-io'>
+ <name>I/O subchannel (Non-QDIO)</name>
+ <deviceAPI>vfio-ccw</deviceAPI>
+ <availableInstances>0</availableInstances>
+ </type>
+ </capability>
+ </capability>
+</device>
+
<device>
<name>mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110</name>
<path>/sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110</path>
@@ -3658,6 +3679,24 @@ ba</description>
</capability>
</device>
+<device>
+ <name>ap_matrix</name>
+ <path>/sys/devices/vfio_ap/matrix</path>
+ <parent>computer</parent>
+ <driver>
+ <name>vfio_ap</name>
+ </driver>
+ <capability type='ap_matrix'>
+ <capability type='mdev_types'>
+ <type id='vfio_ap-passthrough'>
+ <name>VFIO AP Passthrough Device</name>
+ <deviceAPI>vfio-ap</deviceAPI>
+ <availableInstances>65536</availableInstances>
+ </type>
+ </capability>
+ </capability>
+</device>
+
<device>
<name>mdev_11f92c9d_b0b0_4016_b306_a8071277f8b9</name>
<path>/sys/devices/vfio_ap/matrix/11f92c9d-b0b0-4016-b306-a8071277f8b9</path>
diff --git a/tests/uitests/test_addhardware.py b/tests/uitests/test_addhardware.py
index ce3da57c..56acc2fa 100644
--- a/tests/uitests/test_addhardware.py
+++ b/tests/uitests/test_addhardware.py
@@ -459,6 +459,12 @@ def testAddHosts(app):
app.click_alert_button("device is already in use by", "Yes")
lib.utils.check(lambda: details.active)
+ # Add MDEV device
+ _open_addhw(app, details)
+ tab = _select_hw(addhw, "MDEV Host Device", "host-tab")
+ tab.find_fuzzy("mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110",
+ "table cell").click()
+ _finish(addhw, check=details)
def testAddChars(app):
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
index cbf19f58..13b899c3 100644
--- a/virtManager/addhardware.py
+++ b/virtManager/addhardware.py
@@ -249,6 +249,10 @@ class vmmAddHardware(vmmGObjectUI):
add_hw_option(_("PCI Host Device"), "system-run", PAGE_HOSTDEV,
nodedev_enabled, nodedev_errstr, "pci")
+ add_hw_option(_("MDEV Host Device"), "system-run", PAGE_HOSTDEV,
+ self.conn.support.conn_nodedev(),
+ _("Connection does not support host device enumeration"),
+ "mdev")
add_hw_option(_("Video"), "video-display", PAGE_VIDEO, True,
_("Libvirt version does not support video devices."))
add_hw_option(_("Watchdog"), "device_pci", PAGE_WATCHDOG,
@@ -656,6 +660,9 @@ class vmmAddHardware(vmmGObjectUI):
(dehex(hostdev.domain), dehex(hostdev.bus),
dehex(hostdev.slot), dehex(hostdev.function)))
+ elif hostdev.uuid:
+ label += " %s" % (str(hostdev.uuid))
+
return label
@@ -775,6 +782,12 @@ class vmmAddHardware(vmmGObjectUI):
if dev.xmlobj.name == subdev.xmlobj.parent:
prettyname += " (%s)" % subdev.pretty_name()
+ if devtype == "mdev":
+ for parentdev in self.conn.list_nodedevs():
+ if dev.xmlobj.parent == parentdev.xmlobj.name:
+ prettyname = "%s %s" % (
+ parentdev.pretty_name(), prettyname)
+
model.append([dev.xmlobj, prettyname])
if len(model) == 0:
@@ -981,11 +994,13 @@ class vmmAddHardware(vmmGObjectUI):
if page == PAGE_HOSTDEV:
# Need to do this here, since we share the hostdev page
- # between two different HW options
+ # between different HW options
row = self._get_hw_selection()
devtype = "usb_device"
if row and row[5] == "pci":
devtype = "pci"
+ if row and row[5] == "mdev":
+ devtype = "mdev"
self._populate_hostdev_model(devtype)
if page == PAGE_CONTROLLER:
@@ -1036,6 +1051,8 @@ class vmmAddHardware(vmmGObjectUI):
row = self._get_hw_selection()
if row and row[5] == "pci":
return _("PCI Device")
+ if row and row[5] == "mdev":
+ return _("MDEV Device")
return _("USB Device")
raise RuntimeError("Unknown page %s" % page) # pragma: no cover
--
2.31.1

View File

@ -1,77 +0,0 @@
From 1822e898d556eb5bb80e5c01386b5ad65db01592 Mon Sep 17 00:00:00 2001
From: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Date: Mon, 31 May 2021 21:54:26 +0200
Subject: [PATCH] virt-xml: add support for mediated devices
Provide support to add/remove MDEV in a guest domain, which is in
shut-off or running state (hotplug/unplug). Also support update of
already existing MDEV device, when the guest domain is in shut-off
state. Please note that libvirt does not support update of MDEV
device, when the guest domain is in running state.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
(cherry picked from commit 9363e1e692bb0d01184ecc7991d61c95542f690b)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1995125
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
virtinst/nodedev.py | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/virtinst/nodedev.py b/virtinst/nodedev.py
index 97841794..f54a311c 100644
--- a/virtinst/nodedev.py
+++ b/virtinst/nodedev.py
@@ -5,6 +5,7 @@
# See the COPYING file in the top-level directory.
import os
+import uuid
from .logger import log
from .xmlbuilder import XMLBuilder, XMLProperty, XMLChildProperty
@@ -25,6 +26,16 @@ def _compare_int(nodedev_val, hostdev_val):
return (nodedev_val == hostdev_val or hostdev_val == -1)
+def _compare_uuid(nodedev_val, hostdev_val):
+ try:
+ nodedev_val = uuid.UUID(nodedev_val)
+ hostdev_val = uuid.UUID(hostdev_val)
+ except Exception: # pragma: no cover
+ return -1
+
+ return (nodedev_val == hostdev_val)
+
+
class DevNode(XMLBuilder):
XML_NAME = "devnode"
@@ -82,6 +93,9 @@ class NodeDevice(XMLBuilder):
parent = XMLProperty("./parent")
device_type = XMLProperty("./capability/@type")
+ def get_mdev_uuid(self):
+ return self.name[5:].replace('_', '-')
+
def compare_to_hostdev(self, hostdev):
if self.device_type == "pci":
if hostdev.type != "pci":
@@ -101,6 +115,12 @@ class NodeDevice(XMLBuilder):
_compare_int(self.bus, hostdev.bus) and
_compare_int(self.device, hostdev.device))
+ if self.device_type == "mdev":
+ if hostdev.type != "mdev":
+ return False
+
+ return _compare_uuid(self.get_mdev_uuid(), hostdev.uuid)
+
return False
--
2.31.1

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: libvirt-ci.virt-install.brew-build.gating.x86_64.tier1.functional}

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (virt-manager-4.1.0.tar.gz) = 725cb5bcbaebaafae417f95deffb4243ccdad769668cba6e1235f4607e2b29dbd099d2a9a3885981158f53ea854dd71cc29ed9d7557b2791161c13d34f2ef883

View File

@ -0,0 +1,98 @@
From deb27a8c7e1539e687d589edd7ea517018266f77 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Sun, 21 Aug 2022 16:21:10 -0400
Subject: [PATCH] cloner: Sync <uuid> and <sysinfo> system uuid
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>
(cherry picked from commit b0d0516736320315a70f74aff3759fb35dd35d9d)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2038040
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
tests/data/cli/compare/virt-clone-auto-unmanaged.xml | 5 +++++
tests/data/cli/compare/virt-clone-unmanaged-preserve.xml | 5 +++++
tests/data/cli/virtclone/clone-disk.xml | 5 +++++
virtinst/cloner.py | 6 ++++--
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/tests/data/cli/compare/virt-clone-auto-unmanaged.xml b/tests/data/cli/compare/virt-clone-auto-unmanaged.xml
index 21a9a6398..f2043be25 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 3bdbbbe36..c003ed3ee 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 da1eb0a63..2f6e916d7 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 34a702f91..9334513c5 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):
"""
--
2.38.1

View File

@ -0,0 +1,150 @@
From 7867228f70cd716afe35e9d60a5fc9793c7e7f96 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 12 Sep 2023 12:01:09 -0400
Subject: [PATCH 2/2] installer: drop default TPM for --cloud-init install
phase
When shim in the guest sees unpopulated EFI NVRAM, like when
we create a new UEFI VM, it invokes fallback.efi to populate
initial NVRAM boot entries. When the guest also has a TPM device,
shim will do a one time VM reset. This reset throws off the
reboot detection that is central to virt-install's install
process.
The main install case that this will usually be relevant is
the combo of UEFI and --cloud-init. The latter usually implies
use of a distro cloud image, which will be using shim, and the
--cloud-init process requires a multi stage install compared
to just a plain import install.
For that case, we disable the default TPM device for the first
boot.
https://bugzilla.redhat.com/show_bug.cgi?id=2133525
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Resolves: https://issues.redhat.com/browse/RHEL-1705
(cherry picked from commit ec434948a8384541c56bfa04e4985f4fc709bc76)
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
.../virt-install-aarch64-cloud-init.xml | 3 --
.../virt-install-cloud-init-options1.xml | 3 --
virtinst/guest.py | 2 ++
virtinst/install/installer.py | 31 +++++++++++++++++--
4 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/tests/data/cli/compare/virt-install-aarch64-cloud-init.xml b/tests/data/cli/compare/virt-install-aarch64-cloud-init.xml
index e4a50cf4c..18c417662 100644
--- a/tests/data/cli/compare/virt-install-aarch64-cloud-init.xml
+++ b/tests/data/cli/compare/virt-install-aarch64-cloud-init.xml
@@ -49,9 +49,6 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
- <tpm>
- <backend type="emulator"/>
- </tpm>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
diff --git a/tests/data/cli/compare/virt-install-cloud-init-options1.xml b/tests/data/cli/compare/virt-install-cloud-init-options1.xml
index cd5426049..110730dd3 100644
--- a/tests/data/cli/compare/virt-install-cloud-init-options1.xml
+++ b/tests/data/cli/compare/virt-install-cloud-init-options1.xml
@@ -71,9 +71,6 @@ chpasswd:
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
- <tpm model="tpm-crb">
- <backend type="emulator"/>
- </tpm>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
diff --git a/virtinst/guest.py b/virtinst/guest.py
index e66360223..0f5a93d08 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -211,6 +211,7 @@ class Guest(XMLBuilder):
self.skip_default_graphics = False
self.skip_default_rng = False
self.skip_default_tpm = False
+ self.have_default_tpm = False
self.x86_cpu_default = self.cpu.SPECIAL_MODE_APP_DEFAULT
# qemu 6.1, fairly new when we added this option, has an unfortunate
@@ -1060,6 +1061,7 @@ class Guest(XMLBuilder):
dev = DeviceTpm(self.conn)
dev.type = DeviceTpm.TYPE_EMULATOR
self.add_device(dev)
+ self.have_default_tpm = True
def _add_default_memballoon(self):
if self.devices.memballoon:
diff --git a/virtinst/install/installer.py b/virtinst/install/installer.py
index df74eaffa..c005e77bd 100644
--- a/virtinst/install/installer.py
+++ b/virtinst/install/installer.py
@@ -564,13 +564,38 @@ class Installer(object):
# guest install handling #
##########################
- 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)
self._alter_bootconfig(initial_guest)
self._alter_install_resources(initial_guest, meter)
if self.has_cloudinit():
initial_guest.set_smbios_serial_cloudinit()
+ # When shim in the guest sees unpopulated EFI NVRAM, like when
+ # we create a new UEFI VM, it invokes fallback.efi to populate
+ # initial NVRAM boot entries. When the guest also has a TPM device,
+ # shim will do a one time VM reset. This reset throws off the
+ # reboot detection that is central to virt-install's install
+ # process.
+ #
+ # The main install case that this will usually be relevant is
+ # the combo of UEFI and --cloud-init. The latter usually implies
+ # use of a distro cloud image, which will be using shim, and the
+ # --cloud-init process requires a multi stage install compared
+ # to just a plain import install.
+ #
+ # For that case, we disable the default TPM device for the first
+ # boot.
+ if (guest_ro.have_default_tpm and
+ guest_ro.is_uefi() and
+ len(initial_guest.devices.tpm)):
+ log.debug(
+ "combo of default TPM, UEFI, and cloudinit is "
+ "used. assuming this VM is using a linux distro "
+ "cloud image with shim in the boot path. disabling "
+ "TPM for the first boot")
+ initial_guest.remove_device(initial_guest.devices.tpm[0])
+
final_guest = Guest(self.conn, parsexml=final_xml)
self._remove_install_cdrom_media(final_guest)
self._remove_unattended_install_cdrom_device(final_guest)
@@ -581,7 +606,8 @@ class Installer(object):
initial_xml = None
final_xml = guest.get_xml()
if self._requires_postboot_xml_changes():
- initial_xml, final_xml = self._build_postboot_xml(final_xml, meter)
+ initial_xml, final_xml = self._build_postboot_xml(
+ guest, final_xml, meter)
final_xml = self._pre_reinstall_xml or final_xml
log.debug("Generated initial_xml: %s",
@@ -680,6 +706,7 @@ class Installer(object):
# All installer XML alterations are made on this guest instance,
# so the user_guest instance is left intact
guest = Guest(self.conn, parsexml=user_guest.get_xml())
+ guest.have_default_tpm = user_guest.have_default_tpm
try:
self._prepare(guest, meter)
--
2.41.0

View File

@ -0,0 +1,126 @@
From 3702eed072ae7b2d52398a3c9b1c1feb04ffdce3 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Wed, 14 Dec 2022 12:57:10 -0500
Subject: [PATCH] progress: Fix showing correct final total
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>
(cherry picked from commit 4114fa1aa827b836d3a1d11c2ac2d367c9bb0463)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2156247
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
tests/data/meter/meter1.txt | 2 +-
tests/data/meter/meter2.txt | 2 +-
tests/data/meter/meter3.txt | 2 +-
tests/data/meter/meter5.txt | 2 +-
tests/data/meter/meter6.txt | 2 +-
tests/test_misc.py | 4 +++-
virtinst/_progresspriv.py | 4 ++--
7 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/tests/data/meter/meter1.txt b/tests/data/meter/meter1.txt
index a3f7c7d2f..7e154c972 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 93e93dc31..7ccc31636 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 474e40f74..6f66608fe 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 1d232a5de..7142a9718 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 07d99bfd8..dd5d3d47b 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 aa610f4df..20f5a626b 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 5a31a18cc..a035c9c43 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)
--
2.39.0

View File

@ -0,0 +1,653 @@
From c8d1097fdaf7640c9dc78095076e584d38fbf6e5 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Tue, 12 Sep 2023 11:57:27 -0400
Subject: [PATCH 1/2] tests: Add more cloud-init and TPM test cases
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Resolves: https://issues.redhat.com/browse/RHEL-1705
(cherry picked from commit fca6de3950d41ccc1c4895c42073c840c45f01ab)
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
.../data/capabilities/kvm-aarch64-domcaps.xml | 14 ++
.../virt-install-aarch64-cloud-init.xml | 136 ++++++++++++++++++
...t-install-aarch64-firmware-no-override.xml | 6 +
.../compare/virt-install-aarch64-kvm-gic.xml | 3 +
.../virt-install-aarch64-kvm-import.xml | 3 +
.../virt-install-cloud-init-default.xml | 127 +++++++++++-----
.../virt-install-cloud-init-options1.xml | 131 +++++++++++------
tests/test_cli.py | 6 +-
8 files changed, 346 insertions(+), 80 deletions(-)
create mode 100644 tests/data/cli/compare/virt-install-aarch64-cloud-init.xml
diff --git a/tests/data/capabilities/kvm-aarch64-domcaps.xml b/tests/data/capabilities/kvm-aarch64-domcaps.xml
index 432bdb537..9c244bbdd 100644
--- a/tests/data/capabilities/kvm-aarch64-domcaps.xml
+++ b/tests/data/capabilities/kvm-aarch64-domcaps.xml
@@ -62,6 +62,20 @@
<enum name='capsType'/>
<enum name='pciBackend'/>
</hostdev>
+ <tpm supported='yes'>
+ <enum name='model'>
+ <value>tpm-tis</value>
+ </enum>
+ <enum name='backendModel'>
+ <value>passthrough</value>
+ <value>emulator</value>
+ <value>external</value>
+ </enum>
+ <enum name='backendVersion'>
+ <value>1.2</value>
+ <value>2.0</value>
+ </enum>
+ </tpm>
</devices>
<features>
<gic supported='yes'>
diff --git a/tests/data/cli/compare/virt-install-aarch64-cloud-init.xml b/tests/data/cli/compare/virt-install-aarch64-cloud-init.xml
new file mode 100644
index 000000000..e4a50cf4c
--- /dev/null
+++ b/tests/data/cli/compare/virt-install-aarch64-cloud-init.xml
@@ -0,0 +1,136 @@
+<domain type="kvm">
+ <name>fedora28</name>
+ <uuid>00000000-1111-2222-3333-444444444444</uuid>
+ <metadata>
+ <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
+ <libosinfo:os id="http://fedoraproject.org/fedora/28"/>
+ </libosinfo:libosinfo>
+ </metadata>
+ <memory>65536</memory>
+ <currentMemory>65536</currentMemory>
+ <vcpu>2</vcpu>
+ <os>
+ <type arch="aarch64" machine="virt">hvm</type>
+ <loader readonly="yes" type="pflash">/usr/share/AAVMF/AAVMF_CODE.fd</loader>
+ <smbios mode="sysinfo"/>
+ </os>
+ <cpu mode="host-passthrough"/>
+ <clock offset="utc"/>
+ <devices>
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
+ <disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
+ <source file="/pool-dir/testvol1.img"/>
+ <target dev="vda" bus="virtio"/>
+ </disk>
+ <controller type="usb" model="qemu-xhci" ports="15"/>
+ <controller type="pci" model="pcie-root"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <interface type="bridge">
+ <source bridge="testsuitebr0"/>
+ <mac address="00:11:22:33:44:55"/>
+ <model type="virtio"/>
+ </interface>
+ <console type="pty"/>
+ <channel type="unix">
+ <source mode="bind"/>
+ <target type="virtio" name="org.qemu.guest_agent.0"/>
+ </channel>
+ <tpm>
+ <backend type="emulator"/>
+ </tpm>
+ <memballoon model="virtio"/>
+ <rng model="virtio">
+ <backend model="random">/dev/urandom</backend>
+ </rng>
+ <disk type="file" device="cdrom">
+ <driver name="qemu" type="raw"/>
+ <source file="/VIRTINST-TESTSUITE/cloudinit.iso"/>
+ <target dev="sda" bus="scsi"/>
+ <readonly/>
+ </disk>
+ </devices>
+ <sysinfo type="smbios">
+ <system>
+ <entry name="serial">ds=nocloud</entry>
+ </system>
+ </sysinfo>
+ <on_reboot>destroy</on_reboot>
+</domain>
+<domain type="kvm">
+ <name>fedora28</name>
+ <uuid>00000000-1111-2222-3333-444444444444</uuid>
+ <metadata>
+ <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
+ <libosinfo:os id="http://fedoraproject.org/fedora/28"/>
+ </libosinfo:libosinfo>
+ </metadata>
+ <memory>65536</memory>
+ <currentMemory>65536</currentMemory>
+ <vcpu>2</vcpu>
+ <os>
+ <type arch="aarch64" machine="virt">hvm</type>
+ <loader readonly="yes" type="pflash">/usr/share/AAVMF/AAVMF_CODE.fd</loader>
+ <boot dev="hd"/>
+ </os>
+ <cpu mode="host-passthrough"/>
+ <clock offset="utc"/>
+ <devices>
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
+ <disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
+ <source file="/pool-dir/testvol1.img"/>
+ <target dev="vda" bus="virtio"/>
+ </disk>
+ <controller type="usb" model="qemu-xhci" ports="15"/>
+ <controller type="pci" model="pcie-root"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <interface type="bridge">
+ <source bridge="testsuitebr0"/>
+ <mac address="00:11:22:33:44:55"/>
+ <model type="virtio"/>
+ </interface>
+ <console type="pty"/>
+ <channel type="unix">
+ <source mode="bind"/>
+ <target type="virtio" name="org.qemu.guest_agent.0"/>
+ </channel>
+ <tpm>
+ <backend type="emulator"/>
+ </tpm>
+ <memballoon model="virtio"/>
+ <rng model="virtio">
+ <backend model="random">/dev/urandom</backend>
+ </rng>
+ <disk type="file" device="cdrom">
+ <target dev="sda" bus="scsi"/>
+ <readonly/>
+ </disk>
+ </devices>
+</domain>
diff --git a/tests/data/cli/compare/virt-install-aarch64-firmware-no-override.xml b/tests/data/cli/compare/virt-install-aarch64-firmware-no-override.xml
index b6fe84e67..cef9e6cde 100644
--- a/tests/data/cli/compare/virt-install-aarch64-firmware-no-override.xml
+++ b/tests/data/cli/compare/virt-install-aarch64-firmware-no-override.xml
@@ -43,6 +43,9 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
+ <tpm>
+ <backend type="emulator"/>
+ </tpm>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
@@ -95,6 +98,9 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
+ <tpm>
+ <backend type="emulator"/>
+ </tpm>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
diff --git a/tests/data/cli/compare/virt-install-aarch64-kvm-gic.xml b/tests/data/cli/compare/virt-install-aarch64-kvm-gic.xml
index 92e17eda6..aa31ed9c1 100644
--- a/tests/data/cli/compare/virt-install-aarch64-kvm-gic.xml
+++ b/tests/data/cli/compare/virt-install-aarch64-kvm-gic.xml
@@ -56,6 +56,9 @@
<source mode="bind"/>
<target type="virtio" name="org.qemu.guest_agent.0"/>
</channel>
+ <tpm>
+ <backend type="emulator"/>
+ </tpm>
<memballoon model="virtio"/>
<rng model="virtio">
<backend model="random">/dev/urandom</backend>
diff --git a/tests/data/cli/compare/virt-install-aarch64-kvm-import.xml b/tests/data/cli/compare/virt-install-aarch64-kvm-import.xml
index 5203cb807..1e4b26e51 100644
--- a/tests/data/cli/compare/virt-install-aarch64-kvm-import.xml
+++ b/tests/data/cli/compare/virt-install-aarch64-kvm-import.xml
@@ -51,6 +51,9 @@
</channel>
<input type="tablet" bus="usb"/>
<input type="keyboard" bus="usb"/>
+ <tpm>
+ <backend type="emulator"/>
+ </tpm>
<graphics type="vnc" port="-1"/>
<video>
<model type="virtio"/>
diff --git a/tests/data/cli/compare/virt-install-cloud-init-default.xml b/tests/data/cli/compare/virt-install-cloud-init-default.xml
index 0ddc52762..46cff8c09 100644
--- a/tests/data/cli/compare/virt-install-cloud-init-default.xml
+++ b/tests/data/cli/compare/virt-install-cloud-init-default.xml
@@ -1,4 +1,4 @@
-<domain type="test">
+<domain type="kvm">
<name>fedora28</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<metadata>
@@ -10,41 +10,67 @@
<currentMemory>65536</currentMemory>
<vcpu>2</vcpu>
<os>
- <type arch="i686">hvm</type>
+ <type arch="x86_64" machine="q35">hvm</type>
<smbios mode="sysinfo"/>
</os>
<features>
- <pae/>
+ <acpi/>
+ <apic/>
</features>
- <clock offset="utc"/>
+ <cpu mode="host-passthrough"/>
+ <clock offset="utc">
+ <timer name="rtc" tickpolicy="catchup"/>
+ <timer name="pit" tickpolicy="delay"/>
+ <timer name="hpet" present="no"/>
+ </clock>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
- <emulator>/usr/bin/test-hv</emulator>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
<source file="/pool-dir/testvol1.img"/>
- <target dev="hda" bus="ide"/>
+ <target dev="vda" bus="virtio"/>
</disk>
- <controller type="usb" model="ich9-ehci1"/>
- <controller type="usb" model="ich9-uhci1">
- <master startport="0"/>
- </controller>
- <controller type="usb" model="ich9-uhci2">
- <master startport="2"/>
- </controller>
- <controller type="usb" model="ich9-uhci3">
- <master startport="4"/>
- </controller>
- <interface type="user">
+ <controller type="usb" model="qemu-xhci" ports="15"/>
+ <controller type="pci" model="pcie-root"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <interface type="bridge">
+ <source bridge="testsuitebr0"/>
<mac address="00:11:22:33:44:55"/>
- <model type="e1000"/>
+ <model type="virtio"/>
</interface>
<console type="pty"/>
+ <channel type="unix">
+ <source mode="bind"/>
+ <target type="virtio" name="org.qemu.guest_agent.0"/>
+ </channel>
+ <tpm model="tpm-crb">
+ <backend type="emulator"/>
+ </tpm>
+ <memballoon model="virtio"/>
+ <rng model="virtio">
+ <backend model="random">/dev/urandom</backend>
+ </rng>
<disk type="file" device="cdrom">
+ <driver name="qemu" type="raw"/>
<source file="/VIRTINST-TESTSUITE/cloudinit.iso"/>
- <target dev="hdb" bus="ide"/>
+ <target dev="sda" bus="sata"/>
<readonly/>
</disk>
</devices>
@@ -55,7 +81,7 @@
</sysinfo>
<on_reboot>destroy</on_reboot>
</domain>
-<domain type="test">
+<domain type="kvm">
<name>fedora28</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<metadata>
@@ -67,40 +93,65 @@
<currentMemory>65536</currentMemory>
<vcpu>2</vcpu>
<os>
- <type arch="i686">hvm</type>
+ <type arch="x86_64" machine="q35">hvm</type>
<boot dev="hd"/>
</os>
<features>
- <pae/>
+ <acpi/>
+ <apic/>
</features>
- <clock offset="utc"/>
+ <cpu mode="host-passthrough"/>
+ <clock offset="utc">
+ <timer name="rtc" tickpolicy="catchup"/>
+ <timer name="pit" tickpolicy="delay"/>
+ <timer name="hpet" present="no"/>
+ </clock>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
- <emulator>/usr/bin/test-hv</emulator>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
<source file="/pool-dir/testvol1.img"/>
- <target dev="hda" bus="ide"/>
+ <target dev="vda" bus="virtio"/>
</disk>
- <controller type="usb" model="ich9-ehci1"/>
- <controller type="usb" model="ich9-uhci1">
- <master startport="0"/>
- </controller>
- <controller type="usb" model="ich9-uhci2">
- <master startport="2"/>
- </controller>
- <controller type="usb" model="ich9-uhci3">
- <master startport="4"/>
- </controller>
- <interface type="user">
+ <controller type="usb" model="qemu-xhci" ports="15"/>
+ <controller type="pci" model="pcie-root"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <interface type="bridge">
+ <source bridge="testsuitebr0"/>
<mac address="00:11:22:33:44:55"/>
- <model type="e1000"/>
+ <model type="virtio"/>
</interface>
<console type="pty"/>
+ <channel type="unix">
+ <source mode="bind"/>
+ <target type="virtio" name="org.qemu.guest_agent.0"/>
+ </channel>
+ <tpm model="tpm-crb">
+ <backend type="emulator"/>
+ </tpm>
+ <memballoon model="virtio"/>
+ <rng model="virtio">
+ <backend model="random">/dev/urandom</backend>
+ </rng>
<disk type="file" device="cdrom">
- <target dev="hdb" bus="ide"/>
+ <target dev="sda" bus="sata"/>
<readonly/>
</disk>
</devices>
diff --git a/tests/data/cli/compare/virt-install-cloud-init-options1.xml b/tests/data/cli/compare/virt-install-cloud-init-options1.xml
index 1df73714d..cd5426049 100644
--- a/tests/data/cli/compare/virt-install-cloud-init-options1.xml
+++ b/tests/data/cli/compare/virt-install-cloud-init-options1.xml
@@ -4,7 +4,7 @@ chpasswd:
root:[SCRUBBLED]
expire: True
-<domain type="test">
+<domain type="kvm">
<name>fedora28</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<metadata>
@@ -20,48 +20,74 @@ chpasswd:
<entry name="serial">foobar</entry>
</system>
</sysinfo>
- <os>
- <type arch="i686">hvm</type>
+ <os firmware="efi">
+ <type arch="x86_64" machine="q35">hvm</type>
<smbios mode="sysinfo"/>
</os>
<features>
- <pae/>
+ <acpi/>
+ <apic/>
</features>
- <clock offset="utc"/>
+ <cpu mode="host-passthrough"/>
+ <clock offset="utc">
+ <timer name="rtc" tickpolicy="catchup"/>
+ <timer name="pit" tickpolicy="delay"/>
+ <timer name="hpet" present="no"/>
+ </clock>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
- <emulator>/usr/bin/test-hv</emulator>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
<source file="/pool-dir/testvol1.img"/>
- <target dev="hda" bus="ide"/>
+ <target dev="vda" bus="virtio"/>
</disk>
- <controller type="usb" model="ich9-ehci1"/>
- <controller type="usb" model="ich9-uhci1">
- <master startport="0"/>
- </controller>
- <controller type="usb" model="ich9-uhci2">
- <master startport="2"/>
- </controller>
- <controller type="usb" model="ich9-uhci3">
- <master startport="4"/>
- </controller>
- <interface type="user">
+ <controller type="usb" model="qemu-xhci" ports="15"/>
+ <controller type="pci" model="pcie-root"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <interface type="bridge">
+ <source bridge="testsuitebr0"/>
<mac address="00:11:22:33:44:55"/>
- <model type="e1000"/>
+ <model type="virtio"/>
</interface>
<console type="pty"/>
+ <channel type="unix">
+ <source mode="bind"/>
+ <target type="virtio" name="org.qemu.guest_agent.0"/>
+ </channel>
+ <tpm model="tpm-crb">
+ <backend type="emulator"/>
+ </tpm>
+ <memballoon model="virtio"/>
+ <rng model="virtio">
+ <backend model="random">/dev/urandom</backend>
+ </rng>
<disk type="file" device="cdrom">
+ <driver name="qemu" type="raw"/>
<source file="/VIRTINST-TESTSUITE/cloudinit.iso"/>
- <target dev="hdb" bus="ide"/>
+ <target dev="sda" bus="sata"/>
<readonly/>
</disk>
</devices>
<on_reboot>destroy</on_reboot>
</domain>
-<domain type="test">
+<domain type="kvm">
<name>fedora28</name>
<uuid>00000000-1111-2222-3333-444444444444</uuid>
<metadata>
@@ -77,42 +103,67 @@ chpasswd:
<entry name="serial">foobar</entry>
</system>
</sysinfo>
- <os>
- <type arch="i686">hvm</type>
+ <os firmware="efi">
+ <type arch="x86_64" machine="q35">hvm</type>
<boot dev="hd"/>
<smbios mode="sysinfo"/>
</os>
<features>
- <pae/>
+ <acpi/>
+ <apic/>
</features>
- <clock offset="utc"/>
+ <cpu mode="host-passthrough"/>
+ <clock offset="utc">
+ <timer name="rtc" tickpolicy="catchup"/>
+ <timer name="pit" tickpolicy="delay"/>
+ <timer name="hpet" present="no"/>
+ </clock>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
- <emulator>/usr/bin/test-hv</emulator>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
<source file="/pool-dir/testvol1.img"/>
- <target dev="hda" bus="ide"/>
+ <target dev="vda" bus="virtio"/>
</disk>
- <controller type="usb" model="ich9-ehci1"/>
- <controller type="usb" model="ich9-uhci1">
- <master startport="0"/>
- </controller>
- <controller type="usb" model="ich9-uhci2">
- <master startport="2"/>
- </controller>
- <controller type="usb" model="ich9-uhci3">
- <master startport="4"/>
- </controller>
- <interface type="user">
+ <controller type="usb" model="qemu-xhci" ports="15"/>
+ <controller type="pci" model="pcie-root"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <controller type="pci" model="pcie-root-port"/>
+ <interface type="bridge">
+ <source bridge="testsuitebr0"/>
<mac address="00:11:22:33:44:55"/>
- <model type="e1000"/>
+ <model type="virtio"/>
</interface>
<console type="pty"/>
+ <channel type="unix">
+ <source mode="bind"/>
+ <target type="virtio" name="org.qemu.guest_agent.0"/>
+ </channel>
+ <tpm model="tpm-crb">
+ <backend type="emulator"/>
+ </tpm>
+ <memballoon model="virtio"/>
+ <rng model="virtio">
+ <backend model="random">/dev/urandom</backend>
+ </rng>
<disk type="file" device="cdrom">
- <target dev="hdb" bus="ide"/>
+ <target dev="sda" bus="sata"/>
<readonly/>
</disk>
</devices>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index ca8d2340a..c3f7ab2ba 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -1017,8 +1017,9 @@ c = vinst.add_category("misc-install", "--nographics --noautoconsole")
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", "cloud-init-default", env={"VIRTINST_TEST_SUITE_CLOUDINIT": "1"}) # default --cloud-init behavior is root-password-generate=yes,disable=yes
-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_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("--connect %(URI-KVM-X86)s --disk %(EXISTIMG1)s --os-variant fedora28 --cloud-init --tpm default", "cloud-init-default", env={"VIRTINST_TEST_SUITE_CLOUDINIT": "1"}) # default --cloud-init behavior is root-password-generate=yes,disable=yes, forcing tpm
+c.add_compare("--connect %(URI-KVM-X86)s --disk %(EXISTIMG1)s --os-variant fedora28 --cloud-init root-password-generate=yes,disable=no --sysinfo system.serial=foobar --boot uefi", "cloud-init-options1", env={"VIRTINST_TEST_SUITE_PRINT_CLOUDINIT": "1"}) # --cloud-init root-password-generate, with --sysinfo override, with uefi
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
c.add_compare("--disk %(EXISTIMG1)s --os-variant fedora28 --cloud-init user-data=%(XMLDIR)s/cloudinit/user-data.txt,meta-data=%(XMLDIR)s/cloudinit/meta-data.txt", "cloud-init-options4", env={"VIRTINST_TEST_SUITE_PRINT_CLOUDINIT": "1"}) # --cloud-init user-data=,meta-data=
@@ -1177,6 +1178,7 @@ c.add_compare("--arch aarch64 --cdrom %(ISO-F26-NETINST)s --boot loader=CODE.fd,
c.add_compare("--connect %(URI-KVM-AARCH64)s --disk %(EXISTIMG1)s --import --os-variant fedora21 --panic default --graphics vnc", "aarch64-kvm-import") # --import test, but also test --panic no-op, and --graphics
c.add_compare("--connect %(URI-KVM-AARCH64)s --disk size=1 --os-variant fedora22 --features gic_version=host --network network=default,address.type=pci --controller type=scsi,model=virtio-scsi,address.type=pci", "aarch64-kvm-gic")
c.add_compare("--connect %(URI-KVM-AARCH64)s --osinfo fedora30 --arch aarch64 --disk none --pxe --boot firmware=efi", "aarch64-firmware-no-override")
+c.add_compare("--connect %(URI-KVM-AARCH64)s --disk %(EXISTIMG1)s --os-variant fedora28 --cloud-init", "aarch64-cloud-init")
--
2.41.0

View File

@ -0,0 +1,62 @@
From f44c6ec970413843214f52d5523ee8cf277b0150 Mon Sep 17 00:00:00 2001
From: Andrea Bolognani <abologna@redhat.com>
Date: Mon, 12 Dec 2022 19:38:22 +0100
Subject: [PATCH] virt-install: Document Secure Boot setups
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>
(cherry picked from commit 33ff193ee9fcfdb74f95d946a1b93239a1a12a61)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2112154
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
man/virt-install.rst | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/man/virt-install.rst b/man/virt-install.rst
index 684f22655..a0df73280 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
--
2.39.1

View File

@ -0,0 +1,42 @@
From 19b683f075d11b920552990d16b9a7a82eed12e3 Mon Sep 17 00:00:00 2001
From: Andrea Bolognani <abologna@redhat.com>
Date: Mon, 12 Dec 2022 19:32:32 +0100
Subject: [PATCH] virt-install: Recommend '--boot uefi'
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>
(cherry picked from commit f2b5aaf458764ec7ecf105038e5f2f7cc26b6c17)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2112154
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
man/virt-install.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/virt-install.rst b/man/virt-install.rst
index 3a6e8dcd2..684f22655 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.
--
2.39.1

View File

@ -0,0 +1,39 @@
From f68b3667591ab5f9edb9a40f9a7c0c798c923bc4 Mon Sep 17 00:00:00 2001
From: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
Date: Wed, 9 Nov 2022 18:33:56 +0900
Subject: [PATCH] virtinstall: Fix the allocating disk size printed by the
progress bar
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>
(cherry picked from commit 39c7a443146433766e4e71e48ab59145c74924b3)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2156247
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
virtinst/storage.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/virtinst/storage.py b/virtinst/storage.py
index 509f5cb06..617b05e0d 100644
--- a/virtinst/storage.py
+++ b/virtinst/storage.py
@@ -697,6 +697,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
--
2.39.0

View File

@ -0,0 +1,87 @@
From 91cd135f66b517cf247d031966c2f33343c23aa3 Mon Sep 17 00:00:00 2001
From: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
Date: Wed, 9 Nov 2022 18:33:57 +0900
Subject: [PATCH] virtinstall: Hide total_size in the progress bar if it
doesn't need
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>
(cherry picked from commit 6ec00474a659158f20248d6af3771d1a12ddac7b)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2156247
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
tests/data/meter/meter-zero.txt | 4 ++++
tests/test_misc.py | 14 ++++++++++++++
virtinst/_progresspriv.py | 8 ++++++--
3 files changed, 24 insertions(+), 2 deletions(-)
create mode 100644 tests/data/meter/meter-zero.txt
diff --git a/tests/data/meter/meter-zero.txt b/tests/data/meter/meter-zero.txt
new file mode 100644
index 000000000..fc81f21fd
--- /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 20f5a626b..2cabc3382 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 a035c9c43..207c64796 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)
--
2.39.0

View File

@ -0,0 +1,58 @@
From afb42b86ad8bd72930859968c92c084134e6d114 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Sat, 20 Aug 2022 09:54:01 -0400
Subject: [PATCH] virtinstall: fix regression with --boot and no install method
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>
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2144885
(cherry picked from commit e94786c066696781a821f5a4bcef3c377e4bc5e5)
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
tests/test_cli.py | 1 +
virtinst/virtinstall.py | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 774db098f..ca8d2340a 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -966,6 +966,7 @@ c.add_valid("--os-variant generic --pxe --ram 16", grep="Requested memory 16 MiB
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
diff --git a/virtinst/virtinstall.py b/virtinst/virtinstall.py
index 6d7f56b8d..20b901813 100644
--- a/virtinst/virtinstall.py
+++ b/virtinst/virtinstall.py
@@ -431,7 +431,7 @@ def build_installer(options, guest, installdata):
pass
elif (options.import_install or
options.xmlonly or
- options.boot or
+ options.boot_was_set or
options.cloud_init or
options.unattended):
no_install = True
@@ -641,6 +641,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)
--
2.38.1

View File

@ -7,8 +7,8 @@
# End local config
Name: virt-manager
Version: 3.2.0
Release: 4%{?dist}%{?extra_release}
Version: 4.1.0
Release: 5%{?dist}%{?extra_release}
%global verrel %{version}-%{release}
Summary: Desktop tool for managing virtual machines via libvirt
@ -18,27 +18,25 @@ URL: https://virt-manager.org/
Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
Source1: symlinks
Patch1: virt-manager-cli-introduce-resource-fibrechannel.appid-option.patch
Patch2: virt-manager-virt-install-add-mediated-device.patch
Patch3: virt-manager-virt-xml-add-support-for-mediated-devices.patch
Patch4: virt-manager-hostdev-use-method-get_mdev_uuid.patch
Patch5: virt-manager-tests-verify-MDEV-support.patch
Patch6: virt-manager-virt-manager-enable-MDEV-support.patch
Patch7: virt-manager-Handle-new-nodedev-name-for-mediated-devices.patch
Patch8: virt-manager-addstorage-Don-t-pass-None-to-widget.set_active.patch
Patch9: virt-manager-cli-add-ioapic.driver-to-features.patch
Patch10: virt-manager-console-fix-error-with-old-pygobject.patch
Patch1: virt-manager-cloner-Sync-uuid-and-sysinfo-system-uuid.patch
Patch2: virt-manager-virtinstall-fix-regression-with-boot-and-no-install-method.patch
Patch3: virt-manager-progress-Fix-showing-correct-final-total.patch
Patch4: virt-manager-virtinstall-Fix-the-allocating-disk-size-printed-by-the-progress-bar.patch
Patch5: virt-manager-virtinstall-Hide-total_size-in-the-progress-bar-if-it-doesn-t-need.patch
Patch6: virt-manager-virt-install-Recommend-boot-uefi.patch
Patch7: virt-manager-virt-install-Document-Secure-Boot-setups.patch
Patch8: virt-manager-tests-Add-more-cloud-init-and-TPM-test-cases.patch
Patch9: virt-manager-installer-drop-default-TPM-for-cloud-init-install-ph.patch
Requires: virt-manager-common = %{verrel}
Requires: python3-gobject
Requires: gtk3
Requires: python3-gobject >= 3.31.3
Requires: gtk3 >= 3.22.0
Requires: libvirt-glib >= 0.0.9
Requires: gtk-vnc2
Requires: spice-gtk3
# We can work with gtksourceview 3 or gtksourceview4, rhel has only the older one
Requires: gtksourceview3
# We can work with gtksourceview 3 or gtksourceview4, pick the latest one
Requires: gtksourceview4
# virt-manager is one of those apps that people will often install onto
# a headless machine for use over SSH. This means the virt-manager dep
@ -65,6 +63,7 @@ BuildRequires: git
BuildRequires: gettext
BuildRequires: python3-devel
BuildRequires: python3-docutils
BuildRequires: python3-setuptools
%description
@ -85,8 +84,8 @@ Requires: python3-requests
Requires: libosinfo >= 0.2.10
# Required for gobject-introspection infrastructure
Requires: python3-gobject-base
# Required for pulling files from iso media with isoinfo
Requires: genisoimage
# Required for pulling files from iso media
Requires: xorriso
%description common
Common files used by the different virt-manager interfaces, as well as
@ -137,7 +136,8 @@ git config gc.auto 0
%endif
./setup.py configure \
%{?_default_hvs}
%{?_default_hvs} \
--default-graphics=vnc
%install
@ -148,19 +148,12 @@ git config gc.auto 0
%if 0%{?py_byte_compile:1}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#manual-bytecompilation
%py_byte_compile %{python3} %{buildroot}%{_datadir}/virt-manager/
%py_byte_compile %{__python3} %{buildroot}%{_datadir}/virt-manager/
%endif
# Replace '#!/usr/bin/env python3' with '#!/usr/bin/python3'
# The format is ideal for upstream, but not a distro. See:
# https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython
for f in $(find %{buildroot} -type f -executable -print); do
sed -i "1 s|^#!/usr/bin/env python3|#!%{__python3}|" $f || :
done
%files
%doc README.md COPYING NEWS.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
@ -177,8 +170,10 @@ done
%files common -f %{name}.lang
%dir %{_datadir}/%{name}
%license COPYING
%doc README.md NEWS.md
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/virtinst
@ -197,86 +192,187 @@ done
%changelog
* Thu Mar 10 2022 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-4
- console: fix error with old pygobject (rhbz#2026987)
* Mon Oct 02 2023 Jonathon Jongsma <jjongsma@redhat.com> - 4.1.0-5
- On aarch64 the vm will shut off immediately shut off when using virt-install --cloud-init (RHEL-1705)
* Fri Jan 21 2022 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-3
- cli: add 'ioapic.driver' to --features (rhbz#2037202)
* Tue Feb 14 2023 Jonathon Jongsma <jjongsma@redhat.com> - 4.1.0-4
- virt-install: Recommend '--boot uefi' (rhbz#2112154)
- virt-install: Document Secure Boot setups (rhbz#2112154)
* Thu Dec 9 2021 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-2
- addstorage: Don't pass None to widget.set_active() (rhbz#2026987)
* Wed Feb 1 2023 Jonathon Jongsma <jjongsma@redhat.com> - 4.1.0-3
- progress: Fix showing correct final total (rhbz#2156247)
- virtinstall: Fix the allocating disk size printed by the progress bar (rhbz#2156247)
- virtinstall: Hide total_size in the progress bar if it doesn't need (rhbz#2156247)
* Fri Nov 19 2021 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-1
- Rebased to virt-manager-3.2.0 (rhbz#2009080)
- The rebase also fixes the following bugs:
rhbz#2001794
- cli: introduce --resource fibrechannel.appid option (rhbz#2011327)
- virt-install: add mediated device (rhbz#1995125)
- virt-xml: add support for mediated devices (rhbz#1995125)
- hostdev: use method get_mdev_uuid() (rhbz#1995125)
- tests: verify MDEV support (rhbz#1995125)
- virt-manager: enable MDEV support (rhbz#1995125)
- Handle new nodedev name for mediated devices (rhbz#2020241)
* Mon Dec 5 2022 Jonathon Jongsma <jjongsma@redhat.com> - 4.1.0-2
- virtinstall: fix regression with --boot and no install method (rhbz#2144885)
* Mon Nov 23 2020 Pavel Hrdina <phrdina@redhat.com> - 2.2.1-4
- virt-install: Use minutes instead of seconds on get_time_string() (rhbz#1777664)
- details: Fix showing the firmware type in case of firmware auto selection (rhbz#1857069)
- details: fix detection of firmware auto-selection (rhbz#1857069)
- domain: Fix VM deletion with firmare='efi' (rhbz#1869135)
- virt-xml: fix defined_xml_is_unchanged (rhbz#1857504)
* Tue Nov 15 2022 Jonathon Jongsma <jjongsma@redhat.com> - 4.1.0-1
- Rebased to virt-manager-4.1.0 (rhbz#2135791)
- cloner: Sync <uuid> and <sysinfo> system uuid (rhbz#2038040)
* Mon Dec 2 2019 Pavel Hrdina <phrdina@redhat.com> - 2.2.1-3
- guest: Drop set_capabilities_defaults call from get_uefi_path (rhbz#1753644)
- devices: video: Simplify model hvm check (rhbz#1753644)
- domcapabilities: Get video devices (rhbz#1753644)
- domcapabilities: Add supports_video_bochs() (rhbz#1753644)
- video: Prefer "bochs" when it's supported. (rhbz#1753644)
- addhardware: Add "bochs" display to the video list (rhbz#1753644)
- osdict: Always return the most generic tree (rhbz#1749865)
- osdict: Choose the most appropriate tree when a profile is set (rhbz#1749865)
* Thu Jul 7 2022 Jonathon Jongsma <jjongsma@redhat.com> - 4.0.0-1
- Rebased to virt-manager-4.0.0 (rhbz#2100525)
- virt-install: add support for qemu-vdagent channel (rhbz#2060724)
- virt-manager: add support for qemu-vdagent channel (rhbz#2060724)
* Fri Aug 16 2019 Pavel Hrdina <phrdina@redhat.com> - 2.2.1-2
- man: virt-install: Fix a couple of launchSecurity related typos (rhbz#1741846)
* Wed Feb 9 2022 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-14
- man: fix default value for filesystem accessmode option (rhbz#2045932)
* Thu Jul 11 2019 Pavel Hrdina <phrdina@redhat.com> - 2.2.1-1
- Rebased to virt-manager-2.2.1 (rhbz#1726535)
- The rebase also fixes the following bugs:
rhbz#1727881, rhbz#1724287, rhbz#1727811
- spec: add gtksourceview3 dependency introduced by upstream (rhbz#1722820)
- guest: fix warning message when machine type is changed for secure boot (rhbz#1727811)
* Mon Feb 7 2022 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-13
- cli: --filesystem: add binary.sandbox.mode and source.socket (rhbz#2045932)
- nodedev: Improve error with unknown address strings (rhbz#2017840)
* Mon Jun 24 2019 Pavel Hrdina <phrdina@redhat.com> - 2.2.0-2
- xmleditor: Handle gtksourceview3 as well as gtksourceview4 (rhbz#1722820)
- xmleditor: Fix the gtksource version checking (rhbz#1722820)
- spec: add gtksourceview3 dependency introduced by upstream (rhbz#1722820)
* Thu Jan 20 2022 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-12
- cli: add 'ioapic.driver' to --features (rhbz#2039127)
* Mon Jun 17 2019 Pavel Hrdina <phrdina@redhat.com> - 2.2.0-1
- Rebased to virt-manager-2.2.0 (rhbz#1721001)
- The rebase also fixes the following bugs:
rhbz#1718065, rhbz#1714304, rhbz#1709857, rhbz#1707379, rhbz#1700354
rhbz#1692489, rhbz#1690687, rhbz#1690685, rhbz#1683609, rhbz#1679018
rhbz#1677019, rhbz#1671599, rhbz#1667025, rhbz#1666597, rhbz#1663430
rhbz#1661867, rhbz#1660467, rhbz#1660123, rhbz#1659354, rhbz#1658511
rhbz#1648939, rhbz#1599139, rhbz#1508147, rhbz#1501608
- spec: add build dependencies that are now required for build (rhbz#1721001)
* Fri Nov 19 2021 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-11
- Handle new nodedev name for mediated devices (rhbz#2023650)
* Fri Feb 8 2019 Pavel Hrdina <phrdina@redhat.com> - 2.0.0-4
- inspection: fix check of null icon (rhbz#1671278)
* Thu Nov 11 2021 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-10
- cli: introduce --resource fibrechannel.appid option (rhbz#2011328)
* Fri Feb 1 2019 Pavel Hrdina <phrdina@redhat.com> - 2.0.0-3
- diskbackend: Fix backtrace cloning with block storage (bz #1661986) (rhbz#1661986)
* Thu Sep 9 2021 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-9
- virt-install: add mediated device (rhbz#1995131)
- virt-xml: add support for mediated devices (rhbz#1995131)
- hostdev: use method get_mdev_uuid() (rhbz#1995131)
- tests: verify MDEV support (rhbz#1995131)
- virt-manager: enable MDEV support (rhbz#1995131)
* Fri Dec 21 2018 Pavel Hrdina <phrdina@redhat.com> - 2.0.0-2
- virt-install: Fix description for --os-variant (rhbz#1649406)
- virt-install: Add "Guest OS" options group (rhbz#1649406)
- virt-xml: Accept --os-variant option (rhbz#1649406)
- tests: Add some tests for virt-xml with KVM (rhbz#1649406)
- virt-xml: Start using --os-variant (rhbz#1649406)
- cli: s390x+graphics specified, use video=virtio (bz #1654994) (rhbz#1654994)
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.2.0-8
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Jul 30 2021 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-7
- urlfetcher: Silence xorisso stderr output (rhbz#1973236)
* Fri Jul 23 2021 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-6
- installer: Prefer xorrisofs over genisoimage/mkisofs (rhbz#1973236)
- urlfetcher: Factor out ISOReader class (rhbz#1973236)
- urlfetcher: Add xorriso ISOReader implementation (rhbz#1973236)
- urlfetcher: Delete the 'isoinfo' ISOReader (rhbz#1973236)
- Add gating.yaml for RHEL-9 (rhbz#1984222)
* Wed Jun 09 2021 Jonathon Jongsma <jjongsma@redhat.com> - 3.2.0-5
- Disable spice options in virt-manager. Resolves: rhbz#1946939
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.2.0-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jan 11 2021 Cole Robinson <crobinso@redhat.com> - 3.2.0-2
- Fix 'domain not found' race (bz #1901081)
* Sat Nov 14 2020 Cole Robinson <crobinso@redhat.com> - 3.2.0-1
- Update to version 3.2.0
- Slim down filesystem device editor UI
- Fix TOCTTOU virt-install bugs (Martin Pitt)
- Several other bug fixes
* Wed Sep 30 2020 Cole Robinson <crobinso@redhat.com> - 3.1.0-1
- Update to version 3.1.0
* Tue Sep 15 2020 Cole Robinson <crobinso@redhat.com> - 3.0.0-1
- Update to version 3.0.0
* Mon Aug 31 2020 Cole Robinson <aintdiscole@gmail.com> - 2.2.1-6
- spec: Switch to latest Fedora bytecompile macros
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-5
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jul 03 2019 Cole Robinson <crobinso@redhat.com> - 2.2.1-1
- Rebased to version 2.2.1
- CVE-2019-10183: Replace --unattended user-password and admin-password with
user-password-file and admin-password-file (Fabiano Fidêncio)
- Consistent --memballoon default across non-x86 (Andrea Bolognani)
- virt-install: add --numatune memnode.* (Athina Plaskasoviti)
- Drop hard dep on gtksourceview4, gtksourceview3 is fine as well
* Tue Jun 18 2019 Cole Robinson <crobinso@redhat.com> - 2.2.0-2
- Add missing dep on gtksourceview
* Mon Jun 17 2019 Cole Robinson <crobinso@redhat.com> - 2.2.0-1
- Rebased to version 2.2.0
- libvirt XML viewing and editing UI for new and existing domain, pools,
volumes, networks
- virt-install: libosinfo --unattended support (Fabiano Fidêncio, Cole
Robinson)
- Improve CPU model security defaults (Pavel Hrdina)
- virt-install: new --install option. Ex: virt-install --install fedora29
- virt-install: new --install kernel=,initrd=
- virt-install: --disk, --memory, --name defaults from libosinfo (Fabiano
Fidêncio, Cole Robinson)
- virt-install: add device suboption aliases which consistently match
libvirt XML naming
- virt-xml: new --start, --no-define options (Marc Hartmayer)
- virt-install: Add driver_queues argument to --controller (Vasudeva Kamath)
- RISC-V support (Andrea Bolognani)
- Device default improvements for non-x86 KVM (Andrea Bolognani)
- Redesigned 'New Network' wizard
- libguestfs inspection improvements (Pino Toscano)
- virt-install: Add support for xenbus controller (Jim Fehlig)
- cli: Add --disk wwn=,rawio= (Athina Plaskasoviti)
- cli: Add --memballoon autodeflate=,stats.period= (Athina Plaskasoviti)
- cli: Add --iothreads (Athina Plaskasoviti)
- cli: Add --numatune memory.placement (Athina Plaskasoviti)
- cli: Add --launchSecurity option (Erik Skultety)
- cli: Fill in --memorybacking options
- cli: --smartcard: support database= and certificate[0-9]*=
- cli: --sysinfo: Add chasis suboptions
- cli: --metadata: add genid= and genid_enable=
- cli: --vcpus: add vcpus.vcpu[0-9]* config
- cli: fill in all common char source options for --serial, --parellel,
--console, --channel, --smartcard, --rng, --redirdev
* Wed Apr 03 2019 Cole Robinson <crobinso@redhat.com> - 2.1.0-2
- Fix --initrd-inject with f30 URLs (bz #1686464)
* Sun Feb 03 2019 Cole Robinson <crobinso@redhat.com> - 2.1.0-1
- Rebased to version 2.1.0
- Bash autocompletion support (Lin Ma, Cole Robinson)
- UI and command line --vsock support (Slavomir Kaslev)
- virt-xml: Add --os-variant option (Andrea Bolognani)
- virt-install: use libosinfo cpu, mem, disk size defaults (Fabiano
Fidencio)
- virt-install: Better usage of libosinfo -unknown distro IDs (Fabiano
Fidencio)
- virt-install: More usage of libosinfo for ISO --location detection
- virt-install: Add --location LOCATION,kernel=X,initrd=Y for pointing to
kernel/initrd in media that virt-install/libosinfo fails to detect
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Oct 15 2018 Cole Robinson <crobinso@redhat.com> - 2.0.0-1
- Rebased to version 2.0.0
- Use q35 default for appropriate OS (bz #1599777)
- Finish port to Python 3
- Improved VM defaults: q35 PCIe, usb3, CPU host-model
- Search based OS selection UI for new VMs
- Track OS name for lifetime of domain in <metadata> XML
- Host interface management UI has been completely removed
- Show domain IP on interface details page
* Fri Sep 07 2018 Cole Robinson <crobinso@redhat.com> - 1.6.0-1.3.3.git3bc7ff24c
- Enable arm32+uefi (bz #1613996)
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-0.3.git3bc7ff24c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.6.0-0.2.git3bc7ff24c
- Rebuilt for Python 3.7
* Thu Apr 26 2018 Cole Robinson <crobinso@redhat.com> - 1.6.0-0.1.git3bc7ff24c
- Update to latest git snapshot, contains python3 port