Release of libvirt-11.0.0
by Jiri Denemark
The 11.0.0 release of both libvirt and libvirt-python is tagged and
signed tarballs are available at
https://download.libvirt.org/
https://download.libvirt.org/python/
Thanks everybody who helped with this release by sending patches,
reviewing, testing, or providing feedback. Your work is greatly
appreciated.
* New features
* network/qemu/lxc: support vlans on standard Linux host bridges
The network, qemu, and lxc drivers now support (using the
``<vlan>`` subelement) vlan tagging and trunking on network
interfaces connected to a standard Linux host bridge.
* qemu: Add support for direct and extended tlbflush features
Domains can now utilise more tlbflush hyperv features.
* Improvements
* ch: Enable user aliases
User can now specify custom aliases for devices in domain XML
* qemu: Grab a QUERY job when formatting domain XML
Under some specific conditions it might have happened that domain XML did
not contain runtime information or returned an XML that's in process of
changing (e.g. by a thread that's hotplugging a device). Formatting domain
XML now serializes properly with other threads.
* virtiofs: Allow read only mode
The ``<filesystem/>`` with `virtiofsd` backend can now use ``<readonly/>``
tag to export underlying filesystem in read only mode.
* qemu: allow migration of vGPU from mdev device <-> SRIOV VF device
Some GPU vendors are switching from using vGPUs creating using
mdev and identified with a uuid, to vGPUs created as SRIOV VFs and
identified by their PCI address, and want to support live
migration from a host using one type of vGPU to the other
type. This is now possible.
* Bug fixes
* qemu: tpm: do not update profile name for transient domains
Fix a possible crash when starting a transient domain which was
introduced in the previous release.
* qemu: Fix snapshot to not delete disk image with internal snapshot
When a VM has internal snapshot that is parent to external snapshot and user
reverts to the internal snapshot and deletes the external snapshot libvirt
would delete the disk image containing the internal snapshot. This would
result in data loss.
* qemu: Do not format invalid XML with hyperv features in passthrough mode
When hyperv features were specified together with ``mode="passthrough"``
libvirt parsed and formatted such features in the domain XML even though
they were not used at all, resulting in XML that is not valid based on our
schema. This is now fixed by not parsing any specified features when the
passthrough mode is used.
* qemu: Fix a crash when starting a domain with ovs bridge and QOS
* cpu: Add missing -v1 variants for CPU models
Some CPU models (mostly old ones) were missed when versioned CPU model
names were introduced in the previous release.
* qemu: Fix false error when recovering failed post-copy migration
In some cases libvirt would report a failure to recover post-copy migration
even though the recovery started just fine and migration would eventually
successfully finish.
Enjoy.
Jirka
3 weeks
[PATCH 00/20] qemu: support mapped-ram+directio+mulitfd
by Jim Fehlig
This series is essentially V1 of a prior RFC [1] to support QEMU's
mapped-ram stream format [2] and migration capability. Along with
supporting mapped-ram, it implements a design approach we discussed
for supporting parallel save/restore [3]. In summary, the approach is
1. Add mapped-ram migration capability
2. Steal an element from save header 'unused' for a 'features' variable
and bump save version to 3.
3. Add /etc/libvirt/qemu.conf knob for the save format version,
defaulting to latest v3
4. Use v3 (aka mapped-ram) by default
5. Use mapped-ram with BYPASS_CACHE for v3, old approach for v2
6. include: Define constants for parallel save/restore
7. qemu: Add support for parallel save. Implies mapped-ram, reject if v2
8. qemu: Add support for parallel restore. Implies mapped-ram.
Reject if v2
9. tools: add parallel parameter to virsh save command
10. tools: add parallel parameter to virsh restore command
With this series, saving and restoring using mapped-ram is enabled by
default if the underlying QEMU advertises the mapped-ram migration
capability. It can be disabled by changing the 'save_image_version'
setting in qemu.conf.
To use mapped-ram with QEMU:
- The 'mapped-ram' migration capability must be set to true
- The 'multifd' migration capability must be set to true and
the 'multifd-channels' migration parameter must set to a
value >= 1
- QEMU must be provided an fdset containing the migration fd(s)
- The 'migrate' qmp command is invoked with a URI referencing the fdset
and an offset where to start reading or writing the data stream, e.g.
{"execute":"migrate",
"arguments":{"detach":true,"resume":false,
"uri":"file:/dev/fdset/0,offset=0x11921"}}
The mapped-ram stream, in conjunction with direct IO and multifd, can
significantly improve the time required to save VM memory state. The
following tables compare mapped-ram with the existing, sequential save
stream. In all cases, the save and restore operations are to/from a
block device comprised of two NVMe disks in RAID0 configuration with
xfs (~8600MiB/s). The values in the 'save time' and 'restore time'
columns were scraped from the 'real' time reported by time(1). The
'Size' and 'Blocks' columns were provided by the corresponding
outputs of stat(1).
VM: 32G RAM, 1 vcpu, idle (shortly after boot)
| save | restore |
| time | time | Size | Blocks
-----------------------+---------+---------+--------------+--------
legacy | 6.193s | 4.399s | 985744812 | 1925288
-----------------------+---------+---------+--------------+--------
mapped-ram | 5.109s | 1.176s | 34368554354 | 1774472
-----------------------+---------+---------+--------------+--------
legacy + direct IO | 5.725s | 4.512s | 985765251 | 1925328
-----------------------+---------+---------+--------------+--------
mapped-ram + direct IO | 4.627s | 1.490s | 34368554354 | 1774304
-----------------------+---------+---------+--------------+--------
mapped-ram + direct IO | | | |
+ multifd-channels=8 | 4.421s | 0.845s | 34368554318 | 1774312
-------------------------------------------------------------------
VM: 32G RAM, 30G dirty, 1 vcpu in tight loop dirtying memory
| save | restore |
| time | time | Size | Blocks
-----------------------+---------+---------+--------------+---------
legacy | 25.800s | 14.332s | 33154309983 | 64754512
-----------------------+---------+---------+--------------+---------
mapped-ram | 18.742s | 15.027s | 34368559228 | 64617160
-----------------------+---------+---------+--------------+---------
legacy + direct IO | 13.115s | 18.050s | 33154310496 | 64754520
-----------------------+---------+---------+--------------+---------
mapped-ram + direct IO | 13.623s | 15.959s | 34368557392 | 64662040
-----------------------+-------- +---------+--------------+---------
mapped-ram + direct IO | | | |
+ multifd-channels=8 | 6.994s | 6.470s | 34368554980 | 64665776
--------------------------------------------------------------------
As can be seen from the tables, one caveat of mapped-ram is the logical file
size of a saved image is basically equivalent to the VM memory size. Note
however that mapped-ram typically uses fewer blocks on disk.
Support for mapped-ram+direct-io only recently landed in upstream QEMU
and will first appear in the 9.1 release, which may complicate merging
support in libvirt. Specifically, I'm not sure how to detect if the
combination is supported by QEMU. Suggestions welcomed.
Similar to the RFC, V1 ignores compression. libvirt currently supports
compression by connecting the output of QEMU's save stream to the specified
compression program via a pipe. This approach is incompatible with mapped-ram
since the fd provided to QEMU must be seekable. In general, we can consider
mapped-ram and compression incompatible and document they cannot be used
together.
[1] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/E...
[2] https://gitlab.com/qemu-project/qemu/-/blob/master/docs/devel/migration/m...
[3] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/K...
Claudio Fontana (2):
include: Define constants for parallel save/restore
tools: add parallel parameter to virsh restore command
Jim Fehlig (17):
lib: virDomainSaveParams: Ensure absolute save path
qemu_fd: Add function to retrieve fdset ID
qemu: Add function to check capability in migration params
qemu: Add function to get bool value from migration params
qemu: Add mapped-ram migration capability
qemu: Add function to get migration params for save
qemu: QEMU_SAVE_VERSION: Bump to version 3
qemu: conf: Add setting for save image version
qemu: Add helper function for creating save image fd
qemu: Add support for mapped-ram on save
qemu: Decompose qemuSaveImageOpen
qemu: Move creation of qemuProcessIncomingDef struct
qemu: Apply migration parameters in qemuMigrationDstRun
qemu: Add support for mapped-ram on restore
qemu: Support O_DIRECT with mapped-ram on save
qemu: Support O_DIRECT with mapped-ram on restore
qemu: Add support for parallel save and restore
Li Zhang (1):
tools: add parallel parameter to virsh save command
docs/manpages/virsh.rst | 9 +-
include/libvirt/libvirt-domain.h | 13 ++
src/libvirt-domain.c | 52 +++++--
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf.in | 6 +
src/qemu/qemu_conf.c | 16 +++
src/qemu/qemu_conf.h | 5 +
src/qemu/qemu_driver.c | 104 +++++++++-----
src/qemu/qemu_fd.c | 18 +++
src/qemu/qemu_fd.h | 3 +
src/qemu/qemu_migration.c | 192 +++++++++++++++++--------
src/qemu/qemu_migration.h | 9 +-
src/qemu/qemu_migration_params.c | 86 ++++++++++++
src/qemu/qemu_migration_params.h | 17 +++
src/qemu/qemu_monitor.c | 39 ++++++
src/qemu/qemu_monitor.h | 5 +
src/qemu/qemu_process.c | 120 +++++++++++-----
src/qemu/qemu_process.h | 19 ++-
src/qemu/qemu_saveimage.c | 216 ++++++++++++++++++++---------
src/qemu/qemu_saveimage.h | 35 +++--
src/qemu/qemu_snapshot.c | 26 ++--
src/qemu/test_libvirtd_qemu.aug.in | 1 +
tools/virsh-domain.c | 79 +++++++++--
23 files changed, 827 insertions(+), 244 deletions(-)
--
2.35.3
3 weeks
[PATCH] NEWS: Document some of my fixes in this release
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
NEWS.rst | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 15042595ed..1d3e3c3cff 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -61,6 +61,19 @@ v11.0.0 (unreleased)
schema. This is now fixed by not parsing any specified features when the
passthrough mode is used.
+ * qemu: Fix a crash when starting a domain with ovs bridge and QOS
+
+ * cpu: Add missing -v1 variants for CPU models
+
+ Some CPU models (mostly old ones) were missed when versioned CPU model
+ names were introduced in the previous release.
+
+ * qemu: Fix false error when recovering failed post-copy migration
+
+ In some cases libvirt would report a failure to recover post-copy migration
+ even though the recovery started just fine and migration would eventually
+ successfully finish.
+
v10.10.0 (2024-12-02)
=====================
--
2.47.1
3 weeks
[PATCH] NEWS: Add few things I changed this release
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
NEWS.rst | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 9f0804ec67ff..02679602cc6a 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -17,6 +17,10 @@ v11.0.0 (unreleased)
* **New features**
+ * qemu: Add support for direct and extended tlbflush features
+
+ Domains can now utilise more tlbflush hyperv features.
+
* **Improvements**
* ch: Enable user aliases
@@ -42,6 +46,14 @@ v11.0.0 (unreleased)
Fix a possible crash when starting a transient domain which was
introduced in the previous release.
+ * qemu: Do not format invalid XML with hyperv features in passthrough mode
+
+ When hyperv features were specified together with ``mode="passthrough"``
+ libvirt parsed and formatted such features in the domain XML even though
+ they were not used at all, resulting in XML that is not valid based on our
+ schema. This is now fixed by not parsing any specified features when the
+ passthrough mode is used.
+
v10.10.0 (2024-12-02)
=====================
--
2.48.0
3 weeks
[PATCH] NEWS: Document features/improvements/bug fixes I've participated in
by Michal Privoznik
There are some features/improvements/bug fixes I've either
contributed or reviewed/merged. Document them for upcoming
release.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
NEWS.rst | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index eedb6008bd..9f0804ec67 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -19,6 +19,22 @@ v11.0.0 (unreleased)
* **Improvements**
+ * ch: Enable user aliases
+
+ User can now specify custom aliases for devices in domain XML
+
+ * qemu: Grab a QUERY job when formatting domain XML
+
+ Under some specific conditions it might have happened that domain XML did
+ not contain runtime information or returned an XML that's in process of
+ changing (e.g. by a thread that's hotplugging a device). Formatting domain
+ XML now serializes properly with other threads.
+
+ * virtiofs: Allow read only mode
+
+ The ``<filesystem/>`` with `virtiofsd` backend can now use ``<readonly/>``
+ tag to export underlying filesystem in read only mode.
+
* **Bug fixes**
* qemu: tpm: do not update profile name for transient domains
--
2.45.2
3 weeks
[libvirt PATCH] NEWS: document bug fix for snapshots
by Pavel Hrdina
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
NEWS.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 08d1d24d48..98f489dfb0 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -21,6 +21,13 @@ v11.0.0 (unreleased)
* **Bug fixes**
+ * qemu: Fix snapshot to not delete disk image with internal snapshot
+
+ When a VM has internal snapshot that is parent to external snapshot and user
+ reverts to the internal snapshot and deletes the external snapshot Libvirt
+ would delete the disk image containing the internal snapshot. This would result
+ in data loss.
+
v10.10.0 (2024-12-02)
=====================
--
2.47.1
3 weeks
[libvirt PATCH] NEWS: document fix for starting transient domains
by Ján Tomko
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
NEWS.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 08d1d24d48..eedb6008bd 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -21,6 +21,11 @@ v11.0.0 (unreleased)
* **Bug fixes**
+ * qemu: tpm: do not update profile name for transient domains
+
+ Fix a possible crash when starting a transient domain which was
+ introduced in the previous release.
+
v10.10.0 (2024-12-02)
=====================
--
2.47.0
3 weeks
[PATCH] docs: Reword virDomainGetEmulatorPinInfo description
by Martin Kletzander
This API only queries the XML settings and not the running threads
themselves. In order to avoid confusion, change the wording slightly.
Resolves: https://issues.redhat.com/browse/RHEL-72052
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/libvirt-domain.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index e8e5379672ae..275d65b8c16b 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -7998,8 +7998,8 @@ virDomainPinEmulator(virDomainPtr domain, unsigned char *cpumap,
* Must not be VIR_DOMAIN_AFFECT_LIVE and
* VIR_DOMAIN_AFFECT_CONFIG concurrently.
*
- * Query the CPU affinity setting of all emulator threads of domain, store
- * it in cpumap.
+ * Query the CPU pinning setting of all emulator threads from the domain XML,
+ * store it in cpumap.
*
* Returns 1 in case of success,
* 0 in case of no emulator threads are pined to pcpus,
--
2.48.0
3 weeks, 1 day
Entering freeze for libvirt-11.0.0
by Jiri Denemark
I have just tagged v11.0.0-rc1 in the repository and pushed signed
tarballs to https://download.libvirt.org/
Please give the release candidate some testing and in case you find a
serious issue which should have a fix in the upcoming release, feel
free to reply to this thread to make sure the issue is more visible.
If you have not done so yet, please update NEWS.rst to document any
significant change you made since the last release.
Thanks,
Jirka
3 weeks, 1 day
[PATCH 0/2] storage_file: Refuse qcow2 images with empty string as 'data_file'
by Peter Krempa
See patch 1/2 for justification. Patch 2 is a test case.
Peter Krempa (2):
storage_file: Refuse qcow2 images with empty string as 'data_file'
virstoragetest: Add case for qcow2 image with empty string as
'data_file'
src/storage_file/storage_source.c | 10 ++++++++++
tests/virstoragetest.c | 5 +++++
.../images/datafile-emptystr.qcow2 | Bin 0 -> 327680 bytes
3 files changed, 15 insertions(+)
create mode 100644 tests/virstoragetestdata/images/datafile-emptystr.qcow2
--
2.47.1
3 weeks, 1 day