[libvirt] [PATCH] domain_conf: Do not use USB by default for <input> devices on s390x
by Thomas Huth
When trying to specify an input device on s390x without bus like this:
<input type='keyboard'/>
... then libvirt currently complains:
error: unsupported configuration: USB is disabled for this domain,
but USB devices are present in the domain XML
This is somewhat confusing since the user did not specify an USB
device here. Since USB is not available on s390x, we should default
to the "virtio" bus here instead.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1790189
Signed-off-by: Thomas Huth <thuth(a)redhat.com>
---
src/conf/domain_conf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1290241923..c3761b0f45 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13428,6 +13428,8 @@ virDomainInputDefParseXML(virDomainXMLOptionPtr xmlopt,
def->type == VIR_DOMAIN_INPUT_TYPE_KBD) &&
(ARCH_IS_X86(dom->os.arch) || dom->os.arch == VIR_ARCH_NONE)) {
def->bus = VIR_DOMAIN_INPUT_BUS_PS2;
+ } else if (ARCH_IS_S390(dom->os.arch)) {
+ def->bus = VIR_DOMAIN_INPUT_BUS_VIRTIO;
} else {
def->bus = VIR_DOMAIN_INPUT_BUS_USB;
}
--
2.18.1
4 years, 11 months
[libvirt] [PATCH 0/4] qemu: Don't lose domain on failed restore
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1718707
When restoring a domain we might leave a qemu process behind.
The problem is described in 4/4 in more detail, but the digest is: we
start qemu process successfully but then fail to restore its vCPUs and
leave qemu process running and forget about. I thought of two possible
ways to fix this:
1) Kill qemu process and claim error.
2) Don't kill qemu process and don't remove it from our internal list
and claim error.
I lean towards 1) because I find it clearer. If I were a mgmt app and
call 'virsh restore /path/to/domain.save' then I'd much rather see
either success or an error without any need for cleanup (which would be
implied if we went with number 2).
Michal Prívozník (4):
qemuDomainSaveImageStartVM: Use VIR_AUTOCLOSE for @intermediatefd
qemuDomainSaveImageStartVM: Use g_autoptr() for virCommand
qemu: Use g_autoptr() for qemuDomainSaveCookie
qemu: Stop domain on failed restore
src/qemu/qemu_domain.c | 28 ++++++++++------------------
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_driver.c | 37 +++++++++++++++++--------------------
3 files changed, 28 insertions(+), 38 deletions(-)
--
2.24.1
4 years, 11 months
[libvirt] [PATCH 0/3] news: Fix and update for libvirt 6.0.0
by Andrea Bolognani
<blurb/>
Andrea Bolognani (3):
news: Fix typo (Libivrt -> Libvirt)
news: Rearrange a few entries
news: Update for libvirt 6.0.0
docs/news.xml | 111 +++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 87 insertions(+), 24 deletions(-)
--
2.24.1
4 years, 11 months
[libvirt] [PATCH for 6.0.0] vircgroupv2devices: free BPF map when replacing with new one
by Pavel Hrdina
This leaks the FD of BPF map which means it will not be freed.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util/vircgroupv2devices.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/util/vircgroupv2devices.c b/src/util/vircgroupv2devices.c
index 402ce3f86f..445f9c53fc 100644
--- a/src/util/vircgroupv2devices.c
+++ b/src/util/vircgroupv2devices.c
@@ -311,6 +311,11 @@ virCgroupV2DevicesAttachProg(virCgroupPtr group,
VIR_FORCE_CLOSE(group->unified.devices.progfd);
}
+ if (group->unified.devices.mapfd > 0) {
+ VIR_DEBUG("Closing existing map that was replaced by new one.");
+ VIR_FORCE_CLOSE(group->unified.devices.mapfd);
+ }
+
group->unified.devices.progfd = progfd;
group->unified.devices.mapfd = mapfd;
group->unified.devices.max = max;
--
2.24.1
4 years, 11 months
[libvirt] [PATCH] qemu_capabilities: Do not report USB as subsystem type if it is not available
by Thomas Huth
libvirt currently always reports that USB is available as a bus subsystem
type when running "virsh domcapabilities". However, this is not always
true, for example the qemu-system-s390x binary normally never has support
for USB. Thus we should only report that USB is available if there is
also a USB host controller available where we can attach USB devices.
Reported-by: Sebastian Mitterle <smitterl(a)redhat.com>
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1759849
Signed-off-by: Thomas Huth <thuth(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 13 ++++++++++++-
tests/domaincapsdata/qemu_2.10.0.s390x.xml | 1 -
tests/domaincapsdata/qemu_2.11.0.s390x.xml | 1 -
tests/domaincapsdata/qemu_2.12.0.s390x.xml | 1 -
tests/domaincapsdata/qemu_2.7.0.s390x.xml | 1 -
tests/domaincapsdata/qemu_2.8.0.s390x.xml | 1 -
tests/domaincapsdata/qemu_2.9.0.s390x.xml | 1 -
tests/domaincapsdata/qemu_3.0.0.s390x.xml | 1 -
tests/domaincapsdata/qemu_4.0.0.s390x.xml | 1 -
tests/domaincapsdata/qemu_4.2.0.s390x.xml | 1 -
10 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index da0c7a257f..261cca19a7 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -5674,10 +5674,21 @@ virQEMUCapsFillDomainDeviceHostdevCaps(virQEMUCapsPtr qemuCaps,
VIR_DOMAIN_STARTUP_POLICY_OPTIONAL);
VIR_DOMAIN_CAPS_ENUM_SET(hostdev->subsysType,
- VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB,
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI,
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI);
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI) ||
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX4_USB_UHCI) ||
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_EHCI) ||
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_USB_EHCI1) ||
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_VT82C686B_USB_UHCI) ||
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_OHCI) ||
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_NEC_USB_XHCI) ||
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_QEMU_XHCI)) {
+ VIR_DOMAIN_CAPS_ENUM_SET(hostdev->subsysType,
+ VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB);
+ }
+
/* No virDomainHostdevCapsType for QEMU */
virDomainCapsEnumClear(&hostdev->capsType);
diff --git a/tests/domaincapsdata/qemu_2.10.0.s390x.xml b/tests/domaincapsdata/qemu_2.10.0.s390x.xml
index bf3f13887f..b41ca5158c 100644
--- a/tests/domaincapsdata/qemu_2.10.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_2.10.0.s390x.xml
@@ -168,7 +168,6 @@
<value>optional</value>
</enum>
<enum name='subsysType'>
- <value>usb</value>
<value>pci</value>
<value>scsi</value>
</enum>
diff --git a/tests/domaincapsdata/qemu_2.11.0.s390x.xml b/tests/domaincapsdata/qemu_2.11.0.s390x.xml
index 9b3b18d320..ad4e6b0500 100644
--- a/tests/domaincapsdata/qemu_2.11.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_2.11.0.s390x.xml
@@ -167,7 +167,6 @@
<value>optional</value>
</enum>
<enum name='subsysType'>
- <value>usb</value>
<value>pci</value>
<value>scsi</value>
</enum>
diff --git a/tests/domaincapsdata/qemu_2.12.0.s390x.xml b/tests/domaincapsdata/qemu_2.12.0.s390x.xml
index af7a04fb01..9736d6a42d 100644
--- a/tests/domaincapsdata/qemu_2.12.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_2.12.0.s390x.xml
@@ -166,7 +166,6 @@
<value>optional</value>
</enum>
<enum name='subsysType'>
- <value>usb</value>
<value>pci</value>
<value>scsi</value>
</enum>
diff --git a/tests/domaincapsdata/qemu_2.7.0.s390x.xml b/tests/domaincapsdata/qemu_2.7.0.s390x.xml
index 258000dbaf..b19a4c9fed 100644
--- a/tests/domaincapsdata/qemu_2.7.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_2.7.0.s390x.xml
@@ -71,7 +71,6 @@
<value>optional</value>
</enum>
<enum name='subsysType'>
- <value>usb</value>
<value>pci</value>
<value>scsi</value>
</enum>
diff --git a/tests/domaincapsdata/qemu_2.8.0.s390x.xml b/tests/domaincapsdata/qemu_2.8.0.s390x.xml
index cc858f538c..30d2f7ff1f 100644
--- a/tests/domaincapsdata/qemu_2.8.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_2.8.0.s390x.xml
@@ -152,7 +152,6 @@
<value>optional</value>
</enum>
<enum name='subsysType'>
- <value>usb</value>
<value>pci</value>
<value>scsi</value>
</enum>
diff --git a/tests/domaincapsdata/qemu_2.9.0.s390x.xml b/tests/domaincapsdata/qemu_2.9.0.s390x.xml
index fe2c023956..2476e95181 100644
--- a/tests/domaincapsdata/qemu_2.9.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_2.9.0.s390x.xml
@@ -153,7 +153,6 @@
<value>optional</value>
</enum>
<enum name='subsysType'>
- <value>usb</value>
<value>pci</value>
<value>scsi</value>
</enum>
diff --git a/tests/domaincapsdata/qemu_3.0.0.s390x.xml b/tests/domaincapsdata/qemu_3.0.0.s390x.xml
index 68bcafd62f..a297bf9ef1 100644
--- a/tests/domaincapsdata/qemu_3.0.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_3.0.0.s390x.xml
@@ -173,7 +173,6 @@
<value>optional</value>
</enum>
<enum name='subsysType'>
- <value>usb</value>
<value>pci</value>
<value>scsi</value>
</enum>
diff --git a/tests/domaincapsdata/qemu_4.0.0.s390x.xml b/tests/domaincapsdata/qemu_4.0.0.s390x.xml
index 4298b148fd..21ddd27cb9 100644
--- a/tests/domaincapsdata/qemu_4.0.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_4.0.0.s390x.xml
@@ -178,7 +178,6 @@
<value>optional</value>
</enum>
<enum name='subsysType'>
- <value>usb</value>
<value>pci</value>
<value>scsi</value>
</enum>
diff --git a/tests/domaincapsdata/qemu_4.2.0.s390x.xml b/tests/domaincapsdata/qemu_4.2.0.s390x.xml
index c6d92542c3..101d9d028b 100644
--- a/tests/domaincapsdata/qemu_4.2.0.s390x.xml
+++ b/tests/domaincapsdata/qemu_4.2.0.s390x.xml
@@ -172,7 +172,6 @@
<value>optional</value>
</enum>
<enum name='subsysType'>
- <value>usb</value>
<value>pci</value>
<value>scsi</value>
</enum>
--
2.18.1
4 years, 11 months
[libvirt] [jenkins-ci PATCH] lcitool: Mark Fedora kernel packages as user-installed
by Andrea Bolognani
>From time to time we hit
https://bugzilla.redhat.com/show_bug.cgi?id=1741381
which result in 'dnf autoremove' failing. The suggested workaround
is to manually mark kernel packages as user-installed, so let's do
that every single time just in case.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/playbooks/update/tasks/base.yml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/guests/playbooks/update/tasks/base.yml b/guests/playbooks/update/tasks/base.yml
index f085f19..97f365e 100644
--- a/guests/playbooks/update/tasks/base.yml
+++ b/guests/playbooks/update/tasks/base.yml
@@ -100,6 +100,13 @@
when:
- package_format == 'pkg'
+- name: Clean up packages after update
+ command: '{{ package_manager }} mark install "kernel*"'
+ args:
+ warn: no
+ when:
+ - os_name == 'Fedora'
+
- name: Clean up packages after update
shell: '{{ package_manager }} clean packages -y && {{ package_manager }} autoremove -y'
args:
--
2.24.1
4 years, 11 months
[libvirt] [PATCH for 6.0.0] qemuxml2*test: Fix hugepages-default-system-size tests
by Jiri Denemark
Commit v5.10.0-269-g62065a6cb5 moved NUMA validation code to domain
definition time and appropriately adjusted affected test cases except
for hugepages-default-system-size. And since we don't mock
virGetSystemPageSizeKB in our tests, hugepages-default-system-size test
would fail on architectures (ppc64le) with default page size other than
4KiB.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
tests/qemuxml2argvtest.c | 2 +-
tests/qemuxml2xmltest.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 8af2ba38d3..560a012149 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -946,7 +946,7 @@ mymain(void)
QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD);
DO_TEST("hugepages-default", QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("hugepages-default-2M", QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-default-system-size", NONE);
+ DO_TEST("hugepages-default-system-size", QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST_PARSE_ERROR("hugepages-default-1G-nodeset-2M", NONE);
DO_TEST("hugepages-nodeset", QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST_PARSE_ERROR("hugepages-nodeset-nonexist",
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 262fc835f5..f7b6022819 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -293,7 +293,7 @@ mymain(void)
DO_TEST("pages-dimm-discard", NONE);
DO_TEST("hugepages-default", QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("hugepages-default-2M", QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("hugepages-default-system-size", NONE);
+ DO_TEST("hugepages-default-system-size", QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("hugepages-nodeset", QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("hugepages-numa-default-2M", QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("hugepages-numa-default-dimm", QEMU_CAPS_OBJECT_MEMORY_FILE);
--
2.24.1
4 years, 11 months
[libvirt] [PATCH 0/4] Fix formatting of encrypted disk secret info (for 6.0.0)
by Peter Krempa
See the last patch for explanation.
Peter Krempa (4):
tests: qemuxml2argv: Add disk image with encrypted backing file
tests: qemuxml2argv: Run luks-disks-source-qcow2 case with latest caps
tests: qemuxml2xml: Enable luks-disks-source-qcow2 case
conf: Always format storage source auth and encryption under <source>
for backing files
src/conf/backup_conf.c | 2 +-
src/conf/domain_conf.c | 13 ++-
src/conf/domain_conf.h | 1 +
src/conf/snapshot_conf.c | 2 +-
src/qemu/qemu_domain.c | 4 +-
tests/qemublocktest.c | 2 +-
.../luks-disks-source-qcow2.args | 8 ++
...luks-disks-source-qcow2.x86_64-latest.args | 110 ++++++++++++++++++
.../luks-disks-source-qcow2.xml | 18 +++
tests/qemuxml2argvtest.c | 1 +
.../luks-disks-source-qcow2.x86_64-latest.xml | 106 +++++++++++++++++
tests/qemuxml2xmltest.c | 1 +
tests/virstoragetest.c | 2 +-
13 files changed, 259 insertions(+), 11 deletions(-)
create mode 100644 tests/qemuxml2argvdata/luks-disks-source-qcow2.x86_64-latest.args
create mode 100644 tests/qemuxml2xmloutdata/luks-disks-source-qcow2.x86_64-latest.xml
--
2.24.1
4 years, 11 months
[libvirt] [PATCH] Fix typo (cetificate -> certificate)
by Andrea Bolognani
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
docs/manpages/virsh.rst | 2 +-
include/libvirt/libvirt-domain.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
index 6446a903ca..c637caa583 100644
--- a/docs/manpages/virsh.rst
+++ b/docs/manpages/virsh.rst
@@ -3182,7 +3182,7 @@ Providing *--tls* causes the migration to use the host configured TLS setup
the migration of the domain. Usage requires proper TLS setup for both source
and target. Normally the TLS certificate from the destination host must match
+the host's name for TLS verification to succeed. When the certificate does not
-+match the destination hostname and the expected cetificate's hostname is
++match the destination hostname and the expected certificate's hostname is
+known, *--tls-destination* can be used to pass the expected *hostname* when
+starting the migration.
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index c1b9a9d1d0..1d76cdcc34 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -1059,7 +1059,7 @@ typedef enum {
*
* Normally the TLS certificate from the destination host must match the host's
* name for TLS verification to succeed. When the certificate does not match
- * the destination hostname and the expected cetificate's hostname is known,
+ * the destination hostname and the expected certificate's hostname is known,
* this parameter can be used to pass this expected hostname when starting
* the migration.
*/
--
2.24.1
4 years, 11 months