[libvirt] [PATCH RFC] qemu: add some synchronizations for snapshot
by Jincheng Miao
Currently it lacks synchronization to modify domain's snapshot object list,
that race condition causes unsafe access to some freed snapshot objects.
Therefore, this patch wraps all access of snapshot object list in vm job lock.
Only the qemuDomainSnapshotCreateXML is not synchronized, it is related to
QEMU_ASYNC_JOB_SNAPSHOT async job for --disk-only snapshot. I am not sure
if it's ok to remove it, so need your ideas for qemuDomainSnapshotCreateXML.
Signed-off-by: Jincheng Miao <jmiao(a)redhat.com>
---
src/qemu/qemu_driver.c | 137 +++++++++++++++++++++++++++++++++++++++---------
1 files changed, 112 insertions(+), 25 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 73959da..7329aa9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -13609,6 +13609,7 @@ static int qemuDomainSnapshotListNames(virDomainPtr domain, char **names,
{
virDomainObjPtr vm = NULL;
int n = -1;
+ virQEMUDriverPtr driver = domain->conn->privateData;
virCheckFlags(VIR_DOMAIN_SNAPSHOT_LIST_ROOTS |
VIR_DOMAIN_SNAPSHOT_FILTERS_ALL, -1);
@@ -13619,8 +13620,12 @@ static int qemuDomainSnapshotListNames(virDomainPtr domain, char **names,
if (virDomainSnapshotListNamesEnsureACL(domain->conn, vm->def) < 0)
goto cleanup;
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
+ goto cleanup;
+
n = virDomainSnapshotObjListGetNames(vm->snapshots, NULL, names, nameslen,
flags);
+ ignore_value(qemuDomainObjEndJob(driver, vm));
cleanup:
if (vm)
@@ -13633,6 +13638,7 @@ static int qemuDomainSnapshotNum(virDomainPtr domain,
{
virDomainObjPtr vm = NULL;
int n = -1;
+ virQEMUDriverPtr driver = domain->conn->privateData;
virCheckFlags(VIR_DOMAIN_SNAPSHOT_LIST_ROOTS |
VIR_DOMAIN_SNAPSHOT_FILTERS_ALL, -1);
@@ -13643,8 +13649,13 @@ static int qemuDomainSnapshotNum(virDomainPtr domain,
if (virDomainSnapshotNumEnsureACL(domain->conn, vm->def) < 0)
goto cleanup;
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
+ goto cleanup;
+
n = virDomainSnapshotObjListNum(vm->snapshots, NULL, flags);
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -13657,6 +13668,7 @@ qemuDomainListAllSnapshots(virDomainPtr domain, virDomainSnapshotPtr **snaps,
{
virDomainObjPtr vm = NULL;
int n = -1;
+ virQEMUDriverPtr driver = domain->conn->privateData;
virCheckFlags(VIR_DOMAIN_SNAPSHOT_LIST_ROOTS |
VIR_DOMAIN_SNAPSHOT_FILTERS_ALL, -1);
@@ -13667,8 +13679,13 @@ qemuDomainListAllSnapshots(virDomainPtr domain, virDomainSnapshotPtr **snaps,
if (virDomainListAllSnapshotsEnsureACL(domain->conn, vm->def) < 0)
goto cleanup;
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
+ goto cleanup;
+
n = virDomainListSnapshots(vm->snapshots, NULL, domain, snaps, flags);
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -13684,6 +13701,7 @@ qemuDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot,
virDomainObjPtr vm = NULL;
virDomainSnapshotObjPtr snap = NULL;
int n = -1;
+ virQEMUDriverPtr driver = snapshot->domain->conn->privateData;
virCheckFlags(VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS |
VIR_DOMAIN_SNAPSHOT_FILTERS_ALL, -1);
@@ -13694,12 +13712,18 @@ qemuDomainSnapshotListChildrenNames(virDomainSnapshotPtr snapshot,
if (virDomainSnapshotListChildrenNamesEnsureACL(snapshot->domain->conn, vm->def) < 0)
goto cleanup;
- if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
goto cleanup;
+ if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ goto endjob;
+
n = virDomainSnapshotObjListGetNames(vm->snapshots, snap, names, nameslen,
flags);
+ endjob:
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -13713,6 +13737,7 @@ qemuDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot,
virDomainObjPtr vm = NULL;
virDomainSnapshotObjPtr snap = NULL;
int n = -1;
+ virQEMUDriverPtr driver = snapshot->domain->conn->privateData;
virCheckFlags(VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS |
VIR_DOMAIN_SNAPSHOT_FILTERS_ALL, -1);
@@ -13723,11 +13748,17 @@ qemuDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot,
if (virDomainSnapshotNumChildrenEnsureACL(snapshot->domain->conn, vm->def) < 0)
goto cleanup;
- if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
goto cleanup;
+ if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ goto endjob;
+
n = virDomainSnapshotObjListNum(vm->snapshots, snap, flags);
+ endjob:
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -13742,6 +13773,7 @@ qemuDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot,
virDomainObjPtr vm = NULL;
virDomainSnapshotObjPtr snap = NULL;
int n = -1;
+ virQEMUDriverPtr driver = snapshot->domain->conn->privateData;
virCheckFlags(VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS |
VIR_DOMAIN_SNAPSHOT_FILTERS_ALL, -1);
@@ -13752,12 +13784,18 @@ qemuDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot,
if (virDomainSnapshotListAllChildrenEnsureACL(snapshot->domain->conn, vm->def) < 0)
goto cleanup;
- if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
goto cleanup;
+ if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ goto endjob;
+
n = virDomainListSnapshots(vm->snapshots, snap, snapshot->domain, snaps,
flags);
+ endjob:
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -13771,6 +13809,7 @@ static virDomainSnapshotPtr qemuDomainSnapshotLookupByName(virDomainPtr domain,
virDomainObjPtr vm;
virDomainSnapshotObjPtr snap = NULL;
virDomainSnapshotPtr snapshot = NULL;
+ virQEMUDriverPtr driver = domain->conn->privateData;
virCheckFlags(0, NULL);
@@ -13780,11 +13819,17 @@ static virDomainSnapshotPtr qemuDomainSnapshotLookupByName(virDomainPtr domain,
if (virDomainSnapshotLookupByNameEnsureACL(domain->conn, vm->def) < 0)
goto cleanup;
- if (!(snap = qemuSnapObjFromName(vm, name)))
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
goto cleanup;
+ if (!(snap = qemuSnapObjFromName(vm, name)))
+ goto endjob;
+
snapshot = virGetDomainSnapshot(domain, snap->def->name);
+ endjob:
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -13796,6 +13841,7 @@ static int qemuDomainHasCurrentSnapshot(virDomainPtr domain,
{
virDomainObjPtr vm;
int ret = -1;
+ virQEMUDriverPtr driver = domain->conn->privateData;
virCheckFlags(0, -1);
@@ -13805,8 +13851,13 @@ static int qemuDomainHasCurrentSnapshot(virDomainPtr domain,
if (virDomainHasCurrentSnapshotEnsureACL(domain->conn, vm->def) < 0)
goto cleanup;
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
+ goto cleanup;
+
ret = (vm->current_snapshot != NULL);
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -13820,6 +13871,7 @@ qemuDomainSnapshotGetParent(virDomainSnapshotPtr snapshot,
virDomainObjPtr vm;
virDomainSnapshotObjPtr snap = NULL;
virDomainSnapshotPtr parent = NULL;
+ virQEMUDriverPtr driver = snapshot->domain->conn->privateData;
virCheckFlags(0, NULL);
@@ -13829,18 +13881,24 @@ qemuDomainSnapshotGetParent(virDomainSnapshotPtr snapshot,
if (virDomainSnapshotGetParentEnsureACL(snapshot->domain->conn, vm->def) < 0)
goto cleanup;
- if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
goto cleanup;
+ if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ goto endjob;
+
if (!snap->def->parent) {
virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT,
_("snapshot '%s' does not have a parent"),
snap->def->name);
- goto cleanup;
+ goto endjob;
}
parent = virGetDomainSnapshot(snapshot->domain, snap->def->parent);
+ endjob:
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -13852,6 +13910,7 @@ static virDomainSnapshotPtr qemuDomainSnapshotCurrent(virDomainPtr domain,
{
virDomainObjPtr vm;
virDomainSnapshotPtr snapshot = NULL;
+ virQEMUDriverPtr driver = domain->conn->privateData;
virCheckFlags(0, NULL);
@@ -13861,14 +13920,20 @@ static virDomainSnapshotPtr qemuDomainSnapshotCurrent(virDomainPtr domain,
if (virDomainSnapshotCurrentEnsureACL(domain->conn, vm->def) < 0)
goto cleanup;
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
+ goto cleanup;
+
if (!vm->current_snapshot) {
virReportError(VIR_ERR_NO_DOMAIN_SNAPSHOT, "%s",
_("the domain does not have a current snapshot"));
- goto cleanup;
+ goto endjob;
}
snapshot = virGetDomainSnapshot(domain, vm->current_snapshot->def->name);
+ endjob:
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -13882,6 +13947,7 @@ static char *qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
char *xml = NULL;
virDomainSnapshotObjPtr snap = NULL;
char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virQEMUDriverPtr driver = snapshot->domain->conn->privateData;
virCheckFlags(VIR_DOMAIN_XML_SECURE, NULL);
@@ -13891,13 +13957,19 @@ static char *qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot,
if (virDomainSnapshotGetXMLDescEnsureACL(snapshot->domain->conn, vm->def) < 0)
goto cleanup;
- if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
goto cleanup;
+ if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ goto endjob;
+
virUUIDFormat(snapshot->domain->uuid, uuidstr);
xml = virDomainSnapshotDefFormat(uuidstr, snap->def, flags, 0);
+ endjob:
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -13911,6 +13983,7 @@ qemuDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot,
virDomainObjPtr vm = NULL;
int ret = -1;
virDomainSnapshotObjPtr snap = NULL;
+ virQEMUDriverPtr driver = snapshot->domain->conn->privateData;
virCheckFlags(0, -1);
@@ -13920,12 +13993,18 @@ qemuDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot,
if (virDomainSnapshotIsCurrentEnsureACL(snapshot->domain->conn, vm->def) < 0)
goto cleanup;
- if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
goto cleanup;
+ if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ goto endjob;
+
ret = (vm->current_snapshot &&
STREQ(snapshot->name, vm->current_snapshot->def->name));
+ endjob:
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -13940,6 +14019,7 @@ qemuDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot,
virDomainObjPtr vm = NULL;
int ret = -1;
virDomainSnapshotObjPtr snap = NULL;
+ virQEMUDriverPtr driver = snapshot->domain->conn->privateData;
virCheckFlags(0, -1);
@@ -13949,14 +14029,20 @@ qemuDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot,
if (virDomainSnapshotHasMetadataEnsureACL(snapshot->domain->conn, vm->def) < 0)
goto cleanup;
- if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
goto cleanup;
+ if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ goto endjob;
+
/* XXX Someday, we should recognize internal snapshots in qcow2
* images that are not tied to a libvirt snapshot; if we ever do
* that, then we would have a reason to return 0 here. */
ret = 1;
+ endjob:
+ ignore_value(qemuDomainObjEndJob(driver, vm));
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -14027,9 +14113,12 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
goto cleanup;
}
- if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
+ if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ goto endjob;
+
if (!vm->persistent &&
snap->def->state != VIR_DOMAIN_RUNNING &&
snap->def->state != VIR_DOMAIN_PAUSED &&
@@ -14038,13 +14127,13 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("transient domain needs to request run or pause "
"to revert to inactive snapshot"));
- goto cleanup;
+ goto endjob;
}
if (virDomainSnapshotIsExternal(snap)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("revert to external snapshot not supported yet"));
- goto cleanup;
+ goto endjob;
}
if (!(flags & VIR_DOMAIN_SNAPSHOT_REVERT_FORCE)) {
@@ -14052,7 +14141,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
virReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY,
_("snapshot '%s' lacks domain '%s' rollback info"),
snap->def->name, vm->def->name);
- goto cleanup;
+ goto endjob;
}
if (virDomainObjIsActive(vm) &&
!(snap->def->state == VIR_DOMAIN_RUNNING
@@ -14061,7 +14150,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED))) {
virReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY, "%s",
_("must respawn qemu to start inactive snapshot"));
- goto cleanup;
+ goto endjob;
}
}
@@ -14070,7 +14159,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
vm->current_snapshot->def->current = false;
if (qemuDomainSnapshotWriteMetadata(vm, vm->current_snapshot,
cfg->snapshotDir) < 0)
- goto cleanup;
+ goto endjob;
vm->current_snapshot = NULL;
/* XXX Should we restore vm->current_snapshot after this point
* in the failure cases where we know there was no change? */
@@ -14085,12 +14174,9 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
if (snap->def->dom) {
config = virDomainDefCopy(snap->def->dom, caps, driver->xmlopt, true);
if (!config)
- goto cleanup;
+ goto endjob;
}
- if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
- goto cleanup;
-
switch ((virDomainState) snap->def->state) {
case VIR_DOMAIN_RUNNING:
case VIR_DOMAIN_PAUSED:
@@ -14400,9 +14486,13 @@ static int qemuDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
if (virDomainSnapshotDeleteEnsureACL(snapshot->domain->conn, vm->def) < 0)
goto cleanup;
- if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+
+ if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
+ if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
+ goto endjob;
+
if (!metadata_only) {
if (!(flags & VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY) &&
virDomainSnapshotIsExternal(snap))
@@ -14415,13 +14505,10 @@ static int qemuDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("deletion of %d external disk snapshots not "
"supported yet"), external);
- goto cleanup;
+ goto endjob;
}
}
- if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
- goto cleanup;
-
if (flags & (VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN |
VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY)) {
rem.driver = driver;
--
1.7.1
10 years, 3 months
[libvirt] [PATCH] remote: Fix memory leak on error path when deserializing bulk stats
by Peter Krempa
The 'elem' variable along with the domain object would be leaked when
taking the error path.
Found by coverity.
---
src/remote/remote_driver.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index fda27f7..8bc4baa 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -7730,7 +7730,7 @@ remoteConnectGetAllDomainStats(virConnectPtr conn,
size_t i;
remote_connect_get_all_domain_stats_args args;
remote_connect_get_all_domain_stats_ret ret;
-
+ virDomainStatsRecordPtr elem = NULL;
virDomainStatsRecordPtr *tmpret = NULL;
if (ndoms) {
@@ -7769,7 +7769,6 @@ remoteConnectGetAllDomainStats(virConnectPtr conn,
goto cleanup;
for (i = 0; i < ret.retStats.retStats_len; i++) {
- virDomainStatsRecordPtr elem;
remote_domain_stats_record *rec = ret.retStats.retStats_val + i;
if (VIR_ALLOC(elem) < 0)
@@ -7786,6 +7785,7 @@ remoteConnectGetAllDomainStats(virConnectPtr conn,
goto cleanup;
tmpret[i] = elem;
+ elem = NULL;
}
*retStats = tmpret;
@@ -7793,6 +7793,10 @@ remoteConnectGetAllDomainStats(virConnectPtr conn,
rv = ret.retStats.retStats_len;
cleanup:
+ if (elem) {
+ virObjectUnref(elem->dom);
+ VIR_FREE(elem);
+ }
virDomainStatsRecordListFree(tmpret);
xdr_free((xdrproc_t)xdr_remote_connect_get_all_domain_stats_ret,
(char *) &ret);
--
2.0.2
10 years, 3 months
[libvirt] [python PATCH] override: Fix two uninitialized variables in convertDomainStatsRecord
by Peter Krempa
py_record_domain and py_record_stats would be accessed uninitialized if
an out-of-memory condition would happen in the first loop. Unlikely, but
coverity complained.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1136354
---
Pushed as trivial.
libvirt-override.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libvirt-override.c b/libvirt-override.c
index 17ea042..872e33b 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -7963,8 +7963,8 @@ convertDomainStatsRecord(virDomainStatsRecordPtr *records,
{
PyObject *py_retval;
PyObject *py_record;
- PyObject *py_record_domain;
- PyObject *py_record_stats;
+ PyObject *py_record_domain = NULL;
+ PyObject *py_record_stats = NULL;
size_t i;
if (!(py_retval = PyList_New(nrecords)))
--
2.0.2
10 years, 3 months
[libvirt] [PATCH 0/2] fix: unix sockets created for virtio-serail has insufficient permissions
by Chunyan Liu
https://sourceware.org/bugzilla/show_bug.cgi?id=13078#c11
https://bugzilla.novell.com/show_bug.cgi?id=888166
To use virtio-serial device, unix socket created for chardev with
default umask(022) has insufficient permissions.
e.g.:
-device virtio-serial \
-chardev socket,path=/tmp/foo,server,nowait,id=foo \
-device virtserialport,chardev=foo,name=org.fedoraproject.port.0
#ls -l /tmp/somefile.sock
srwxr-xr-x 1 qemu qemu 0 21. Jul 14:19 /tmp/somefile.sock
Other users in the same group (like real user, test engines, etc)
cannot write to this socket.
These patch series contains a qemu patch and a libvirt patch:
qemu patch: adds a new 'umask' option to -chardev, so that user can
change the umask.
libvirt patch: pass 'umask=0x002' paramter to qemu command line
for virtio-serial device
Chunyan Liu (2):
qemu side: add 'umask' option to chardev
libvirt side: qemu: add umask(002) to virtio-serial chardev commandline
--
1.8.4.5
10 years, 3 months
[libvirt] [PATCH] virsh: Implement command to rename domain
by Tomas Meszaros
I've recently worked with rather large number of virtual machines
and needed to rename all domains. I couldn't find better way how
to rename domain other than:
virsh dumpxml domain > domain.xml
(change domain name in domain.xml)
virsh undefine domain
virsh define domain.xml
This is rather pain to do every time I want to rename domain.
I think there should be simple way to change domain name.
So, I decided to implement new command which will basically perform
all actions listed above. When running:
virsh rename foo bar
domain foo will be renamed to bar.
Command rename is implemented using cmdUndefine options with addition
of option name-name.
I included opts_undefine into the opts_rename because I couldn't find
any other way how to call cmdUndefine directly from the cmdRename and
not getting vshCommandOpt assertion fails.
In order to hide undefine options, I added VSH_OFLAG_HIDDEN flag to
the Command Option Flags, so options flagged as hidden wont show up
in help and autocompletion results.
But it is still possible to run rename command with undefine flags:
virsh rename foo bar --managed-save
I would like to call cmdUndefine from cmdRename and not having to
use undefine options as a part of rename options but I just don't
know how to do it at this point.
---
tools/virsh-domain.c | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++
tools/virsh.c | 10 ++++
tools/virsh.h | 2 +
tools/virsh.pod | 12 +++++
4 files changed, 157 insertions(+)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index c75cd73..cd8c663 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -5103,6 +5103,133 @@ cmdReboot(vshControl *ctl, const vshCmd *cmd)
}
/*
+ * "rename" command
+ */
+static const vshCmdInfo info_rename[] = {
+ {.name = "help",
+ .data = N_("rename a domain")
+ },
+ {.name = "desc",
+ .data = N_("Change domain name.")
+ },
+ {.name = NULL}
+};
+
+static const vshCmdOptDef opts_rename[] = {
+ {.name = "domain",
+ .type = VSH_OT_DATA,
+ .flags = VSH_OFLAG_REQ,
+ .help = N_("domain name or uuid")
+ },
+ {.name = "new-name",
+ .type = VSH_OT_DATA,
+ .flags = VSH_OFLAG_REQ,
+ .help = N_("new domain name")
+ },
+ {.name = "managed-save",
+ .type = VSH_OT_BOOL,
+ .flags = VSH_OFLAG_HIDDEN,
+ },
+ {.name = "storage",
+ .type = VSH_OT_DATA,
+ .flags = VSH_OFLAG_HIDDEN,
+ },
+ {.name = "remove-all-storage",
+ .type = VSH_OT_BOOL,
+ .flags = VSH_OFLAG_HIDDEN,
+ },
+ {.name = "wipe-storage",
+ .type = VSH_OT_BOOL,
+ .flags = VSH_OFLAG_HIDDEN,
+ },
+ {.name = "snapshots-metadata",
+ .type = VSH_OT_BOOL,
+ .flags = VSH_OFLAG_HIDDEN,
+ },
+ {.name = NULL}
+};
+
+static bool
+cmdRename(vshControl *ctl, const vshCmd *cmd)
+{
+ virDomainPtr dom = NULL;
+ virDomainPtr new_dom = NULL;
+ bool ret = false;
+ int dom_state;
+ int xml_size;
+ char *dom_xml = NULL;
+ const char *new_name = NULL;
+ xmlDocPtr doc = NULL;
+ xmlChar *new_dom_xml = NULL;
+ xmlNodePtr name_node = NULL;
+ xmlXPathObjectPtr obj = NULL;
+ xmlXPathContextPtr ctxt = NULL;
+
+ if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
+ return false;
+
+ if (virDomainGetState(dom, &dom_state, NULL, 0) < 0) {
+ vshError(ctl, "%s", _("Failed to get domain state"));
+ goto cleanup;
+ }
+
+ if (dom_state != VIR_DOMAIN_SHUTOFF) {
+ vshError(ctl, _("Please shutdown domain before renaming"));
+ goto cleanup;
+ }
+
+ if (vshCommandOptString(cmd, "new-name", &new_name) <= 0) {
+ vshError(ctl, _("Failed to parse --new-name parameter"));
+ goto cleanup;
+ }
+
+ if (!(dom_xml = virDomainGetXMLDesc(dom, 0)))
+ goto cleanup;
+ if (!(doc = virXMLParseStringCtxt(dom_xml, NULL, &ctxt)))
+ goto cleanup;
+
+ obj = xmlXPathEval(BAD_CAST "/domain/name", ctxt);
+ if (obj == NULL || obj->type != XPATH_NODESET || obj->nodesetval == NULL ||
+ obj->nodesetval->nodeNr == 0 || obj->nodesetval->nodeTab == NULL) {
+ vshError(ctl, _("Failed to extract domain name"));
+ goto cleanup;
+ }
+
+ if (!(name_node = obj->nodesetval->nodeTab[0]->children))
+ goto cleanup;
+
+ xmlNodeSetContent(name_node, BAD_CAST new_name);
+ xmlDocDumpMemory(doc, &new_dom_xml, &xml_size);
+ if (new_dom_xml == NULL || xml_size <= 0) {
+ vshError(ctl, _("Failed to format new XML for domain %s"), new_name);
+ goto cleanup;
+ }
+
+ if (!cmdUndefine(ctl, cmd))
+ goto cleanup;
+
+ if (!(new_dom = virDomainDefineXML(ctl->conn, (char *)new_dom_xml))) {
+ vshError(ctl, _("Failed to define domain %s"), new_name);
+ goto cleanup;
+ }
+
+ vshPrint(ctl, _("Domain %s has been renamed to %s\n"),
+ virDomainGetName(dom), virDomainGetName(new_dom));
+ ret = true;
+
+ cleanup:
+ virDomainFree(dom);
+ if (new_dom)
+ virDomainFree(new_dom);
+ VIR_FREE(dom_xml);
+ VIR_FREE(new_dom_xml);
+ xmlFreeDoc(doc);
+ xmlXPathFreeObject(obj);
+ xmlXPathFreeContext(ctxt);
+ return ret;
+}
+
+/*
* "reset" command
*/
static const vshCmdInfo info_reset[] = {
@@ -12057,6 +12184,12 @@ const vshCmdDef domManagementCmds[] = {
.info = info_reboot,
.flags = 0
},
+ {.name = "rename",
+ .handler = cmdRename,
+ .opts = opts_rename,
+ .info = info_rename,
+ .flags = 0
+ },
{.name = "reset",
.handler = cmdReset,
.opts = opts_reset,
diff --git a/tools/virsh.c b/tools/virsh.c
index 713c9a5..ef0d2df 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -1299,6 +1299,10 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)
const vshCmdOptDef *opt;
for (opt = def->opts; opt->name; opt++) {
const char *fmt = "%s";
+
+ if (opt->flags & VSH_OFLAG_HIDDEN)
+ continue;
+
switch (opt->type) {
case VSH_OT_BOOL:
fmt = "[--%s]";
@@ -1352,6 +1356,9 @@ vshCmddefHelp(vshControl *ctl, const char *cmdname)
const vshCmdOptDef *opt;
fputs(_("\n OPTIONS\n"), stdout);
for (opt = def->opts; opt->name; opt++) {
+ if (opt->flags & VSH_OFLAG_HIDDEN)
+ continue;
+
switch (opt->type) {
case VSH_OT_BOOL:
snprintf(buf, sizeof(buf), "--%s", opt->name);
@@ -3001,6 +3008,9 @@ vshReadlineOptionsGenerator(const char *text, int state)
/* ignore non --option */
continue;
+ if (opt->flags & VSH_OFLAG_HIDDEN)
+ continue;
+
if (len > 2) {
if (STRNEQLEN(name, text + 2, len - 2))
continue;
diff --git a/tools/virsh.h b/tools/virsh.h
index b4df24b..5fa22d0 100644
--- a/tools/virsh.h
+++ b/tools/virsh.h
@@ -136,6 +136,8 @@ enum {
VSH_OFLAG_REQ = (1 << 0), /* option required */
VSH_OFLAG_EMPTY_OK = (1 << 1), /* empty string option allowed */
VSH_OFLAG_REQ_OPT = (1 << 2), /* --optionname required */
+ VSH_OFLAG_HIDDEN = (1 << 4), /* option doesn't show up in help
+ * messages and autocompletion */
};
/* forward declarations */
diff --git a/tools/virsh.pod b/tools/virsh.pod
index ea9267e..3c56695 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -1512,6 +1512,18 @@ try each mode is undefined, and not related to the order specified to virsh.
For strict control over ordering, use a single mode at a time and
repeat the command.
+=item B<rename> I<domain> I<new-name>
+
+Rename a domain. This command changes current domain name to the new name
+specified by the user. This is equivalent to:
+
+ virsh dumpxml domain > domain.xml
+ (edit domain.xml, change <name>domain</name> to <name>new-name</name>)
+ virsh undefine domain
+ virsh define domain.xml
+
+B<Note>: Domain must be shut down before renaming.
+
=item B<reset> I<domain>
Reset a domain immediately without any guest shutdown. B<reset>
--
1.9.3
10 years, 3 months
[libvirt] [python PATCH] libvirt-override: fix some build warnings
by Pavel Hrdina
Remove unused label 'cleanup' in 'libvirt_virConnectGetAllDomainStats'
function and remove unused variable 'conn' in function
'libvirt_virDomainListGetStats'.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Pushed as trivial
libvirt-override.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/libvirt-override.c b/libvirt-override.c
index dfbe9d3..17ea042 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -8039,7 +8039,6 @@ libvirt_virConnectGetAllDomainStats(PyObject *self ATTRIBUTE_UNUSED,
if (!(py_retval = convertDomainStatsRecord(records, nrecords)))
py_retval = VIR_PY_NONE;
- cleanup:
virDomainStatsRecordListFree(records);
return py_retval;
@@ -8053,7 +8052,6 @@ libvirt_virDomainListGetStats(PyObject *self ATTRIBUTE_UNUSED,
PyObject *pyobj_conn;
PyObject *py_retval;
PyObject *py_domlist;
- virConnectPtr conn;
virDomainStatsRecordPtr *records = NULL;
virDomainPtr *doms = NULL;
int nrecords;
@@ -8065,7 +8063,6 @@ libvirt_virDomainListGetStats(PyObject *self ATTRIBUTE_UNUSED,
if (!PyArg_ParseTuple(args, (char *)"OOii:virDomainListGetStats",
&pyobj_conn, &py_domlist, &stats, &flags))
return NULL;
- conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
if (PyList_Check(py_domlist)) {
ndoms = PyList_Size(py_domlist);
--
1.8.5.5
10 years, 3 months
[libvirt] [libvirt-python][PATCH] Post-release version bump for new dev cycle
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under trivial rule.
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index f5c6542..167f568 100755
--- a/setup.py
+++ b/setup.py
@@ -309,7 +309,7 @@ class my_clean(clean):
_c_modules, _py_modules = get_module_lists()
setup(name = 'libvirt-python',
- version = '1.2.8',
+ version = '1.2.9',
url = 'http://www.libvirt.org',
maintainer = 'Libvirt Maintainers',
maintainer_email = 'libvir-list(a)redhat.com',
--
1.8.5.5
10 years, 3 months
[libvirt] [PATCH] Post-release version bump for new dev cycle
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under trivial rule.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index f93c6c2..b4fb99a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl <http://www.gnu.org/licenses/>.
-AC_INIT([libvirt], [1.2.8], [libvir-list(a)redhat.com], [], [http://libvirt.org])
+AC_INIT([libvirt], [1.2.9], [libvir-list(a)redhat.com], [], [http://libvirt.org])
AC_CONFIG_SRCDIR([src/libvirt.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
--
1.8.5.5
10 years, 3 months
[libvirt] Release of libvirt-1.2.8
by Daniel Veillard
It's out ! Tagged and signed in git as well as tarball and rpms
are available from the usual place:
ftp://libvirt.org/libvirt/
I also made a release for the python bindings available from
ftp://libvirt.org/libvirt/python/
This is a rather large release (surprizingly for August !) with a lot
of refactoring, new APIs and a large set of bug fixes (seems there is a
new and more stringent Coverity release :-) . No lack of improvement
patches either so a rather balanced release:
Features:
- blockcopy: virDomainBlockCopy with XML destination, typed params (Eric Blake)
- lib: Introduce API for retrieving bulk domain stats (Peter Krempa)
- Introduce virDomainOpenGraphicsFD API (Ján Tomko)
- storage: ZFS support (Roman Bogorodskiy)
Documentation:
- fix bootmenu timeout description (Martin Kletzander)
- conf: add support for bootmenu timeout (Martin Kletzander)
- maint: fix comment typo (Eric Blake)
- formatdomain: Reformat vCPU description (John Ferlan)
- virsh: Fix help info for freepages (Li Yang)
- virsh: man: Add LXC format info for domxml-from/to-native (Li Yang)
- virsh: Fix comment for net-undefine (Li Yang)
- man: virsh: add missing auto-converge option for 'migrate' (Pradipta Kr. Banerjee)
- nwfilter: add missing dscp attribute (Jianwei Hu)
- virsh: man: Crosslink "desc" and "metadata" sections (Peter Krempa)
- man: virsh: Add 'vcpu_period' and 'vcpu_quota' support info for LXC (Li Yang)
- man: virsh: Add man page for "virsh metadata" (Peter Krempa)
- fix missing forward slash (Jianwei Hu)
- use correct hints per bus type in <disk> examples (Eric Blake)
- use unique dev names in <disk> examples (Eric Blake)
- virsh: clean up attach-interface paragraph in man page (Laine Stump)
- audit: Fix some comments (Wang Rui)
Portability:
- spec: drop anything older than Fedora 13 (Eric Blake)
- fix mingw build (Pavel Hrdina)
- build: fix mingw build with virCommandReorderFDs (Martin Kletzander)
- build: force configure failed when perl is missing (Jincheng Miao)
- Include param.h in case of HAVE_BSD_CPU_AFFINITY (Guido Günther)
Bug Fixes:
- blockcopy: allow larger buf-size (Eric Blake)
- selinux: properly label tap FDs with imagelabel (Martin Kletzander)
- Fix connection to already running session libvirtd (Christophe Fergeau)
- storage: zfs: fix double listing of new volumes (Roman Bogorodskiy)
- qemu_driver: Resolve Coverity FORWARD_NULL (John Ferlan)
- virnetserverservice: Resolve Coverity ARRAY_VS_SINGLETON (John Ferlan)
- libxl_migration: Resolve Coverity NULL_RETURNS (John Ferlan)
- qemu_command: Resolve Coverity DEADCODE (John Ferlan)
- qemu_driver: Resolve Coverity DEADCODE (John Ferlan)
- domain_conf: Resolve Coverity DEADCODE (John Ferlan)
- qemu_monitor: Resolve Coverity NESTING_INDENT_MISMATCH (John Ferlan)
- storage_conf: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- qemu_driver: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- phyp_driver: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- libxl_migration: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- bridge_driver: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- virsh-network: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- network_conf: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- qemu_capabilities: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- libxl_domain: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- qemu_agent: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- qemu_command: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- cpu_x86: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- domain_conf: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- daemon: Resolve Coverity NEGATIVE_RETURNS (John Ferlan)
- qemu_capabilities: Resolve Coverity RESOURCE_LEAK (Wang Rui)
- tests: Resolve Coverity RESOURCE_LEAK (Wang Rui)
- util: Resolve Coverity RESOURCE_LEAK (Wang Rui)
- virsh: fix keepalive error msg (Erik Skultety)
- qemu_capabilities: Resolve Coverity NULL_RETURNS (John Ferlan)
- qemu_driver: Resolve Coverity CONSTANT_EXPRESSION_RESULT (John Ferlan)
- domain_conf: Resolve Coverity REVERSE_INULL (John Ferlan)
- qemu_command: Resolve Coverity REVERSE_INULL (John Ferlan)
- domain_conf: Resolve Coverity REVERSE_INULL (John Ferlan)
- storage_driver: Resolve Coverity REVERSE_INULL (John Ferlan)
- xen_xm: Resolve Coverity USE_AFTER_FREE (John Ferlan)
- xen_common: Resolve Coverity USE_AFTER_FREE (John Ferlan)
- parallels: Resolve Coverity USE_AFTER_FREE (John Ferlan)
- conf: fix leak with def->mem.hugepages (Martin Kletzander)
- qemu: call endjob in RevertToSnapshot (Jincheng Miao)
- virsh: Initialize vshData in cmdMigrate (Ján Tomko)
- libxl: fix memory corruption introduced by commit b55cc5f4e (Jim Fehlig)
- iotune: setting an invalid value now reports error (Erik Skultety)
- xenconfig: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- virnetsocket: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- commandtest: Resolve Coverity RESOURCE_LEAK (John Ferlan)
- numatune: setting --mode does not work well (Erik Skultety)
- qemu: min_guarantee: Parameter 'min_guarantee' not supported (Erik Skultety)
- Parallels: fix error with video card RAM dimension (Alexander Burluka)
- util: compare floor attribute in virNetDevBandwidthEqual (Martin Kletzander)
- conf: net: Correctly switch how to format address fields (Peter Krempa)
- Perform disk config validity checking for attach-device config (John Ferlan)
- nodeCapsInitNUMA: Avoid @cpumap leak (Michal Privoznik)
- qemu: Issue rtc-reset-reinjection command after guest-set-time (Michal Privoznik)
- qemu: forbid negative blkio values (Martin Kletzander)
- lxc: forbid negative blkio values (Martin Kletzander)
- qemu: Fix build error introduced in 653137eb957a278b556c6226424aad5395a (Peter Krempa)
- qemu: blkiotune: Avoid accessing non-existing disk configuration (Peter Krempa)
- qemu: Label all TAP FDs (Michal Privoznik)
- cmdMigrate: move vshConnect before vshWatchJob (Chunyan Liu)
- qemu: cpu: unplug: Remove vcpu pinning on cold cpu unplug (Peter Krempa)
- qemu: Redundant listen address entry in quest xml (Erik Skultety)
- daemon: Fix driver registration ordering (Michal Privoznik)
- network: fix crash when starting a network with no <pf> element (Laine Stump)
- qemu_process: fix memleak found by coverity (Pavel Hrdina)
- Maximum vlanid should be 4095 in interface.rng (Jianwei Hu)
- LXC: Fix virLXCControllerSetupDevPTS() wrt user namespaces (Richard Weinberger)
- conf: fix parsing 'cmd_per_lun' and 'max_sectors' (Mo yuxiang)
- bhyve: fix error message in bhyveStateInitialize (Dmitry Guryanov)
- qemu: migration: Check domain live state after exitting the monitor (Peter Krempa)
- qemu: managedsave: Check that VM is alive after entering async job (Peter Krempa)
- numatune: Fix parsing of empty nodeset (0,^0) (Erik Skultety)
- conf: Format interface's driver more frequently (Michal Privoznik)
- network: populate interface pool immediately when network is started (Laine Stump)
- network: make networkCreateInterfacePool more robust (Laine Stump)
- Make 'uri' command a bit more prominent. (Guido Günther)
- Don't fail qemu driver intialization if we can't determine hugepage size (Guido Günther)
- blockjob: fix use-after-free in blockcopy (Eric Blake)
- blockjob: avoid memory leak during block pivot (Eric Blake)
- snapshot: conf: Enforce absolute paths on disk and memory images (Peter Krempa)
- Node Devices: Fix nodedev-list for fc_host & vports. (Prerna Saxena)
- blockjob: correctly report active commit for job info (Eric Blake)
- Fix vlanid attribute name in nwfilter d (Jianwei Hu)
- Don't overwrite errors from virNetDevBandwidthSet (Ján Tomko)
- virsh: check if domiftune parameters fit into UINT (Ján Tomko)
- storage: Refresh storage pool after upload (John Ferlan)
Improvements:
- qemu: Allow use of iothreads for disk definitions (John Ferlan)
- domain_conf: Add support for iothreads in disk definition (John Ferlan)
- qemu: Add support for iothreads (John Ferlan)
- domain_conf: Introduce iothreads XML (John Ferlan)
- qemu: Implement bulk stats API and one of the stats groups to return (Peter Krempa)
- virsh: Implement command to excercise the bulk stats APIs (Peter Krempa)
- remote: Implement bulk domain stats APIs in the remote driver (Peter Krempa)
- lib: Add few flags for the bulk stats APIs (Peter Krempa)
- conf: Add helper to free domain list (Peter Krempa)
- vbox: Register per partes (Michal Privoznik)
- virDriverLoadModule: Honor libvirt func name tranlsation (Michal Privoznik)
- virdrivermoduletest: Test all the modules (Michal Privoznik)
- domain_conf: fix internal flag verification (Eric Blake)
- API: Tweak virDomainOpenGraphics to return fd directly (Eric Blake)
- virsh: domain: Split out code to lookup domain from string (Peter Krempa)
- Wire up virDomainOpenGraphicsFD in QEMU driver (Ján Tomko)
- Add RPC implementation for virDomainOpenGraphicsFd (Ján Tomko)
- blkdeviotune: check for overflow when parsing XML (Erik Skultety)
- storage: remove unused 'canonPath' in virStorageFileGetMetadata (Chen Fan)
- Add new 'kvm' domain feature and ability to hide KVM signature (Alex Williamson)
- maint: drop spurious semicolons (Eric Blake)
- daemon: Fix option -v missing info priority log (Zhou Yimin)
- qemu: add support for splash-timeout (Martin Kletzander)
- qemu: add capability probing for splash-timeout (Martin Kletzander)
- storage: zfs: implement download and upload (Roman Bogorodskiy)
- fdstream: introduce virFDStreamOpenBlockDevice (Roman Bogorodskiy)
- fdstream: report error if virSetNonBlock fails (Roman Bogorodskiy)
- qemu: check for active domain after agent interaction (Eric Blake)
- Parallels: Change config report errors code. (Alexander Burluka)
- Parallels: add virNodeGetCPUMap(). (Alexander Burluka)
- daemon: use socket activation with systemd (Martin Kletzander)
- rpc: pass listen FD to the daemon being started (Martin Kletzander)
- util: add virCommandPassListenFDs() function (Martin Kletzander)
- tests: support dynamic prefixes in commandtest (Martin Kletzander)
- cfg.mk: allow integers to be assigned a value computed with i|j|k (Martin Kletzander)
- daemon: support passing FDs from the calling process (Martin Kletzander)
- rpc: set listen backlog on FDs as well as on other sockets (Martin Kletzander)
- remote: create virNetServerServiceNewFDOrUNIX() wrapper (Martin Kletzander)
- util: abstract parsing of passed FDs into virGetListenFDs() (Martin Kletzander)
- virsh: Don't print extra '-'s in error message for -k and -K options (Peter Krempa)
- hvsupport: Adapt to vbox driver rewrite (Michal Privoznik)
- qemu: hotplug: Sanitize shared device removal on media change (Peter Krempa)
- qemu: conf: Split out code to retrieve hostdev key and reuse it (Peter Krempa)
- qemu: conf: Split up qemuRemoveSharedDevice into per-device-type functions (Peter Krempa)
- qemu: conf: Split up qemuAddSharedDevice into per-device-type functions (Peter Krempa)
- qemu: conf: rename qemuCheckSharedDevice to qemuCheckSharedDisk (Peter Krempa)
- qemu: shared: Split out shared device list remove code (Peter Krempa)
- qemu: shared: Split out insertion code to the shared device list (Peter Krempa)
- qemu: hotplug: Format proper source string for cdrom media change (Peter Krempa)
- qemu: hotplug: Change arguments for qemuDomainChangeEjectableMedia (Peter Krempa)
- qemu: hotplug: Add helper to initialize/teardown new disks for VMs (Peter Krempa)
- qemu: hotplug: Untangle cleanup paths in qemuDomainChangeEjectableMedia (Peter Krempa)
- conf: Pass virStorageSource into virDomainDiskSourceIsBlockType (Peter Krempa)
- qemu: Explicitly state that hotplugging cdroms and floppies doesn't work (Peter Krempa)
- conf: fix comment (Giuseppe Scrivano)
- conf, virDomainFSDefPtr: rename "path" argument to "target" (Giuseppe Scrivano)
- bhyve: add volumes support (Roman Bogorodskiy)
- storage: make disk source pool translation generic (Roman Bogorodskiy)
- driver: Move virDrvNetworkGetDHCPLeases to the appropriate section (Peter Krempa)
- qemu: allow device block I/O tuning in session mode (Martin Kletzander)
- src/xenconfig: move common parsing/formatting to xen_common (Jim Fehlig)
- src/xenconfig: wrap common formatting code (Kiarie Kahurani)
- src/xenconfig: wrap common parsing code (Kiarie Kahurani)
- xen: rename xenxs to xenconfig (Jim Fehlig)
- qemu: process: Pin on per-vcpu basis instead of per-vcpupin element (Peter Krempa)
- conf: Refactor virDomainVcpuPinDefParseXML (Peter Krempa)
- conf: cpupin: Remove useless checking of vcpupin element count (Peter Krempa)
- qemu: process: Remove unnecessary argument and rename function (Peter Krempa)
- vbox: Introducing vboxCommonDriver (Taowei)
- vbox: Add registerDomainEvent (Taowei)
- vbox: Rewrite vboxNode functions (Taowei)
- vbox: Rewrite vboxConnectListAllDomains (Taowei)
- vbox: Rewrite vboxDomainScreenshot (Taowei)
- vbox: Rewrite vboxDomainSnapshotDelete (Taowei)
- vbox: Rewrite vboxDomainRevertToSnapshot (Taowei)
- vbox: Rewrite vboxDomainSnapshotHasMetadata (Taowei)
- vbox: Rewrite vboxDomainSnapshotIsCurrent (Taowei)
- vbox: Rewrite vboxDomainSnapshotCurrent (Taowei)
- vbox: Rewrite vboxDomainSnapshotGetParent (Taowei)
- vbox: Rewrite vboxDomainHasCurrentSnapshot (Taowei)
- vbox: Rewrite vboxSnapshotLookupByName (Taowei)
- vbox: Rewrite vboxDomainSnapshotListNames (Taowei)
- vbox: Rewrite vboxDomainSnapshotNum (Taowei)
- vbox: Rewrite vboxDomainSnapshotGetXMLDesc (Taowei)
- vbox: Rewrite vboxDomainSnapshotCreateXML (Taowei)
- vbox: Add API for vboxDomainSnapshotCreateXML (Taowei)
- vbox: Rewrite vboxDomainDetachDeviceFlags (Taowei)
- vbox: Rewrite vboxDomainDetachDevice (Taowei)
- vbox: Rewrite vboxDomainUpdateDeviceFlags (Taowei)
- vbox: Rewrite vboxDomainAttachDeviceFlags (Taowei)
- vbox: Rewrite vboxDomainAttachDevice (Taowei)
- vbox: Rewrite vboxDomainUndefine (Taowei)
- vbox: Rewrite vboxConnectNumOfDefinedDomains (Taowei)
- vbox: Rewrite vboxConnectListDefinedDomains (Taowei)
- vbox: Rewrite vboxDomainGetXMLDesc (Taowei)
- vbox: Add API for vboxDomainGetXMLDesc (Taowei)
- vbox: Rewrite vboxDomainGetMaxVcpus (Taowei)
- vbox: Rewrite vboxDomainGetVcpusFlags (Taowei)
- vbox: Rewrite vboxDomainSetVcpus (Taowei)
- vbox: Rewrite vboxDomainSetVcpusFlags (Taowei)
- vbox: Rewrite vboxDomainGetState (Taowei)
- vbox: Rewrite vboxDomainGetInfo (Taowei)
- vbox: Rewrite vboxDomainSetMemory (Taowei)
- vbox: Rewrite vboxDomainGetOSType (Taowei)
- vbox: Rewrite vboxDomainDestroy (Taowei)
- vbox: Rewrite vboxDomainDestroyFlags (Taowei)
- vbox: Rewrite vboxDomainReboot (Taowei)
- vbox: Rewrite vboxDomainShutdown (Taowei)
- vbox: Rewrite vboxDomainShutdownFlags (Taowei)
- vbox: Rewrite vboxDomainResume (Taowei)
- vbox: Rewrite vboxDomainSuspend (Taowei)
- vbox: Rewrite vboxDomainIsUpdated (Taowei)
- vbox: Rewrite vboxDomainIsPersistent (Taowei)
- vbox: Rewrite vboxDomainIsActive (Taowei)
- vbox: Rewrite vboxDomainLookupByName (Taowei)
- vbox: Rewrite vboxDomainCreateXML (Taowei)
- vbox: Rewrite vboxDomainCreate (Taowei)
- vbox: Rewrite vboxDomainCreateWithFlags (Taowei)
- vbox: Rewrite vboxDomainDefineXML (Taowei)
- vbox: Rewrite vboxDomainUndefineFlags (Taowei)
- vbox: Rewrite vboxDomainLookupByUUID (Taowei)
- vbox: Rewrite vboxDomainLookupById (Taowei)
- vbox: Rewrite vboxConnectNumOfDomains (Taowei)
- vbox: Rewrite vboxConnectListDomains (Taowei)
- vbox: Rewrite vboxConnectGetCapabilities (Taowei)
- vbox: Rewrite vboxConnectGetMaxVcpus (Taowei)
- vbox: Rewrite vboxConnectIsAlive (Taowei)
- vbox: Rewrite vboxConnectIsEncrypted (Taowei)
- vbox: Rewrite vboxConnectIsSecure (Taowei)
- vbox: Rewrite vboxConnectGetHostname (Taowei)
- vbox: Rewrite vboxConnectGetVersion (Taowei)
- vbox: Rewrite vboxDomainSave (Taowei)
- vbox: Rewrite vboxConnectClose (Taowei)
- vbox: Begin to rewrite, vboxConnectOpen (Taowei)
- src/xenxs: Refactor code formating vif device config (Jim Fehlig)
- src/xenxs: Refactor code formating peripheral device config (Kiarie Kahurani)
- src/xenxs: Refactor code formating Vfb config (Kiarie Kahurani)
- src/xenxs: Refactor code formating OS config (Kiarie Kahurani)
- src/xenxs: Refactor code formating CPU config (Kiarie Kahurani)
- src/xenxs: Refactor code formating xm disk config (Kiarie Kahurani)
- src/xenxs: Refactor code formating Char devices config (Kiarie Kahurani)
- src/xenxs: Refactor code formating event actions config (Kiarie Kahurani)
- src/xenxs: Refactor code formating virtual time config (Kiarie Kahurani)
- src/xenxs: Refactor code formating memory config (Kiarie Kahurani)
- src/xenxs: Refactor code formating general VM config (Kiarie Kahurani)
- qemu: Tidy up job handling during live migration (Sam Bobroff)
- LXC: resolve issues in lxcDomainSetMaxMemory (Chen Hanxiao)
- daemon: Limit default log level to journald to VIR_LOG_INFO (Peter Krempa)
- libvirtd: conf: Mention support for logging into journald (Peter Krempa)
- maint: improve syntax check for space around = (Eric Blake)
- qemu_conf: Undefine the correct symbol (Michal Privoznik)
- qemu: process: Fix header format of qemuProcessSetVcpuAffinities (Peter Krempa)
- qemu: use guest-fsfreeze-freeze-list command if mountpoints to freeze specified (Tomoki Sekiyama)
- qemu: Actually clear bandwidth settings (Jianwei Hu)
- src/xenxs: Refactor code parsing OS config (Kiarie Kahurani)
- src/xenxs: Refactor code parsing general config (Kiarie Kahurani)
- src/xenxs: Refactor code parsing emulated hardware config (Kiarie Kahurani)
- src/xenxs: Refactor code parsing Vif config (Kiarie Kahurani)
- src/xenxs: Refactor code parsing Char devices config (Kiarie Kahurani)
- src/xenxs: Refactor code parsing Vfb config (Kiarie Kahurani)
- src/xenxs: Refactor code parsing xm disk config (Kiarie Kahurani)
- src/xenxs: Refactor code parsing CPU features (Kiarie Kahurani)
- src/xenxs: Refactor code parsing PCI config (Kiarie Kahurani)
- src/xenxs: Refactor code parsing event actions (Kiarie Kahurani)
- src/xenxs: Refactor code parsing virtual time config (Kiarie Kahurani)
- src/xenxs: Refactor code parsing memory config (Kiarie Kahurani)
- conf: Add USB sound card support and implement it for qemu (Peter Krempa)
- hostdev: Add iSCSI hostdev XML (John Ferlan)
- domain_conf: Common routine to handle network storage host xml def (John Ferlan)
- qemu: Make virFileFindHugeTLBFS fault tolerant (Michal Privoznik)
- qemu: reword caps-related error (Martin Kletzander)
- domtop: Turn parse_argv into void (Michal Privoznik)
- qemu: fix comment in qemu.conf (Martin Kletzander)
Cleanups:
- virsh: drop unused variable (Eric Blake)
- Fix spacing around commas (Michal Privoznik)
- examples: test: Kill unsupported maxMemory element (Peter Krempa)
- cleanup spaces between parentheses and braces (Martin Kletzander)
- qemu_command: fix block indentation (Giuseppe Scrivano)
- qemu: Remove extraneous space in function prototypes (John Ferlan)
- daemon: Fix indentation in libvirtd.c (Wang Rui)
- domtop: Remove unused variable (Michal Privoznik)
thanks everybody for your contribution to this new release, be it with
reports, ideas, patches, reviews or help on the localization !
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
10 years, 3 months