[libvirt] [PATCH] qemu: agent: Fix QEMU guest agent is not available due to an error
by Xiubo Li
These days, we experienced one qemu guest agent is not available
error. Then the guest agent couldn't be used forever before rebooting
the libvirtd daemon or reboot the qemu-guest-agent in the VM(you can
also reboot the VM) to clear the priv->agentError.
This is one bug for a long time in many verisons of libvirtd:
https://bugzilla.redhat.com/show_bug.cgi?id=1090551
And there is one python script to reproduce this bug from the bugzilla:
https://github.com/aspirer/study/blob/master/qemu-guest-agent/test2.py
Just set the timeout to 0 at Line26, you can reproduce it very quickly:
rsp = libvirt_qemu.qemuAgentCommand(dom, cmd, 1, 0) // 1 -> 0
The reason why this could happen is that:
In case we received something like: {"return": {}} for example, it is
likely that somebody:
1) Started GA which sent one "guest-ping" command with seconds equals
to VIR_DOMAIN_QEMU_AGENT_COMMAND_NOWAIT(0), which makes this function
return "immediately" without waiting, and sleeps in virCondWait().
2) While in AgentIO thread the "guest-ping" command is sent successfully,
and then waiting for reply.
3) Then the GA thread is woken up and the mon->msg is set to NULL and
exit.
4) Now the AgentIO has received the reply for "guest-ping" command with
the mon->msg == NULL.
Before we just check the guest-sync case, and should also check for all
the other GA commands.
I have test many of the GA commands, which all can reporduce this bug.
This patch will check if this is the case and don't report an error but
return silently.
Signed-off-by: Xiubo Li <lixiubo(a)cmss.chinamobile.com>
Signed-off-by: Zhuoyu Zhang <zhangzhuoyu(a)cmss.chinamobile.com>
Signed-off-by: Wei Tang <tangwei(a)cmss.chinamobile.com>
Signed-off-by: Yaowei Bai <baiyaowei(a)cmss.chinamobile.com>
Signed-off-by: Qide Chen <chenqide(a)cmss.chinamobile.com>
---
src/qemu/qemu_agent.c | 30 +++++++++++++++++++++---------
src/util/virjson.h | 7 +++++++
2 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index eeede6b..5f08ba0 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -308,7 +308,6 @@ qemuAgentIOProcessLine(qemuAgentPtr mon,
{
virJSONValuePtr obj = NULL;
int ret = -1;
- unsigned long long id;
VIR_DEBUG("Line [%s]", line);
@@ -333,16 +332,29 @@ qemuAgentIOProcessLine(qemuAgentPtr mon,
obj = NULL;
ret = 0;
} else {
- /* If we've received something like:
- * {"return": 1234}
- * it is likely that somebody started GA
- * which is now processing our previous
- * guest-sync commands. Check if this is
- * the case and don't report an error but
+ /* In case we received something like:
+ * {"return": {}} for example,
+ * it is likely that somebody:
+ *
+ * 1) Started GA which sent one "guest-ping" command with
+ * seconds equals to VIR_DOMAIN_QEMU_AGENT_COMMAND_NOWAIT(0)
+ * makes this function return immediately without waiting,
+ * and sleeps in virCondWait().
+ *
+ * 2) While in AgentIO thread the "guest-ping" command is sent
+ * successfully, and the waiting for reply.
+ *
+ * 3) Then the GA thread is woken up and the mon->msg is set
+ * to NULL and exit.
+ *
+ * 4) Now the AgentIO has received the reply for "guest-ping"
+ * command with the mon->msg == NULL.
+ *
+ * Check if this is the case and don't report an error but
* return silently.
*/
- if (virJSONValueObjectGetNumberUlong(obj, "return", &id) == 0) {
- VIR_DEBUG("Ignoring delayed reply to guest-sync: %llu", id);
+ if (virIsValidJSONType(obj)) {
+ VIR_DEBUG("Ignoring delayed command reply");
ret = 0;
goto cleanup;
}
diff --git a/src/util/virjson.h b/src/util/virjson.h
index 66ed48a..d36ce8e 100644
--- a/src/util/virjson.h
+++ b/src/util/virjson.h
@@ -80,6 +80,13 @@ struct _virJSONValue {
} data;
};
+static inline bool
+virIsValidJSONType(virJSONValuePtr object)
+{
+ return ((object->type >= VIR_JSON_TYPE_OBJECT)
+ && (object->type <= VIR_JSON_TYPE_BOOLEAN));
+}
+
void virJSONValueFree(virJSONValuePtr value);
int virJSONValueObjectCreate(virJSONValuePtr *obj, ...)
--
1.8.3.1
8 years, 4 months
[libvirt] [PATCH 0/2] Introduce libvirt-libs.rpm
by Michal Privoznik
*** BLURB HERE ***
Michal Privoznik (2):
spec: Split libvirt-client
spec: Move virt-admin into its own package
libvirt.spec.in | 90 +++++++++++++++++++++++++++++++++++----------------------
1 file changed, 56 insertions(+), 34 deletions(-)
--
2.8.4
8 years, 4 months
[libvirt] [PATCH v2 0/4] devices: filesystem: type volume
by Olga Krishtal
The patches introduce new filesystem type volume:
<filesystem type='volume' accessmode='passthrough'>
<driver type='ploop' format='ploop'/>
<source pool='pool' volume='volume'/>
<target dir='/'/>
</filesystem>
This makes possible to use storage volumes as the source for disks.
v2:
-split patches
-rebased
Olga Krishtal (4):
filesystem: adds possibility to use storage pool as fs source
devices: filesystems: added volume type
vz: refactoring of prlsdkCreateCt
vz: support filesystem type volume
src/conf/domain_audit.c | 4 +-
src/conf/domain_conf.c | 52 +++++++++++++---
src/conf/domain_conf.h | 4 +-
src/libvirt_private.syms | 1 +
src/lxc/lxc_cgroup.c | 2 +-
src/lxc/lxc_container.c | 50 +++++++--------
src/lxc/lxc_controller.c | 18 +++---
src/lxc/lxc_native.c | 5 +-
src/lxc/lxc_process.c | 4 +-
src/openvz/openvz_conf.c | 6 +-
src/openvz/openvz_driver.c | 4 +-
src/qemu/qemu_command.c | 2 +-
src/storage/storage_driver.c | 4 +-
src/vbox/vbox_common.c | 6 +-
src/vmx/vmx.c | 6 +-
src/vz/vz_driver.c | 2 +-
src/vz/vz_sdk.c | 145 ++++++++++++++++++++++++++++++++++---------
src/vz/vz_sdk.h | 2 +-
18 files changed, 221 insertions(+), 96 deletions(-)
--
1.8.3.1
8 years, 4 months
[libvirt] [PATCH v3 00/10] Add support for LUKS encrypted devices
by John Ferlan
v2: http://www.redhat.com/archives/libvir-list/2016-June/msg01691.html
Changes since v2 (all as a result of code review)
Patch 1: New as a result of review comment regarding virSecretDefFormatUsage
Patch 2: Change "id" to "name", fixed the html.in, remove whitespice,
generated patch 1 due to virSecretDefFormatUsage comment
Patch 3: Altered the html.in, don't believe the review comment for
wrong type in qemuProcessGetVolumeQcowPassphrase is right,
also modified the testdata output file to follow suggestion
for changes made in patch 5 & 6
Patch 4: Was essentially ACK'd, but requires previous patches. Took care
of the testdata output file.
Patch 5: Adjusted html.in, modified virStorageEncryptionInfoDef to have
both cipher_* and ivgen_* params in it - affected other places
(and fixed those),
Patch 6: Essentially ACK'd (the chmod was removed)
Patch 7: NEW - going to need this for hot unplug...
Patch 8: Adjusted per review of this series and the other 3 patch series
for rbd disk hot plug/unplug
Patch 9: NEW - Need to generate a different alias for LUKS
Patch 10: Mostly unchanged except to utilze the luks specific alias
generation... also moved the unplug to right place.
John Ferlan (10):
conf: No need to check for usage fields during Format
conf: Add new secret type "passphrase"
util: Add 'usage' for encryption
encryption: Add luks parsing for storageencryption
encryption: Add <cipher> and <ivgen> to encryption
storage: Add support to create a luks volume
qemu: Introduce helper qemuDomainSecretDiskCapable
qemu: Add secinfo for hotplug virtio disk
qemu: Alter the qemuDomainGetSecretAESAlias to add new arg
qemu: Add luks support for domain disk
docs/aclpolkit.html.in | 4 +
docs/formatsecret.html.in | 62 ++++-
docs/formatstorageencryption.html.in | 115 ++++++++-
docs/schemas/secret.rng | 10 +
docs/schemas/storagecommon.rng | 57 ++++-
include/libvirt/libvirt-secret.h | 3 +-
src/access/viraccessdriverpolkit.c | 13 ++
src/conf/domain_conf.c | 11 +
src/conf/secret_conf.c | 36 ++-
src/conf/secret_conf.h | 1 +
src/conf/virsecretobj.c | 5 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_alias.c | 10 +-
src/qemu/qemu_alias.h | 3 +-
src/qemu/qemu_command.c | 9 +
src/qemu/qemu_domain.c | 58 +++--
src/qemu/qemu_domain.h | 3 +
src/qemu/qemu_hotplug.c | 123 +++++++++-
src/qemu/qemu_process.c | 19 +-
src/storage/storage_backend.c | 260 +++++++++++++++++++--
src/storage/storage_backend.h | 3 +-
src/storage/storage_backend_fs.c | 10 +-
src/storage/storage_backend_gluster.c | 2 +
src/util/virqemu.c | 23 ++
src/util/virqemu.h | 6 +
src/util/virstorageencryption.c | 166 +++++++++++--
src/util/virstorageencryption.h | 18 +-
.../qemuxml2argv-encrypted-disk-usage.args | 24 ++
.../qemuxml2argv-encrypted-disk-usage.xml | 36 +++
.../qemuxml2argv-luks-disk-cipher.args | 36 +++
.../qemuxml2argv-luks-disk-cipher.xml | 45 ++++
.../qemuxml2argvdata/qemuxml2argv-luks-disks.args | 36 +++
tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml | 45 ++++
tests/qemuxml2argvtest.c | 12 +-
.../qemuxml2xmlout-encrypted-disk-usage.xml | 1 +
.../qemuxml2xmlout-luks-disk-cipher.xml | 1 +
.../qemuxml2xmlout-luks-disks.xml | 1 +
tests/qemuxml2xmltest.c | 3 +
tests/secretxml2xmlin/usage-passphrase.xml | 7 +
tests/secretxml2xmltest.c | 1 +
tests/storagevolxml2argvtest.c | 3 +-
tests/storagevolxml2xmlin/vol-luks-cipher.xml | 23 ++
tests/storagevolxml2xmlin/vol-luks.xml | 21 ++
tests/storagevolxml2xmlout/vol-luks-cipher.xml | 23 ++
tests/storagevolxml2xmlout/vol-luks.xml | 21 ++
tests/storagevolxml2xmltest.c | 2 +
46 files changed, 1267 insertions(+), 105 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk-usage.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk-usage.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disk-cipher.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disk-cipher.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disks.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-encrypted-disk-usage.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disk-cipher.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disks.xml
create mode 100644 tests/secretxml2xmlin/usage-passphrase.xml
create mode 100644 tests/storagevolxml2xmlin/vol-luks-cipher.xml
create mode 100644 tests/storagevolxml2xmlin/vol-luks.xml
create mode 100644 tests/storagevolxml2xmlout/vol-luks-cipher.xml
create mode 100644 tests/storagevolxml2xmlout/vol-luks.xml
--
2.5.5
8 years, 4 months
[libvirt] [PATCH v6 0/5] qemu: expand domain memory statistics
by Derbyshev Dmitriy
From: Derbyshev Dmitry <dderbyshev(a)virtuozzo.com>
QEMU reports timestamp and available along with other memory statistics.
This information was not saved into domain statistics.
Also, to collect all balloon statistics for all guests it was necessary to make
several libvirt requests (one per VE).
Last patch allows doing this via qemuConnectGetAllDomainStats in one request.
Changes since v1:
* Enum numeration fixed
* Macro getting "usage" field fixed
Changes since v2:
* Previous patches were on wrong branch
* qemu's stat name was "stat-available-memory"
Changes since v3:
* domstats patch added
Changes since v4:
* Formatted and rephrased commit messages
* Fixed libvirt crash, caused by simultaneous incorrect QUERY job execution
Changes since v5:
* Updated virsh.pod
* Splitted patch about domstats into 2 patches
* Do not report balloon.current as balloon.actual
Derbyshev Dmitry (5):
virsh: Add balloon stats description to .pod
qemu: expand domain memory statistics with 'usable'
qemu: expand domain memory statistics with 'last-update' timestamp
qemu: split qemuDomainMemoryStats into internal and external functions
qemu: return balloon statistics when all domain statistics reported
include/libvirt/libvirt-domain.h | 11 ++++-
src/libvirt-domain.c | 5 +++
src/qemu/qemu_driver.c | 94 ++++++++++++++++++++++++++++++----------
src/qemu/qemu_monitor_json.c | 24 ++++++----
tools/virsh-domain-monitor.c | 4 ++
tools/virsh.pod | 29 ++++++++++++-
6 files changed, 133 insertions(+), 34 deletions(-)
--
1.9.5.msysgit.0
8 years, 4 months
[libvirt] [PATCH 0/6] bhyve: virConnectDomainXMLFromNative
by Fabian Freyer
Differences to v3:
functional changes:
- Throw an error when there is no bhyverun command (bhyve_argv == NULL)
- Parse the memory size in the same way bhyve does it, and adapt the
relevant
code (vm_parse_memsize) from the FreeBSD source tree.
Here I'm a bit unsure about attribution; the original function comes
from a
BSD 2-Clause Licenced file, and I'm not sure if I also have to
include the
BSD disclaimer to the header.
- Removed capability check for clock offset
- Fix a mixup of NMDM master and slave
- Fixed numbering of disks. When >25 disks are given, disks after
vdz/sdz no
longer get added.
- Fail completely should parsing fail.
bugfixes:
- Fix a possible Null-Pointer dereference in
bhyveParseCommandLineString when
no loader command is given.
- Fix an off-by-one in the string allocation (bhyve_parse_command.c:60)
style:
- Fix some indentation
- Move else-clauses on the same line as the closing bracket from the if
Link to v3:
https://www.redhat.com/archives/libvir-list/2016-June/msg01741.html
Link to v2:
https://www.redhat.com/archives/libvir-list/2016-June/msg00728.html
Link to v1:
https://www.redhat.com/archives/libvir-list/2016-June/msg00001.html
Fabian Freyer (6):
config-post.h: define __GNUC_PREREQ if not defined
gnulib: add getopt module
bhyve: implement virConnectDomainXMLFromNative
bhyve: implement bhyve argument parser
bhyve: implement argument parser for loader
Add some tests for bhyveParseCommandLineString
bootstrap.conf | 1 +
config-post.h | 18 +
m4/virt-driver-bhyve.m4 | 3 +
po/POTFILES.in | 1 +
src/Makefile.am | 2 +
src/bhyve/bhyve_driver.c | 42 +
src/bhyve/bhyve_parse_command.c | 892
+++++++++++++++++++++
src/bhyve/bhyve_parse_command.h | 30 +
tests/Makefile.am | 23 +-
.../bhyveargv2xmldata/bhyveargv2xml-acpiapic.args | 9 +
tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.xml | 20 +
tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.args | 8 +
tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.xml | 21 +
tests/bhyveargv2xmldata/bhyveargv2xml-base.args | 7 +
tests/bhyveargv2xmldata/bhyveargv2xml-base.xml | 16 +
.../bhyveargv2xml-bhyveload-bootorder.args | 13 +
.../bhyveargv2xml-bhyveload-bootorder.xml | 27 +
.../bhyveargv2xml-bhyveload-custom.args | 11 +
.../bhyveargv2xml-bhyveload-custom.xml | 18 +
.../bhyveargv2xml-bhyveload-mem-mismatch.args | 12 +
.../bhyveargv2xml-bhyveload-memsize-fail.args | 12 +
.../bhyveargv2xml-bhyveload-name-mismatch.args | 12 +
.../bhyveargv2xml-bhyveload-vda.args | 12 +
.../bhyveargv2xml-bhyveload-vda.xml | 21 +
.../bhyveargv2xml-bhyverun-mem-mismatch.args | 12 +
.../bhyveargv2xml-bhyverun-name-mismatch.args | 12 +
tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.args | 8 +
tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.xml | 21 +
tests/bhyveargv2xmldata/bhyveargv2xml-console.args | 10 +
tests/bhyveargv2xmldata/bhyveargv2xml-console.xml | 28 +
.../bhyveargv2xmldata/bhyveargv2xml-console2.args | 10 +
tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml | 15 +
.../bhyveargv2xmldata/bhyveargv2xml-console3.args | 11 +
tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml | 27 +
.../bhyveargv2xmldata/bhyveargv2xml-console4.args | 10 +
tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml | 15 +
.../bhyveargv2xml-custom-loader.args | 8 +
.../bhyveargv2xml-custom-loader.xml | 18 +
.../bhyveargv2xml-disk-toomany.args | 34 +
.../bhyveargv2xml-disk-toomany.xml | 146 ++++
.../bhyveargv2xmldata/bhyveargv2xml-extraargs.args | 8 +
.../bhyveargv2xml-memsize-fail.args | 7 +
.../bhyveargv2xml-memsize-human.args | 7 +
.../bhyveargv2xml-memsize-human.xml | 16 +
.../bhyveargv2xml-memsize-large.args | 7 +
.../bhyveargv2xml-memsize-large.xml | 16 +
tests/bhyveargv2xmldata/bhyveargv2xml-name.args | 7 +
tests/bhyveargv2xmldata/bhyveargv2xml-name.xml | 16 +
tests/bhyveargv2xmldata/bhyveargv2xml-oneline.args | 1 +
tests/bhyveargv2xmldata/bhyveargv2xml-oneline.xml | 16 +
tests/bhyveargv2xmldata/bhyveargv2xml-utc.args | 8 +
tests/bhyveargv2xmldata/bhyveargv2xml-utc.xml | 16 +
tests/bhyveargv2xmldata/bhyveargv2xml-uuid.args | 8 +
tests/bhyveargv2xmldata/bhyveargv2xml-uuid.xml | 16 +
tests/bhyveargv2xmldata/bhyveargv2xml-uuid2.args | 8 +
tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.args | 7 +
tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.xml | 16 +
.../bhyveargv2xml-virtio-blk.args | 8 +
.../bhyveargv2xmldata/bhyveargv2xml-virtio-blk.xml | 21 +
.../bhyveargv2xml-virtio-net.args | 9 +
.../bhyveargv2xmldata/bhyveargv2xml-virtio-net.xml | 26 +
.../bhyveargv2xml-virtio-net2.args | 8 +
.../bhyveargv2xml-virtio-net2.xml | 16 +
.../bhyveargv2xml-virtio-net3.args | 8 +
.../bhyveargv2xml-virtio-net3.xml | 16 +
.../bhyveargv2xml-virtio-net4.args | 8 +
.../bhyveargv2xml-virtio-net4.xml | 21 +
tests/bhyveargv2xmlmock.c | 27 +
tests/bhyveargv2xmltest.c | 213 +++++
69 files changed, 2174 insertions(+), 3 deletions(-)
create mode 100644 src/bhyve/bhyve_parse_command.c
create mode 100644 src/bhyve/bhyve_parse_command.h
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-acpiapic.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-ahci-hd.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-base.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-base.xml
create mode 100644
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.args
create mode 100644
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-bootorder.xml
create mode 100644
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.args
create mode 100644
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-custom.xml
create mode 100644
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-mem-mismatch.args
create mode 100644
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-memsize-fail.args
create mode 100644
tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-name-mismatch.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-bhyveload-vda.xml
create mode 100644
tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-mem-mismatch.args
create mode 100644
tests/bhyveargv2xmldata/bhyveargv2xml-bhyverun-name-mismatch.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-cdrom.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console2.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console2.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console3.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console3.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console4.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-console4.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-custom-loader.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-disk-toomany.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-extraargs.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-memsize-fail.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-memsize-human.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-memsize-large.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-name.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-name.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-oneline.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-oneline.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-utc.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-utc.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-uuid.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-uuid.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-uuid2.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-vcpus.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-blk.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net2.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net3.xml
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-virtio-net4.xml
create mode 100644 tests/bhyveargv2xmlmock.c
create mode 100644 tests/bhyveargv2xmltest.c
--
2.5.5
8 years, 4 months
[libvirt] [PATCH v2 0/2] virsh expand virsh list command options
by Chen Hanxiao
Chen Hanxiao (2):
virsh: allow both --uuid and --name at same cmd
virsh: enable --table with --name or --uuid
tools/virsh-domain-monitor.c | 56 +++++++++++++++++++++++++++++++++++++-------
1 file changed, 47 insertions(+), 9 deletions(-)
--
2.5.0
8 years, 4 months
[libvirt] [libvirt-perl PATCH] Add support for VIR_SECRET_USAGE_TYPE_PASSPHRASE
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
This fixes a build for me with upstream libvirt.
Virt.xs | 1 +
lib/Sys/Virt/Secret.pm | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/Virt.xs b/Virt.xs
index cf4e5bc5337c..4c9f86b972f3 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -8534,6 +8534,7 @@ BOOT:
REGISTER_CONSTANT(VIR_SECRET_USAGE_TYPE_VOLUME, USAGE_TYPE_VOLUME);
REGISTER_CONSTANT(VIR_SECRET_USAGE_TYPE_CEPH, USAGE_TYPE_CEPH);
REGISTER_CONSTANT(VIR_SECRET_USAGE_TYPE_ISCSI, USAGE_TYPE_ISCSI);
+ REGISTER_CONSTANT(VIR_SECRET_USAGE_TYPE_PASSPHRASE, USAGE_TYPE_PASSPHRASE);
REGISTER_CONSTANT(VIR_CONNECT_LIST_SECRETS_EPHEMERAL, LIST_EPHEMERAL);
diff --git a/lib/Sys/Virt/Secret.pm b/lib/Sys/Virt/Secret.pm
index b8711909e7ba..beab68badef3 100644
--- a/lib/Sys/Virt/Secret.pm
+++ b/lib/Sys/Virt/Secret.pm
@@ -149,6 +149,11 @@ The constant for secrets which are to be used for authenticating
to iSCSI storage volumes. The usage ID for secrets will refer to
the server name.
+=item Sys::Virt::Secret::USAGE_TYPE_PASSPHRASE
+
+The constant for general purpose secret to be used by various libvirt
+objects to provide a single passphrase.
+
=back
=head2 LIST FILTERING
--
2.9.0
8 years, 4 months
[libvirt] [PATCH REPOST 00/38] Introduce APIs to change daemon's logging settings
by Erik Skultety
Basically the same series as
https://www.redhat.com/archives/libvir-list/2016-March/msg01534.html, just
rebased onto the current HEAD.
Daniel pointed out in 31/38 maybe we do not want to expose an API to set
logging level. Despite the truth being that the functionality of logging levels
can be replaced by logging filters completely, I think that it still provides
us with more convenience than having to specify a big bunch of filters.
Erik Skultety (38):
virlog: Return void instead of int in virLogReset<Foo> methods
virlog: Convert virLogOutputs to a list of pointers to outputs
virlog: Convert virLogFilters to a list of pointers to filters
virlog: Export virLogOutputPtr through header
virlog: Export virLogFilterPtr through header
virlog: Introduce virLogSetFilters
virlog: Introduce virLogSetOutputs
daemon: Replace virLogParseOutputs with virLogSetOutputs in callers
daemon: Replace virLogParseFilters with virLogSetFilters in callers
virlog: Introduce virLogDefineOutputs
virlog: Introduce virLogDefineFilters
virlog: Rename virLogAddOutputTo to virLogNewOutput
virlog: Rename virLogDefineOutput to virLogOutputNew
virlog: Rename virLogDefineFilter to virLogFilterNew
virlog: Introduce virLogOutputFree
virlog: Introduce virLogOutputListFree
virlog: Introduce virLogFilterFree
virlog: Introduce virLogFilterListFree
virlog: Make virLogReset methods use of virLog(Output|Filter)ListFree
virlog: Split output parsing and output defining to separate
operations
virlog: Split filter parsing and filter defining to separate
operations
virlog: Split parsing and setting priority
virlog: Introduce virLogOutputExists
virlog: Make use of virLogOutputExists
virlog: Take a special care of syslog when setting new set of log
outputs
virlog: Swap the new copy of outputs with the global existing one
virlog: Rename virLogFiltersSerial to virLogSerial
virlog: Make virLogSetDefaultPriority trigger source update as well
virlog: Introduce an API mutex that serializes all setters
virlog: Acquire virLogAPILock in each setter API
admin: Introduce virAdmConnectGetLoggingLevel
admin: Introduce virAdmConnectGetLoggingFilters
admin: Introduce virAdmConnectGetLoggingOutputs
admin: Introduce virAdmConnectSetLoggingLevel
admin: Introduce virAdmConnectSetLoggingFilters
admin: Introduce virAdmConnectSetLoggingOutputs
admin: Export logging level constants via libvirt-admin.h
virt-admin: Wire-up the logging APIs
daemon/admin.c | 126 ++++++++
daemon/libvirtd.c | 8 +-
include/libvirt/libvirt-admin.h | 37 +++
src/admin/admin_protocol.x | 74 ++++-
src/admin/admin_remote.c | 86 +++++
src/admin_protocol-structs | 39 +++
src/libvirt-admin.c | 220 +++++++++++++
src/libvirt_admin_private.syms | 9 +
src/libvirt_admin_public.syms | 6 +
src/libvirt_private.syms | 14 +-
src/locking/lock_daemon.c | 8 +-
src/logging/log_daemon.c | 8 +-
src/util/virlog.c | 698 +++++++++++++++++++++++++++-------------
src/util/virlog.h | 50 +--
tests/eventtest.c | 3 +-
tests/testutils.c | 19 +-
tests/virlogtest.c | 12 +-
tools/virt-admin.c | 204 ++++++++++++
18 files changed, 1361 insertions(+), 260 deletions(-)
--
2.4.11
8 years, 4 months
[libvirt] [PATCH] qemu: Memory locking is only required for KVM guests on ppc64
by Andrea Bolognani
Due to the way the hardware works, KVM on ppc64 always requires
memory locking; however, that is not the case for non-KVM ppc64
guests, eg. ppc64 guests that are running on x86_64 with TCG.
Only require memory locking for ppc64 guests if they are using
KVM or, as it's the case for all architectures, they have host
devices assigned using VFIO.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1350772
---
src/qemu/qemu_domain.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 304e617..42b5511 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -5355,10 +5355,6 @@ qemuDomainRequiresMemLock(virDomainDefPtr def)
if (def->mem.locked)
return true;
- /* ppc64 domains need to lock some memory even when VFIO is not used */
- if (ARCH_IS_PPC64(def->os.arch))
- return true;
-
for (i = 0; i < def->nhostdevs; i++) {
virDomainHostdevDefPtr dev = def->hostdevs[i];
@@ -5368,6 +5364,10 @@ qemuDomainRequiresMemLock(virDomainDefPtr def)
return true;
}
+ /* ppc64 KVM domains need to lock some memory even when VFIO is not used */
+ if (ARCH_IS_PPC64(def->os.arch) && def->virtType == VIR_DOMAIN_VIRT_KVM)
+ return true;
+
return false;
}
--
2.7.4
8 years, 4 months