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
4 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
4 weeks, 1 day
[PATCH] meson: Replace meson.source_root() with meson.project_source_root()
by Michal Privoznik
The source_root() method is deprecated in 0.56.0 and we're
recommended to use project_source_root() instead.
This is similar to commit v8.9.0-rc1~70 but somehow, the old
method sneaked in.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index c1a2e6eadb..f8eff99e2c 100644
--- a/meson.build
+++ b/meson.build
@@ -17,7 +17,7 @@ endif
i18n = import('i18n')
-po_dir = meson.source_root() / 'po'
+po_dir = meson.project_source_root() / 'po'
# figure out if we are building from git
--
2.45.2
4 weeks, 1 day
[PATCH] access: fix po_check when polkit is disabled
by Daniel P. Berrangé
The generated org.libvirt.api.policy.in file was recently added to the
POTFILES list as it contains translatable messages.
It is only generated when WITH_POLKIT && WITH_LIBVIRTD is satisfied
though, resulting in the 'po_check' syntax rule failing if either of
those conditions are not met.
It is harmless to unconditionally generate this file, as a separate
rule takes care of of installing it, and the latter remains under
the build conditions.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/access/meson.build | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/access/meson.build b/src/access/meson.build
index 0cc9cf2b79..d1336c0093 100644
--- a/src/access/meson.build
+++ b/src/access/meson.build
@@ -63,19 +63,22 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
)
endforeach
+# Generated outside the WITH_POLKIT / WITH_LIBVIRTD condition
+# because syntax-check/po_check requires this to exist
+polgen = custom_target(
+ 'org.libvirt.api.policy.in',
+ input: access_perm_h,
+ output: 'org.libvirt.api.policy.in',
+ command: [ meson_python_prog, python3_prog, genpolkit_prog, '@INPUT@' ],
+ capture: true,
+ build_by_default: true,
+)
+access_generated += polgen
+
if conf.has('WITH_POLKIT')
access_sources += access_polkit_sources
if conf.has('WITH_LIBVIRTD')
- polgen = custom_target(
- 'org.libvirt.api.policy.in',
- input: access_perm_h,
- output: 'org.libvirt.api.policy.in',
- command: [ meson_python_prog, python3_prog, genpolkit_prog, '@INPUT@' ],
- capture: true,
- build_by_default: true,
- )
- access_generated += polgen
i18n.merge_file(
input: polgen,
--
2.47.1
4 weeks, 1 day
[PATCH] qemu: support vlan change for linux host bridge during update-device
by Laine Stump
Since we previously only supported vlan tagging for interfaces
connected to an OVS bridge [*], the code in qemuChangeNet() (used by
the update-device API) assumed an interface with modified vlan config
was on an OVS bridge, and would call the OVS-specific
virNetDevOpenvswitchUpdateVlan().
Now that we support vlan tagging for interfaces connected to a
standard Linux host bridge, we must check the type of connection and
only call the OVS function when connected to an OVS bridge *both
before and after the update*. Otherwise we just set the flag to
re-connect to the bridge, which has the side effect of redoing the
vlan setup.
([*] or an SRIOV VF assigned using VFIO, but we don't support *any
runtime changes to that type of netdev so it's irrelevant here.)
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
I'm fine with this going in either before or after the 11.0.0 release
(would prefer before since it is a bugfix), but if it's going into the
release I'd rather it be included with RC2 rather than only in the
final release. For that reason, if someone ACKs the patch and agrees
that it's safe to go in, please push it for me (since Jiri will almost
certainly tag RC2 before I'm conscious on Monday morning)
src/qemu/qemu_hotplug.c | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index de0777d330..5a7e6c3b12 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -4144,8 +4144,13 @@ qemuDomainChangeNet(virQEMUDriver *driver,
* they don't apply to a particular type.
*/
- if (!virNetDevVlanEqual(virDomainNetGetActualVlan(olddev),
- virDomainNetGetActualVlan(newdev))) {
+ /* since attaching to a new bridge will re-do the vlan setup,
+ * we don't need to separately do that in the case that we're
+ * already switching to a different bridge
+ */
+ if (!(needBridgeChange ||
+ virNetDevVlanEqual(virDomainNetGetActualVlan(olddev),
+ virDomainNetGetActualVlan(newdev)))) {
needVlanUpdate = true;
}
@@ -4215,6 +4220,23 @@ qemuDomainChangeNet(virQEMUDriver *driver,
needReplaceDevDef = true;
}
+ if (needVlanUpdate) {
+ if (virDomainNetDefIsOvsport(olddev) && virDomainNetDefIsOvsport(newdev)) {
+ /* optimization if we're attached to an OVS bridge. This
+ * will redo vlan setup without needing to re-attach the
+ * tap device to the bridge
+ */
+ if (virNetDevOpenvswitchUpdateVlan(newdev->ifname, &newdev->vlan) < 0)
+ goto cleanup;
+ } else {
+ /* vlan setup is done as a part of reconnecting the tap
+ * device to a new bridge (either OVS or Linux host bridge).
+ */
+ needBridgeChange = true;
+ }
+ needReplaceDevDef = true;
+ }
+
if (needBridgeChange) {
if (qemuDomainChangeNetBridge(vm, olddev, newdev) < 0)
goto cleanup;
@@ -4266,12 +4288,6 @@ qemuDomainChangeNet(virQEMUDriver *driver,
goto cleanup;
}
- if (needVlanUpdate) {
- if (virNetDevOpenvswitchUpdateVlan(newdev->ifname, &newdev->vlan) < 0)
- goto cleanup;
- needReplaceDevDef = true;
- }
-
if (needReplaceDevDef) {
/* the changes above warrant replacing olddev with newdev in
* the domain's nets list.
--
2.47.1
4 weeks, 1 day
[PATCH 0/2] news: add a couple items before release
by Laine Stump
This adds a "new feature" for the VLAN tagging support on Linux host
bridges added by Leigh Brown, and an "improvement" (migration between
mdev<->SRIOV vGPUs) by me.
Feel free to push this for me so it can be included in RC2.
*** BLURB HERE ***
Laine Stump (2):
news: note addition of vlan tagging support for Linux host bridges
news: document support for mdev <-> SRIOV VF vGPU live migration
NEWS.rst | 13 +++++++++++++
1 file changed, 13 insertions(+)
--
2.47.1
4 weeks, 1 day
[PATCH] qemu_migration: Do not consider post-copy active in postcopy-recover
by Jiri Denemark
The postcopy-recover migration state in QEMU means a connection for the
migration stream was established. Depending on the schedulers on both
hosts a relative timing of the corresponding MIGRATION event on the
source host and the destination host may differ. Specifically it's
possible that the source sees postcopy-recover while the destination is
still in postcopy-paused.
Currently the Perform phase on the source host ends when we get
postcopy-recover event and the Finish phase on the destination host is
called. If this is fast enough we can still see postcopy-paused state
when the Finish phase starts waiting for migration to complete. This is
interpreted as a failure and reported back to the caller. Even though
the recovery may actually start just a few moments later.
To avoid this race we now don't consider post-copy migration active in
postcopy-recover state and keep waiting for postcopy-active event (in
the success path). Thus the Finish phase is entered only after the
migration switches to postcopy-active. In this state QEMU guarantees the
destination already switched at least to postcopy-recover and we won't
be confused be seeing an old postcopy-failed state.
https://issues.redhat.com/browse/RHEL-73085
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_migration.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 50e350b0c4..1582a738a3 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1872,11 +1872,11 @@ qemuMigrationUpdateJobType(virDomainJobData *jobData)
switch ((qemuMonitorMigrationStatus) priv->stats.mig.status) {
case QEMU_MONITOR_MIGRATION_STATUS_POSTCOPY:
- case QEMU_MONITOR_MIGRATION_STATUS_POSTCOPY_RECOVER:
jobData->status = VIR_DOMAIN_JOB_STATUS_POSTCOPY;
break;
case QEMU_MONITOR_MIGRATION_STATUS_POSTCOPY_RECOVER_SETUP:
+ case QEMU_MONITOR_MIGRATION_STATUS_POSTCOPY_RECOVER:
jobData->status = VIR_DOMAIN_JOB_STATUS_POSTCOPY_RECOVER;
break;
--
2.47.1
4 weeks, 1 day
[PATCH] conf: Do not parse hyperv features with passthrough mode
by Martin Kletzander
The schema does not allow that anyway and we then format them all back
which leads to libvirt producing an invalid XML.
Resolves: https://issues.redhat.com/browse/RHEL-70656
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/conf/domain_conf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index e658b68c48b6..3f88a77a8fea 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -16643,6 +16643,9 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def,
def->features[VIR_DOMAIN_FEATURE_HYPERV] = mode;
+ if (mode == VIR_DOMAIN_HYPERV_MODE_PASSTHROUGH)
+ return 0;
+
node = xmlFirstElementChild(node);
while (node != NULL) {
int feature;
--
2.47.1
4 weeks, 1 day
Virtual manager error
by Domenico Panella
Hi everyone,
when i try to run a VM through virt-manager application (Slackware 15),
I get the following error:
*Errore nell'avvio del dominio: internal error: unknown architecture
'loongarch64'**
**
**Traceback (most recent call last):**
** File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in
cb_wrapper**
** callback(asyncjob, *args, **kwargs)**
** File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in
tmpcb**
** callback(*args, **kwargs)**
** File "/usr/share/virt-manager/virtManager/object/libvirtobject.py",
line 57, in newfn**
** ret = fn(self, *args, **kwargs)**
** File "/usr/share/virt-manager/virtManager/object/domain.py", line
1402, in startup**
** self._backend.create()**
** File "/usr/lib64/python3.9/site-packages/libvirt.py", line 1373, in
create**
** raise libvirtError('virDomainCreate() failed')**
**libvirt.libvirtError: internal error: unknown architecture 'loongarch64'*
How can i fix it?
Cordially
Domenico
4 weeks, 1 day
[PATCH v4 0/4] iproute2 bridge vlan support
by Leigh Brown
I have incorporated Laine's feedback and added Reviewed-by tags. I also
noticed that I hadn't updated the patch series description, so I updated
it to reflect the change to using netlink, for posterity.
Description
-----------
The iproute2 bridge command supports the capability for VLAN filtering
that allows each interface connected to a standard linux bridge to be
configured to use one or more VLANs. For simple setups, this capability
is enough to allow virtual machines or containers to be put onto
separate VLANs without creating multiple bridges and VLANs on the host.
The first patch adds a new function virNetDevBridgeVlanFilterSet that
allows a VLAN filter to be added or removed from an interface associated
with a bridge.
The second patch adds virNetDevBridgeSetupVlans that will, given a
virNetDevVlan structure, call virNetDevBridgeVlanFilterSet to apply the
required VLAN filtering for the given interface.
The third patch adjusts the domain and network validation to permit
standard linux bridges to allow VLAN configuration and updates calls to
virNetDevBridgeAddPort to pass the VLAN configuration.
The fourth patch updates documentation to match the new capability.
Changes since v3
----------------
- Update patch series description.
- Fix coding style.
- Add G_GNUC_UNUSED annotation to virNetDevBridgeAddPort for MacOS.
Changes since v2
----------------
- Convert to use netlink rather than executing bridge vlan commands.
- Add unsupported on this platform error message on FreeBSD.
Changes since v1
----------------
- Fix bug in virNetDevSetupVlans where bridge port has no native vlan.
- Update bridge network validation to permit vlan configuration.
- Update documentation to match the functionality.
- Tweak some of the commit descriptions for clarity.
Usage example
-------------
Configure the host with systemd-networkd as follows:
/etc/systemd/network/br0.netdev (br0.network not shown)
[NetDev]
Name=br0
Kind=bridge
MACAddress=xx:xx:xx:xx:xx:xx
[Bridge]
VLANFiltering=on
/etc/systemd/network/eno1.network
[Match]
Name=eno1
[Network]
Bridge=br0
[Link]
MTUBytes=9000
[BridgeVLAN]
VLAN=40
[BridgeVLAN]
VLAN=60
Then add <vlan> tags into the lxc or qemu config:
lxc interface definition:
<interface type='bridge'>
<mac address='xx:xx:xx:xx:xx:xx'/>
<source bridge='br0'/>
<vlan>
<tag id='40'/>
</vlan>
</interface>
qemu interface definition:
<interface type='network'>
<mac address='xx:xx:xx:xx:xx:xx'/>
<source network='br0'/>
<vlan>
<tag id='60'/>
</vlan>
<model type='virtio'/>
<address type='pci' domain='0x0000'
bus='0x01' slot='0x00' function='0x0'/>
</interface>
Then, after starting them, you will see the following
$ sudo bridge vlan
port vlan-id
eno1 1 PVID Egress Untagged
40
60
br0 1 PVID Egress Untagged
vnet0 60 PVID Egress Untagged
vnet1 40 PVID Egress Untagged
Regards,
Leigh Brown (4):
util: add netlink bridge vlan filtering
util: Add vlan support to virNetDevBridgeAddPort
Enable vlan support for standard linux bridges
docs: standard linux bridges now support vlans
docs/formatdomain.rst | 37 +++++++++---------
docs/formatnetwork.rst | 45 +++++++++++-----------
src/conf/domain_validate.c | 3 +-
src/lxc/lxc_process.c | 2 +-
src/network/bridge_driver.c | 13 ++++---
src/util/virnetdevbridge.c | 75 +++++++++++++++++++++++++++++++++++--
src/util/virnetdevbridge.h | 4 +-
src/util/virnetdevtap.c | 2 +-
src/util/virnetlink.c | 66 ++++++++++++++++++++++++++++++++
src/util/virnetlink.h | 7 ++++
10 files changed, 201 insertions(+), 53 deletions(-)
--
2.39.5
1 month