recommendations for handling Hyper-V version number
by Matt Coleman
Hello again,
Hyper-V version numbers are not compatible with the encoding used in virParseVersionString:
https://gitlab.com/libvirt/libvirt/-/blob/master/src/util/virutil.c#L246
For example, the Windows Server 2016 Hyper-V version is 10.0.14393.0, so its “micro” is over 14 times larger than the encoding allows.
My current workaround is to truncate it to something that works (E.G. 10.0.143), but that's clearly less than ideal.
Is the output of virParseVersionString stored on disk at any point? Would changing its output type from unsigned long to unsigned long long cause any compatibility issues? That would allow “minor” and “micro” to be up to 6 digits each and would be a quick, easy change.
Thanks,
Matt
4 years, 2 months
[PATCH v4 00/11] qemu: Add <transient/> disk support
by Peter Krempa
This version:
- is rebased on top of current refactors
- has more strict rules in the validation
- adds tests
- fixes bug with disk-unplug
Masayoshi Mizuma (5):
qemu: Block blockjobs when transient disk option is enabled
qemu: Block disk hotplug when transient disk option is enabled
qemu: Block migration when transient disk option is enabled
qemu: process: Handle transient disks on VM startup
qemu: validate: Allow <transient/> disks
Peter Krempa (6):
virDomainSnapshotDiskDefFree: Export and register as autoptr func
qemu: prepare cleanup for <transient/> disk overlays
qemu: snapshot: Introduce helpers for creating overlays on
<transient/> disks
qemu: hotplug: Remove overlay of <transient> disk on disk unplug
tests: qemuxml2argv: Fix and enable 'disk-transient' case
TODO: Add news entry
TODO | 0
docs/formatdomain.rst | 5 +-
src/conf/snapshot_conf.h | 5 +
src/conf/snapshot_conf_priv.h | 3 -
src/qemu/qemu_domain.c | 9 ++
src/qemu/qemu_domain.h | 4 +
src/qemu/qemu_hotplug.c | 15 +++
src/qemu/qemu_migration.c | 10 ++
src/qemu/qemu_process.c | 27 ++++++
src/qemu/qemu_snapshot.c | 91 ++++++++++++++++++-
src/qemu/qemu_snapshot.h | 5 +
src/qemu/qemu_validate.c | 56 ++++++++++--
.../disk-transient.x86_64-4.1.0.err | 1 +
.../disk-transient.x86_64-latest.args | 42 +++++++++
tests/qemuxml2argvdata/disk-transient.xml | 4 +-
tests/qemuxml2argvtest.c | 2 +
16 files changed, 265 insertions(+), 14 deletions(-)
create mode 100644 TODO
create mode 100644 tests/qemuxml2argvdata/disk-transient.x86_64-4.1.0.err
create mode 100644 tests/qemuxml2argvdata/disk-transient.x86_64-latest.args
--
2.26.2
4 years, 2 months
[PATCH] NEWS: Mention qcow2 cluster size being preserved accross snapshots and iSCSI hostdev fixes
by Peter Krempa
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
NEWS.rst | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index e992fbe471..97417033f4 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -55,8 +55,20 @@ v6.8.0 (unreleased)
the previous behavior with an improvement: it also reflects the auto-aligned
value in the domain XML.
+ * qemu: Preserve qcow2 cluster size after external snapshots
+
+ The new overlay image which is installed on top of the current chain when
+ taking an external snapshot now preserves the cluser size of the original
+ top image to preserve any performance tuning done on the original image.
+
* **Bug fixes**
+ * qemu: Various (i)SCSI backed hostdev fixes
+
+ (i)SCSI backed hostdevs now work again with an arbitrarily long
+ user-specified device alias and also honor the 'readonly' property after a
+ recent rewrite.
+
* **Removed features**
* node_device: Remove HAL node device backend
--
2.26.2
4 years, 2 months
[PATCH] qemu: clear residual QMP caps processes during QEMU driver initialization
by Bihong Yu
>From c328ff62b11d58553fd2032a85fd3295e009b3d3 Mon Sep 17 00:00:00 2001
From: Bihong Yu <yubihong(a)huawei.com>
Date: Fri, 17 Jul 2020 16:55:12 +0800
Subject: [PATCH] qemu: clear residual QMP caps processes during QEMU driver
initialization
In some cases, the QMP capabilities processes possible residue. So we need to
clear the residual QMP caps processes during starting libvirt.
Signed-off-by:Bihong Yu <yubihong(a)huawei.com>
---
src/qemu/qemu_driver.c | 2 ++
src/qemu/qemu_process.c | 40 ++++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_process.h | 2 ++
3 files changed, 44 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d185666..d627fd7 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -889,6 +889,8 @@ qemuStateInitialize(bool privileged,
run_gid = cfg->group;
}
+ qemuProcessQMPClear(cfg->libDir);
+
qemu_driver->qemuCapsCache = virQEMUCapsCacheNew(cfg->libDir,
cfg->cacheDir,
run_uid,
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 70fc24b..d545e3e 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8312,6 +8312,46 @@ static qemuMonitorCallbacks callbacks = {
};
+/**
+ * qemuProcessQMPClear
+ *
+ * Try to kill residual QMP caps processes
+ */
+void
+qemuProcessQMPClear(const char *libDir)
+{
+ virErrorPtr orig_err;
+ DIR *dirp = NULL;
+ struct dirent *dp;
+
+ if (!virFileExists(libDir))
+ return;
+
+ if (virDirOpen(&dirp, libDir) < 0)
+ return;
+
+ virErrorPreserveLast(&orig_err);
+ while (virDirRead(dirp, &dp, libDir) > 0) {
+ g_autofree char *qmp_uniqDir = NULL;
+ g_autofree char *qmp_pidfile = NULL;
+
+ if (!STRPREFIX(dp->d_name, "qmp-"))
+ continue;
+
+ qmp_uniqDir = g_strdup_printf("%s/%s", libDir, dp->d_name);
+ qmp_pidfile = g_strdup_printf("%s/%s", qmp_uniqDir, "qmp.pid");
+
+ ignore_value(virPidFileForceCleanupPath(qmp_pidfile));
+
+ if (qmp_uniqDir)
+ rmdir(qmp_uniqDir);
+ }
+ virErrorRestore(&orig_err);
+
+ VIR_DIR_CLOSE(dirp);
+}
+
+
static void
qemuProcessQMPStop(qemuProcessQMPPtr proc)
{
diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h
index 15e67b9..b039e6c 100644
--- a/src/qemu/qemu_process.h
+++ b/src/qemu/qemu_process.h
@@ -233,6 +233,8 @@ qemuProcessQMPPtr qemuProcessQMPNew(const char *binary,
gid_t runGid,
bool forceTCG);
+void qemuProcessQMPClear(const char *libDir);
+
void qemuProcessQMPFree(qemuProcessQMPPtr proc);
int qemuProcessQMPStart(qemuProcessQMPPtr proc);
--
1.8.3.1
4 years, 2 months
Help on Meson build Error
by Wei Wang
Seems it didn't appear on the mailing list, resent it.
Hi folks,
I'm trying to build libvirt using meson with the latest upstream libvirt,
but the compilation fails:
(followed on https://libvirt.org/compiling.html, not sure if any
dependencies are missed. I checked, src/util/libvirt_util.a.p does not
exist.)
FAILED: src/util/libvirt_util.a.p/glibcompat.c.o
....
In file included from ../src/util/glibcompat.c:19:
./config.h:1026:10: fatal error: config-post.h: No such file or directory
FAILED: src/util/libvirt_util.a.p/virfirmware.c.o
In file included from ../src/util/virarch.c:22:
./config.h:1026:10: fatal error: config-post.h: No such file or directory
FAILED: src/util/libvirt_util.a.p/viraudit.c.o
In file included from ../src/util/viraudit.c:22:
./config.h:1026:10: fatal error: config-post.h: No such file or directory
Any help is appreciated.
Thanks,
Wei
4 years, 2 months
[libvirt PATCH] gitdm: add more individual contributors
by Pino Toscano
Signed-off-by: Pino Toscano <ptoscano(a)redhat.com>
---
docs/gitdm/groups/unaffiliated | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/docs/gitdm/groups/unaffiliated b/docs/gitdm/groups/unaffiliated
index 5f867fc5e4..1ca7eee81f 100644
--- a/docs/gitdm/groups/unaffiliated
+++ b/docs/gitdm/groups/unaffiliated
@@ -14,6 +14,7 @@ gmx.de
googlemail.com
hotmail.com
mail.ru
+mailbox.org
outlook.com
pobox.com
protonmail.com
@@ -43,11 +44,14 @@ cky(a)cky.nz
contact(a)puzio.waw.pl
d.herrendoerfer(a)herrendoerfer.name
dan(a)danny.cz
+davem(a)davemloft.net
debfx(a)fobos.de
eike(a)sf-mail.de
exo(a)tty.sk
+fedora(a)borsoi.fr
fritz(a)fritz-elfert.de
gene(a)czarc.net
+git(a)ryandesign.com
gordon(a)dragonsdawn.net
gregor(a)kopka.net
heathpetersen(a)kandre.com
@@ -59,9 +63,11 @@ jaak(a)ristioja.ee
james410(a)cowgill.org.uk
james(a)shubin.ca
jasper(a)humppa.nl
+jean-baptiste(a)holcroft.fr
jeremy(a)goop.org
jk(a)ozlabs.org
jwm(a)horde.net
+kevin(a)kevinlocke.name
klaus(a)ethgen.de
lacos(a)caesar.elte.hu
lenaic(a)lhuard.fr.eu.org
@@ -71,6 +77,7 @@ marti(a)juffo.org
max(a)rfc2324.org
michael(a)ellerman.id.au
mike(a)very.puzzling.org
+milo(a)milo.name
n0ano(a)n0ano.com
neil(a)aldur.co.uk
nobody(a)nowhere.ws
@@ -81,11 +88,14 @@ richard(a)nod.at
rmy(a)tigress.co.uk
ruben(a)rubenkerkhof.com
rufo(a)rufoa.com
+scott-libvirt(a)shambarger.net
+shemminger(a)vyatta.com
slawek(a)kaplonski.pl
soulxu(a)soulxu-thinkpad-t410.(none)
stybla(a)turnovfree.net
tai(a)rakugaki.org
thomas(a)scripty.at
+toscano.pino(a)tiscali.it
v.tolstov(a)selfip.ru
ville.skytta(a)iki.fi
vincent(a)bernat.im
--
2.26.2
4 years, 2 months
[libvirt PATCH] meson: drop HTML4 variants of rst2html
by Daniel P. Berrangé
We stopped supportin Ubuntu 16.04 earlier in the year, so there is no
reason to keep the HTML4 variants of rst2html around.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
meson.build | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index bc52079809..2e57a435df 100644
--- a/meson.build
+++ b/meson.build
@@ -898,8 +898,7 @@ required_programs = [
required_programs_groups = [
{'name':'rpcgen', 'prog':['rpcgen', 'portable-rpcgen']},
- # Drop the rst2html (aka HTML4) variants once we stop supporting Ubuntu 16.04 (Xenial)
- {'name':'rst2html', 'prog':['rst2html5', 'rst2html5.py', 'rst2html5-3', 'rst2html', 'rst2html.py', 'rst2html-3']},
+ {'name':'rst2html', 'prog':['rst2html5', 'rst2html5.py', 'rst2html5-3']},
{'name':'rst2man', 'prog':['rst2man', 'rst2man.py', 'rst2man-3']},
]
--
2.26.2
4 years, 2 months
[PATCH] meson: don't check for libutil.h except on FreeBSD
by Daniel P. Berrangé
The libutil.h we are after is explicitly only something we want on
FreeBSD, we don't want to accidentally pick up this header on other
platforms as it can lead to build failures.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 4d42468a51..bc52079809 100644
--- a/meson.build
+++ b/meson.build
@@ -685,7 +685,6 @@ headers = [
'asm/hwcap.h',
'ifaddrs.h',
'libtasn1.h',
- 'libutil.h',
'linux/kvm.h',
'linux/magic.h',
'mntent.h',
@@ -711,6 +710,10 @@ if host_machine.system() == 'linux'
headers += 'linux/devlink.h'
endif
+if host_machine.system() == 'freebsd'
+ headers += 'libutil.h'
+endif
+
foreach name : headers
if cc.has_header(name)
conf.set('WITH_@0@'.format(name.underscorify().to_upper()), 1)
--
2.26.2
4 years, 2 months
[libvirt PATCH 0/5] Use g_new0 more (glib chronicles)
by Ján Tomko
Remove VIR_ALLOC* from tools/ (with the exception
of vsh*alloc, which will be cleaned up later)
and some random subdirs from src/
Ján Tomko (5):
node_device: use g_new0 instead of VIR_ALLOC*
openvz: use g_new0 instead of VIR_ALLOC*
secret: use g_new0 instead of VIR_ALLOC*
security: use g_new0 instead of VIR_ALLOC*
tools: use g_new0 instead of VIR_ALLOC*
src/node_device/node_device_udev.c | 27 +++++++++------------------
src/openvz/openvz_conf.c | 12 ++++--------
src/openvz/openvz_driver.c | 3 +--
src/secret/secret_driver.c | 3 +--
src/security/security_apparmor.c | 3 +--
src/security/security_dac.c | 9 +++------
src/security/security_manager.c | 14 +++++---------
src/security/security_selinux.c | 9 +++------
src/security/security_stack.c | 6 ++----
tools/virsh-domain-monitor.c | 11 +++--------
tools/virsh-domain.c | 26 ++++++++------------------
tools/virt-admin-completer.c | 12 +-----------
tools/virt-login-shell-helper.c | 13 ++++---------
tools/vsh-table.c | 21 +++++++--------------
tools/vsh.c | 5 +----
15 files changed, 53 insertions(+), 121 deletions(-)
--
2.26.2
4 years, 2 months
[PATCH FOR 6.8.0] libxl: Don't free def member of virDomainObj
by Jim Fehlig
The refactoring in commit de49d5bad3 accidentally dropped the statement
setting def to NULL after successfully adding it to the virDomainObjList,
causing it to be freed while still in use. The resulting memory
corruption caused unpredictable behavior, often resulting in a libvirtd
crash.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
Unpredictable is an understatement! When running monolithic libvirtd with
both qemu and xen drviers enabled, qemu crashed while initializing. Recall
it is initialized after xen.
Thread 17 "daemon-init" received signal SIGSEGV, Segmentation fault.
#0 0x00007f32e5fbe9e3 in _int_malloc () at /lib64/libc.so.6
#1 0x00007f32e5fbf6e0 in _int_realloc () at /lib64/libc.so.6
#2 0x00007f32e5fc0729 in realloc () at /lib64/libc.so.6
#3 0x00007f32e6dc21b8 in g_realloc () at /usr/lib64/libglib-2.0.so.0
#4 0x00007f32e7532090 in virReallocN (ptrptr=0x7f329affcad8, size=1, count=1403)
at ../src/util/viralloc.c:91
#5 0x00007f32e75530c7 in virCommandProcessIO (cmd=0x7f328807ff40) at ../src/util/vircommand.c:2271
#6 0x00007f32e7553a6a in virCommandRun (cmd=0x7f328807ff40, exitstatus=0x0)
at ../src/util/vircommand.c:2451
#7 0x00007f32e75dde73 in virSysinfoReadDMI () at ../src/util/virsysinfo.c:1237
#8 0x00007f32e75de0cb in virSysinfoRead () at ../src/util/virsysinfo.c:1294
#9 0x00007f32a240b69d in qemuStateInitialize
(privileged=true, root=0x0, callback=0x56453a0b3e97 <daemonInhibitCallback>, opaque=0x56453b000030) at ../src/qemu/qemu_driver.c:658
#10 0x00007f32e7832350 in virStateInitialize
(privileged=true, mandatory=false, root=0x0, callback=0x56453a0b3e97 <daemonInhibitCallback>, opaque=0x56453b000030) at ../src/libvirt.c:656
#11 0x000056453a0b4175 in daemonRunStateInit (opaque=0x56453b000030)
at ../src/remote/remote_daemon.c:596
src/libxl/libxl_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 083738871d..571b70f982 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -627,6 +627,7 @@ libxlAddDom0(libxlDriverPrivatePtr driver)
NULL)))
goto cleanup;
+ def = NULL;
vm->persistent = 1;
virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_BOOTED);
}
--
2.28.0
4 years, 2 months