[RFC PATCH 0/5] docs: formatdomain: Convert to rst
by Peter Krempa
The conversion was done using following steps:
https://gitlab.com/pipo.sk/libvirt/-/commit/3d7e23948564502ff01160a73abd3...
Output version is browsable at:
https://pipo.sk.gitlab.io/-/libvirt/-/jobs/638030149/artifacts/website/fo...
Note that this keeps existing anchors in place to prevent breaking
links.
Peter Krempa (5):
docs: css: Make definition list 'code' entries bold when converted
from rst
docs: Makefile: Distribute rst files meant for inclusion
docs: formatdomain: Convert to rst
docs: formatdomain: Split out <devices> section
docs: formatdomain-devices: Split out split <disk>
docs/Makefile.am | 3 +
docs/formatdomain-devices-disk.rst.in | 821 +++
docs/formatdomain-devices.rst.in | 4231 +++++++++++
docs/formatdomain.html.in | 9846 -------------------------
docs/formatdomain.rst | 2390 ++++++
docs/generic.css | 2 +-
6 files changed, 7446 insertions(+), 9847 deletions(-)
create mode 100644 docs/formatdomain-devices-disk.rst.in
create mode 100644 docs/formatdomain-devices.rst.in
delete mode 100644 docs/formatdomain.html.in
create mode 100644 docs/formatdomain.rst
--
2.26.2
4 years, 4 months
[libvirt PATCH 0/5] docs: platforms: Convert and simplify
by Andrea Bolognani
This makes our platform support policy easier to grasp, and also
explicitly allows us to drop Debian 9, which is EOL as of last week.
Andrea Bolognani (5):
docs: platforms: Add brief outline
docs: platforms: Convert to reStructuredText
docs: platforms: Simplify support policy
docs: platforms: Clarify stance on third-party LTS efforts
docs: platforms: Mention Windows API target
docs/platforms.html.in | 115 -----------------------------------------
docs/platforms.rst | 85 ++++++++++++++++++++++++++++++
2 files changed, 85 insertions(+), 115 deletions(-)
delete mode 100644 docs/platforms.html.in
create mode 100644 docs/platforms.rst
--
2.25.4
4 years, 4 months
[libvirt PATCH 0/2] ci: Refresh Dockerfiles
by Andrea Bolognani
Pushed under the "Dockerfile refresh" rule.
Andrea Bolognani (2):
ci: Exclude macOS when generating Dockerfiles
ci: Refresh Dockerfiles
ci/containers/libvirt-centos-7.Dockerfile | 2 ++
ci/containers/libvirt-centos-8.Dockerfile | 2 ++
ci/containers/libvirt-centos-stream.Dockerfile | 2 ++
ci/containers/libvirt-debian-10-cross-aarch64.Dockerfile | 2 ++
ci/containers/libvirt-debian-10-cross-armv6l.Dockerfile | 2 ++
ci/containers/libvirt-debian-10-cross-armv7l.Dockerfile | 2 ++
ci/containers/libvirt-debian-10-cross-i686.Dockerfile | 2 ++
ci/containers/libvirt-debian-10-cross-mips.Dockerfile | 2 ++
ci/containers/libvirt-debian-10-cross-mips64el.Dockerfile | 2 ++
ci/containers/libvirt-debian-10-cross-mipsel.Dockerfile | 2 ++
ci/containers/libvirt-debian-10-cross-ppc64le.Dockerfile | 2 ++
ci/containers/libvirt-debian-10-cross-s390x.Dockerfile | 2 ++
ci/containers/libvirt-debian-10.Dockerfile | 2 ++
ci/containers/libvirt-debian-9-cross-aarch64.Dockerfile | 2 ++
ci/containers/libvirt-debian-9-cross-armv6l.Dockerfile | 2 ++
ci/containers/libvirt-debian-9-cross-armv7l.Dockerfile | 2 ++
ci/containers/libvirt-debian-9-cross-mips.Dockerfile | 2 ++
ci/containers/libvirt-debian-9-cross-mips64el.Dockerfile | 2 ++
ci/containers/libvirt-debian-9-cross-mipsel.Dockerfile | 2 ++
ci/containers/libvirt-debian-9-cross-ppc64le.Dockerfile | 2 ++
ci/containers/libvirt-debian-9-cross-s390x.Dockerfile | 2 ++
ci/containers/libvirt-debian-9.Dockerfile | 2 ++
ci/containers/libvirt-debian-sid-cross-aarch64.Dockerfile | 2 ++
ci/containers/libvirt-debian-sid-cross-armv6l.Dockerfile | 2 ++
ci/containers/libvirt-debian-sid-cross-armv7l.Dockerfile | 2 ++
ci/containers/libvirt-debian-sid-cross-i686.Dockerfile | 2 ++
ci/containers/libvirt-debian-sid-cross-mips64el.Dockerfile | 2 ++
ci/containers/libvirt-debian-sid-cross-mipsel.Dockerfile | 2 ++
ci/containers/libvirt-debian-sid-cross-ppc64le.Dockerfile | 2 ++
ci/containers/libvirt-debian-sid-cross-s390x.Dockerfile | 2 ++
ci/containers/libvirt-debian-sid.Dockerfile | 2 ++
ci/containers/libvirt-fedora-31.Dockerfile | 2 ++
ci/containers/libvirt-fedora-32.Dockerfile | 2 ++
ci/containers/libvirt-fedora-rawhide-cross-mingw32.Dockerfile | 2 ++
ci/containers/libvirt-fedora-rawhide-cross-mingw64.Dockerfile | 2 ++
ci/containers/libvirt-fedora-rawhide.Dockerfile | 2 ++
ci/containers/libvirt-opensuse-151.Dockerfile | 4 +++-
ci/containers/libvirt-ubuntu-1804.Dockerfile | 2 ++
ci/containers/libvirt-ubuntu-2004.Dockerfile | 2 ++
ci/containers/refresh | 2 +-
40 files changed, 80 insertions(+), 2 deletions(-)
--
2.25.4
4 years, 4 months
[PATCH] storage: find vstorage-mount binary in runtime
by Nikolay Shirokovskiy
This allows us to use CI for vstorage driver without installing Virtuozzo
Storage packages. This way we can leave aside license considerations.
By the way we need to change configure defaults from 'check' to 'no' otherwise
vstorage driver will be build on any system with umount binary which is not
expected I guess.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
m4/virt-storage-vstorage.m4 | 17 +----------------
src/storage/storage_backend_vstorage.c | 9 ++++++++-
2 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/m4/virt-storage-vstorage.m4 b/m4/virt-storage-vstorage.m4
index e3b3bb4..cf0a543 100644
--- a/m4/virt-storage-vstorage.m4
+++ b/m4/virt-storage-vstorage.m4
@@ -21,30 +21,19 @@ dnl
AC_DEFUN([LIBVIRT_STORAGE_ARG_VSTORAGE], [
LIBVIRT_ARG_WITH_FEATURE([STORAGE_VSTORAGE],
[Virtuozzo Storage backend for the storage driver],
- [check])
+ [no])
])
AC_DEFUN([LIBVIRT_STORAGE_CHECK_VSTORAGE], [
if test "$with_storage_vstorage" = "yes" ||
test "$with_storage_vstorage" = "check"; then
- AC_PATH_PROG([VSTORAGE], [vstorage], [], [$LIBVIRT_SBIN_PATH])
- AC_PATH_PROG([VSTORAGE_MOUNT], [vstorage-mount], [], [$LIBVIRT_SBIN_PATH])
AC_PATH_PROG([UMOUNT], [umount], [], [$LIBVIRT_SBIN_PATH])
if test "$with_storage_vstorage" = "yes"; then
- if test -z "$VSTORAGE" || test -z "$VSTORAGE_MOUNT"; then
- AC_MSG_ERROR([We need vstorage and vstorage-mount tool for Vstorage storage driver]);
- fi
if test -z "$UMOUNT" ; then
AC_MSG_ERROR([We need umount for Vstorage storage driver]);
fi
else
- if test -z "$VSTORAGE" ; then
- with_storage_vstorage=no
- fi
- if test -z "$VSTORAGE_MOUNT" ; then
- with_storage_vstorage=no
- fi
if test -z "$UMOUNT" ; then
with_storage_vstorage=no
fi
@@ -57,10 +46,6 @@ AC_DEFUN([LIBVIRT_STORAGE_CHECK_VSTORAGE], [
if test "$with_storage_vstorage" = "yes" ; then
AC_DEFINE_UNQUOTED([WITH_STORAGE_VSTORAGE], 1,
[whether Vstorage backend for storage driver is enabled])
- AC_DEFINE_UNQUOTED([VSTORAGE], ["$VSTORAGE"],
- [Location or name of the vstorage client tool])
- AC_DEFINE_UNQUOTED([VSTORAGE_MOUNT], ["$VSTORAGE_MOUNT"],
- [Location or name of the vstorage mount tool])
AC_DEFINE_UNQUOTED([UMOUNT], ["$UMOUNT"],
[Location or name of the umount programm])
fi
diff --git a/src/storage/storage_backend_vstorage.c b/src/storage/storage_backend_vstorage.c
index 6cff9f1..ea3bfaa 100644
--- a/src/storage/storage_backend_vstorage.c
+++ b/src/storage/storage_backend_vstorage.c
@@ -44,9 +44,16 @@ virStorageBackendVzPoolStart(virStoragePoolObjPtr pool)
g_autofree char *grp_name = NULL;
g_autofree char *usr_name = NULL;
g_autofree char *mode = NULL;
+ g_autofree char *mount_bin = NULL;
g_autoptr(virCommand) cmd = NULL;
int ret;
+ if (!(mount_bin = virFindFileInPath("vstorage-mount"))) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ "%s", _("unable to find vstorage-mount"));
+ return -1;
+ }
+
/* Check the permissions */
if (def->target.perms.mode == (mode_t)-1)
def->target.perms.mode = VIR_STORAGE_DEFAULT_POOL_PERM_MODE;
@@ -65,7 +72,7 @@ virStorageBackendVzPoolStart(virStoragePoolObjPtr pool)
mode = g_strdup_printf("%o", def->target.perms.mode);
- cmd = virCommandNewArgList(VSTORAGE_MOUNT,
+ cmd = virCommandNewArgList(mount_bin,
"-c", def->source.name,
def->target.path,
"-m", mode,
--
1.8.3.1
4 years, 4 months
libvirt-6.5.0 breaks host passthrough migration
by Mark Mielke
Hi all:
With 6.4.0, live migration was working fine with Qemu 5.0. After trying out
6.5.0, migration broke with the following error:
libvirt.libvirtError: internal error: unable to execute QEMU command
'migrate': State blocked by non-migratable CPU device (invtsc flag)
I believe I traced the error back to this commit:
commit 201bd5db639c063862b0c1b1abfab9a9a7c92591
Author: Jiri Denemark <jdenemar(a)redhat.com>
Date: Tue Jun 2 15:34:07 2020 +0200
qemu: Fill default value in //cpu/@migratable attribute
Before QEMU introduced migratable CPU property, "-cpu host" included all
features that could be enabled on the host, even those which would block
migration. In other words, the default was equivalent to migratable=off.
When the migratable property was introduced, the default changed to
migratable=on. Let's record the default in domain XML.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
Reviewed-by: Michal Privoznik <mprivozn(a)redhat.com>
Before this change, qemu was still being launched with "-cpu host", which
for any somewhat modern version of qemu, defaults to migratable=on. The
above comment acknowledges this, however, the implementation chooses the
pessimistic and ancient (and no longer applicable!) value of migratable=off:
+ if (qemuCaps &&
+ def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH &&
+ !def->cpu->migratable) {
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_MIGRATABLE))
+ def->cpu->migratable = VIR_TRISTATE_SWITCH_ON;
*+ else if (ARCH_IS_X86(def->os.arch))+
def->cpu->migratable = VIR_TRISTATE_SWITCH_OFF;*
+ }
Consequently, after live migration qemu is started with "-cpu
host,migratable=off" and this enables invtsc, which then prevents migration
as when invtsc is enabled it activates a migration blocker.
I think this patch should be reverted. If the migratable state cannot be
determined, then it should not be guessed. It should be left as "absent",
just as it has been working fine prior to libvirt-6.5.0. Qemu still knows
what flags are enabled, so Qemu remains the authority on what can be safely
migrated, and what cannot be. I reverted this patch and re-built, and this
seems to clear the migration problems. If the user chooses to explicitly
specify migratable=yes or migratable=no, then this value should be
preserved and passed through to the Qemu "-cpu host,XXX" option.
I think it is not a requirement for "migratable=XXX" to be explicit in
libvirt. However, if there is some reason I am unaware of, and it is
important for libvirt to know, then I think it is important for libvirt to
find out the authoritative state rather than guessing.
Please start by reverting this patch, so that other people do not get
broken in the same way, and I don't need to carry my revert patch.
Personally, I think this is important enough to build a 6.5.1. However,
since I have a local revert patch in place, I am not waiting for this.
Thanks!
--
Mark Mielke <mark.mielke(a)gmail.com>
4 years, 4 months
[PATCH] qemu: use a fixed directory for saving qmp capabilities process
by Bihong Yu
>From c7ee36417b88df7dcfe5e18d1eb72b6d7c175268 Mon Sep 17 00:00:00 2001
From: Bihong Yu <yubihong(a)huawei.com>
Date: Tue, 14 Jul 2020 11:17:46 +0800
Subject: [PATCH] qemu: use a fixed directory for saving qmp capabilities
process
In some case, the qmp capabilities process possible residues. So we need to
cleanup the residual process during start libvirt. For this reason, we
should use a fixed directory for saving qmp capabilities process.
Change-Id: I6a74a046e192eee169a0e2677ce3aed9ded5e0ed
Signed-off-by:Bihong Yu <yubihong(a)huawei.com>
---
src/qemu/qemu_process.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 70fc24b..eba14ed 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8450,21 +8450,24 @@ static int
qemuProcessQMPInit(qemuProcessQMPPtr proc)
{
g_autofree char *template = NULL;
+ virErrorPtr orig_err;
VIR_DEBUG("proc=%p, emulator=%s", proc, proc->binary);
- template = g_strdup_printf("%s/qmp-XXXXXX", proc->libDir);
+ template = g_strdup_printf("%s/qmp-capabilities", proc->libDir);
- if (!(proc->uniqDir = g_mkdtemp(template))) {
+ if (g_mkdir_with_parents(template, 0700) < 0) {
virReportSystemError(errno,
_("Failed to create unique directory with "
"template '%s' for probing QEMU"),
template);
return -1;
}
- /* if g_mkdtemp succeeds, proc->uniqDir is now the owner of
- * the string. Set template to NULL to avoid freeing
- * the memory in this case */
+ /*
+ * if g_mkdir_with_parents succeeds, assign the template to proc->uniqDir.
+ * Then set template to NULL to avoid freeing the memory in this case.
+ */
+ proc->uniqDir = template;
template = NULL;
if (qemuProcessQEMULabelUniqPath(proc) < 0)
@@ -8481,6 +8484,10 @@ qemuProcessQMPInit(qemuProcessQMPPtr proc)
*/
proc->pidfile = g_strdup_printf("%s/%s", proc->uniqDir, "qmp.pid");
+ virErrorPreserveLast(&orig_err);
+ if (virPidFileForceCleanupPath(proc->pidfile) < 0)
+ VIR_WARN("Unable to kill qemu QMP process");
+ virErrorRestore(&orig_err);
return 0;
}
--
1.8.3.1
4 years, 4 months
[PATCH] storage: fix vstorage backend build
by Nikolay Shirokovskiy
Add headers with declarations of geteuid/getegid
and virGetUserName/virGetGroupName.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
src/storage/storage_backend_vstorage.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/storage/storage_backend_vstorage.c b/src/storage/storage_backend_vstorage.c
index 85ab832..6cff9f1 100644
--- a/src/storage/storage_backend_vstorage.c
+++ b/src/storage/storage_backend_vstorage.c
@@ -6,10 +6,12 @@
#include "storage_backend_vstorage.h"
#include "virlog.h"
#include "virstring.h"
+#include "virutil.h"
#include <mntent.h>
#include <paths.h>
#include <pwd.h>
#include <grp.h>
+#include <unistd.h>
#include "storage_util.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
--
1.8.3.1
4 years, 4 months
[PATCH] qemu: fix memleaks in qemuDomainAttachDeviceLive()
by Jin Yan
From e46e168f9767b8b291f23217fc7a62163c82eaf8 Mon Sep 17 00:00:00 2001
From: Jin Yan <jinyan12(a)huawei.com>
Date: Tue, 7 Jul 2020 21:58:52 +0800
Subject: [PATCH] qemu: fix memleaks in qemuDomainAttachDeviceLive()
During disk hotplugging, qemuDomainAttachDeviceLive() add the new
disk to the device list of the VM object. However, hotplugging
cdroms and floppies only updates the src variable of the original
disk device, so the newly generated disk object needs to be released.
Signed-off-by: Jin Yan <jinyan12(a)huawei.com>
---
src/qemu/qemu_hotplug.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 3954ad1109..40092b499d 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1115,6 +1115,7 @@ qemuDomainAttachDeviceDiskLive(virQEMUDriverPtr
driver,
return -1;
disk->src = NULL;
+ virDomainDiskDefFree(disk);
return 0;
}
--
4 years, 4 months
[PATCHv2 0/2] Add a type attribute on the mac address element
by Bastien Orivel
Changed:
- Split the commit in two to separate the documentation from the
code changes.
- Change the attribute name from check (tri state bool) to type
(static/generated).
This time with the patches too...
Bastien Orivel (2):
Add a type attribute on the mac address element
Document the `type` attribute for mac addresses
NEWS.rst | 6 ++++
docs/drvesx.html.in | 7 +++++
docs/schemas/domaincommon.rng | 8 +++++
src/conf/domain_conf.c | 26 ++++++++++++++++-
src/conf/domain_conf.h | 11 +++++++
src/vmx/vmx.c | 8 +++--
.../network-interface-mac-type.xml | 29 +++++++++++++++++++
tests/genericxml2xmltest.c | 2 ++
8 files changed, 93 insertions(+), 4 deletions(-)
create mode 100644 tests/genericxml2xmlindata/network-interface-mac-type.xml
--
2.20.1
4 years, 4 months
[PATCH v1 00/25] migration code cleanups + kbase document
by Daniel Henrique Barboza
Hi,
My intention was to better understand how Libvirt migration works
in the code level, aside from the documentation we already have in
migration.html.in. During my reading I ended up doing some trivial
cleanups use g_auto* functions here and there.
Last patch is a new kbase document with a summary of what I've learned.
Figured it might be a good complement for migration.html for
developers.
Daniel Henrique Barboza (25):
libvirt-domain.c: modernize virDomainMigrateCheckNotLocal()
libvirt-domain.c: modernize virDomainMigrateVersion1
libvirt-domain.c: use g_autofree in virDomainMigrateVersion* functions
qemu_driver.c: modernize qemuDomainMigrateBegin3Params()
qemu_driver.c: modernize qemuDomainMigratePrepare3()
qemu_driver.c: modernize qemuDomainMigratePrepare3Params()
qemu_migration.c: modernize qemuMigrationDstPrepare()
qemu_migration.c: use g_auto* in qemuMigrationDstPrepareAny()
qemu_migration_params.c: modernize qemuMigrationParamsFetch()
qemu_migration_params.c: modernize qemuMigrationParamsEnableTLS()
qemu_migration_params.c: use g_autofree in qemuMigrationParamsApply()
qemu_monitor_json.c: modernize qemuMonitorJSONMigrateIncoming()
qemu_migration.c: use g_auto* in qemuMigrationDstPrepareDirect()
qemu_migration_cookie.h: register AUTOPTR_CLEANUP_FUNC for
qemuMigrationCookiePtr
qemu_migration.c: modernize qemuMigrationSrcBeginPhase()
qemu_migration_cookie.c: modernize qemuMigrationEatCookie()
qemu_driver.c: use g_auto* in qemuDomainMigratePerform3* functions
qemu_migration.c: modernize qemuMigrationSrcPerformNative()
qemu_migration.c: use auto* in qemuMigrationSrcRun()
qemu_migration.c: use g_auto* in qemuMigrationSrcPerformJob and
Peer2Peer
qemu_migration.c: modernize qemuMigrationDstPersist()
qemu_migration.c: use g_auto* in qemuMigrationDstFinish()
libvirt-domain.c: g_autofree in virDomainMigrate() and
virDomainMigrate2()
qemu_migration.c: modernize qemuMigrationSrcConfirmPhase()
docs/kbase: introduce migrationinternals.rst
docs/kbase/migrationinternals.rst | 174 ++++++++++++++++++++++++++++++
src/libvirt-domain.c | 68 ++++--------
src/qemu/qemu_driver.c | 105 ++++++++----------
src/qemu/qemu_migration.c | 158 ++++++++++-----------------
src/qemu/qemu_migration_cookie.c | 16 ++-
src/qemu/qemu_migration_cookie.h | 1 +
src/qemu/qemu_migration_params.c | 56 ++++------
src/qemu/qemu_monitor_json.c | 14 +--
8 files changed, 323 insertions(+), 269 deletions(-)
create mode 100644 docs/kbase/migrationinternals.rst
--
2.26.2
4 years, 4 months