[libvirt] [PATCH v2 0/8] Add IV Secret Object support
by John Ferlan
v1 here (specifically patches 11 & 12)
http://www.redhat.com/archives/libvir-list/2016-April/msg01077.html
What's new/changed:
Patches 1-3 address comments made by Jan in his review of v1.
Patch 4 is essentially following through on the Patch 3 comment
Patch 5 was part of patch 11, but I split it out for easier review
Patch 6 is the remainder of the former patch 11. Other than using the
...SECRET_INFO_TYPE_xxx nomenclature, no other real changes.
Patch 7 was part of patch 12, but I split it out to reduce the amount
to review. Beyond the aforementioned ...SECRET_INFO_TYPE_xxx changes,
I removed qemuDomainSecretInfoGetAlias. Initially created to help with
any hotplug code, but that's not necessary, so remove it for now. It was
brought up on Jan's comments as well. Create qemuDomainSecretSetup in
order to address Jan's other comment about a common API
This code could be merged with patch 8, but separating it *and* leaving
qemuDomainSecretHaveEncrypt essentially brain-dead worked made for a
shorter pile to look at
Patch 8 is the remainder of patch 12. I investigated extracting the
iSCSI and RBD code out, but it really just didn't make practice sense.
I altered qemuBuildSecretIVCommandLine to just access the IV alias directly
since the callers were adjusted to only try to build the IV object if
necessary. The qemuBuild{Disk|Hostdev}iSCSICommandLine were renamed to
qemuBuild{Disk|Hostdev}SecinfoCommandLine and each encapsulated the
call to qemuBuildSecretIVCommandLine rather than inlining it in each
of the callers
The qemuDomainSecretHaveEncrypt will not be braindead.
None of the tests changed, so it doesn't seem I messed anything up
with all the requested adjustments.
John Ferlan (8):
qemu: Adjust names of qemuDomainSecretInfoType enums
qemu: Split out the master key create and write
qemu: Move qemuDomainSecretPrepare to qemuProcessPrepareDomain
qemu: Move qemuDomainSecretDestroy to qemuProcessLaunch
qemu: Separate network URI command building code
qemu: Introduce qemuDomainSecretIV
qemu: Introduce new Secret IV API's
qemu: Utilize qemu secret objects for SCSI/RBD auth/secret
configure.ac | 1 +
src/qemu/qemu_alias.c | 23 ++
src/qemu/qemu_alias.h | 2 +
src/qemu/qemu_command.c | 359 +++++++++++++++++++--
src/qemu/qemu_domain.c | 242 ++++++++++++--
src/qemu/qemu_domain.h | 34 +-
src/qemu/qemu_hotplug.c | 6 +-
src/qemu/qemu_process.c | 23 +-
...uxml2argv-disk-drive-network-iscsi-auth-IV.args | 39 +++
...muxml2argv-disk-drive-network-iscsi-auth-IV.xml | 43 +++
...emuxml2argv-disk-drive-network-rbd-auth-IV.args | 31 ++
...qemuxml2argv-disk-drive-network-rbd-auth-IV.xml | 42 +++
...emuxml2argv-hostdev-scsi-lsi-iscsi-auth-IV.args | 41 +++
...qemuxml2argv-hostdev-scsi-lsi-iscsi-auth-IV.xml | 48 +++
...xml2argv-hostdev-scsi-virtio-iscsi-auth-IV.args | 43 +++
...uxml2argv-hostdev-scsi-virtio-iscsi-auth-IV.xml | 48 +++
tests/qemuxml2argvmock.c | 31 +-
tests/qemuxml2argvtest.c | 19 ++
18 files changed, 1009 insertions(+), 66 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth-IV.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth-IV.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-IV.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-IV.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth-IV.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-lsi-iscsi-auth-IV.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth-IV.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-virtio-iscsi-auth-IV.xml
--
2.5.5
8 years, 6 months
[libvirt] Fwd: Dump network traffic from each VM.
by Julio Faracco
Forwarding to devel-list.
Julio Cesar Faracco
---------- Forwarded message ----------
From: Julio Faracco <jcfaracco(a)gmail.com>
Date: 2016-05-04 12:37 GMT-03:00
Subject: Dump network traffic from each VM.
To: libvirt-users(a)redhat.com
Hi guys,
Does anybody know how to dump the network trafic from each virtual
machine using libvirt?
Here, we usually use VPN softwares and other network tools inside
Virtual Machines (Windows and Linux). Sometimes, this applications
does not work properly, so we need to dump the network traffic of each
Virtual Machine to compare and debug.
How can I enable it using libvirt? I know that if you use a QEMU
instance, you can enable the dump using "-netdev dump,...".
Thanks! :-)
Julio Cesar Faracco
8 years, 6 months
[libvirt] [PATCH 00/27] Remove many conditionals from the RPM
by Daniel P. Berrange
Cole previously suggested that we should simplify the
RPM spec by removing conditionals that we never need
to toggle for RHEL / Fedora builds, rather than having
conditionals for every single feature that exists.
This series does just that....
Daniel P. Berrange (27):
libvirt.spec.in: explicitly disable xenapi & vz drivers
libvirt.spec.in: drop Fedora < 20 and RHEL < 6
libvirt.spec.in: remove client only build option
libvirt.spec.in: remove conditional for driver modules
libvirt.spec.in: remove libvirtd conditional
libvirt.spec.in: remove avahi conditional
libvirt.spec.in: remove hal conditional
libvirt.spec.in: remove apparmor conditional
libvirt.spec.in: remove capng conditional
libvirt.spec.in: remove udev conditional
libvirt.spec.in: remove netcf conditional
libvirt.spec.in: remove audit conditional
libvirt.spec.in: remove dtrace conditional
libvirt.spec.in: remove sasl conditionals
libvirt.spec.in: remove polkit conditional
libvirt.spec.in: remove yajl conditional
libvirt.spec.in: remove selinux conditional
libvirt.spec.in: remove interface driver conditional
libvirt.spec.in: remove network driver conditiaonl
libvirt.spec.in: remove most storage conditionals
libvirt.spec.in: remove nodedev conditional
libvirt.spec.in: remove nwfilter driver conditional
libvirt.spec.in: remove libpcap conditional
libvirt.spec.in: remove macvtap conditional
libvirt.spec.in: remove libnl conditional
libvirt.spec.in: remove nss plugin conditional
libvirt.spec.in: use explicit --with-xxx for all features
libvirt.spec.in | 1205 +++++++++++++++----------------------------------------
1 file changed, 333 insertions(+), 872 deletions(-)
--
2.5.5
8 years, 6 months
[libvirt] [PATCH 0/2] Two trivial fixes
by Michal Privoznik
*** BLURB HERE ***
Michal Privoznik (2):
virNetServerClientNewPostExecRestart: Drop useless typecasts
virNetServerClientNewPostExecRestart: Avoid align problems
src/rpc/virnetserverclient.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
--
2.8.1
8 years, 6 months
[libvirt] [PATCH v2] Get the maxvcpus from both the qemuCaps and /dev/kvm
by Shivaprasad G Bhat
For some archs and machines, the maxvcpus defined in the kernel can be different
from the qemu-caps maxvcpus. Just reporting the kernel defined maxvcpus is not
be sufficient. virsh domacapabilities and virsh maxvcpus --type kvm return
different maxvcpus values and is confusing as to know what actually works.
The minimum of the two values is what actually works.
For example on PPC64, the KVM_MAX_VCPUS is defined to be 1024 in kernel
where as qemu has MAX_CPUMASK_BITS defined at 255 in include/sysemu/sysemu.h.
The guest can go upto 256 vcpus here.
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
---
src/qemu/qemu_driver.c | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 3d0c7c8..2716af8 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1255,10 +1255,31 @@ static int qemuConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int
-kvmGetMaxVCPUs(void)
+kvmGetMaxVCPUs(virConnectPtr conn)
{
int fd;
int ret;
+ int qemuCapsMaxVcpus = 0;
+ virArch arch = virArchFromHost();
+ virQEMUCapsPtr qemuCaps = NULL;
+ virQEMUDriverPtr driver = conn->privateData;
+ const char *machine;
+
+ if (!(qemuCaps = virQEMUCapsCacheLookupByArch(driver->qemuCapsCache,
+ arch))) {
+ virReportError(VIR_ERR_INVALID_ARG,
+ _("unable to find any emulator to serve '%s' "
+ "architecture"), virArchToString(arch));
+ return -1;
+ }
+
+ if (!(machine = virQEMUCapsGetDefaultMachine(qemuCaps))) {
+ virObjectUnref(qemuCaps);
+ return -1;
+ }
+
+ qemuCapsMaxVcpus = virQEMUCapsGetMachineMaxCpus(qemuCaps, machine);
+ virObjectUnref(qemuCaps);
if ((fd = open(KVM_DEVICE, O_RDONLY)) < 0) {
virReportSystemError(errno, _("Unable to open %s"), KVM_DEVICE);
@@ -1282,7 +1303,7 @@ kvmGetMaxVCPUs(void)
cleanup:
VIR_FORCE_CLOSE(fd);
- return ret;
+ return ret > qemuCapsMaxVcpus ? qemuCapsMaxVcpus : ret;
}
@@ -1323,7 +1344,7 @@ qemuConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type)
return 16;
if (STRCASEEQ(type, "kvm"))
- return kvmGetMaxVCPUs();
+ return kvmGetMaxVCPUs(conn);
if (STRCASEEQ(type, "kqemu"))
return 1;
8 years, 6 months
[libvirt] [PATCH] Add qemucapsprobe in .gitignore
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
Pushed as trivial. I forgot to squash this into the patch which adds
qemucapsprobe :(
.gitignore | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index ba537d8..fc21bad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -159,8 +159,9 @@
/tests/*.log
/tests/*.pid
/tests/*.trs
-/tests/commandhelper
/tests/*test
+/tests/commandhelper
+/tests/qemucapsprobe
!/tests/*schematest
!/tests/virt-aa-helper-test
/tests/objectlocking
--
2.8.2
8 years, 6 months
[libvirt] [PATCH 0/6] tests: Add qemucapsprobe helper
by Jiri Denemark
Adding new *.replies files for qemucapabilitiestest or updating the
files when libvirt adds an additional QMP command into the probing
process is quite painful. The goal of the new qemucapsprobe command is
to make this process as easy as
tests/qemucapsprobe /path/to/qemu/binary >caps.replies
Jiri Denemark (6):
tests: Create a shared library with qemu driver
tests: Decouple preload code from main()
qemu: Make virQEMUCapsNewForBinary usable from tests
qemu: Make qemuMonitorJSONIOProcessLine available for tests
virjson: Make pretty format more compact
tests: Add qemucapsprobe helper
src/qemu/qemu_capabilities.c | 38 ++-
src/qemu/qemu_capspriv.h | 8 +
src/qemu/qemu_monitor_json.c | 2 +-
src/qemu/qemu_monitor_json.h | 4 +
src/util/virjson.c | 4 +-
tests/Makefile.am | 23 ++
tests/qemucapabilitiestest.c | 5 +
tests/qemucapsprobe.c | 82 +++++++
tests/qemucapsprobemock.c | 93 ++++++++
tests/testutils.h | 9 +-
.../virnetdaemondata/output-data-admin-nomdns.json | 254 ++++++++++-----------
.../output-data-admin-server-names.json | 254 ++++++++++-----------
.../virnetdaemondata/output-data-anon-clients.json | 128 +++++------
tests/virnetdaemondata/output-data-client-ids.json | 128 +++++------
.../output-data-client-timestamp.json | 132 +++++------
.../output-data-initial-nomdns.json | 128 +++++------
tests/virnetdaemondata/output-data-initial.json | 130 +++++------
.../output-data-no-keepalive-required.json | 254 ++++++++++-----------
18 files changed, 960 insertions(+), 716 deletions(-)
create mode 100644 tests/qemucapsprobe.c
create mode 100644 tests/qemucapsprobemock.c
--
2.8.2
8 years, 6 months
[libvirt] [PATCH 1/2] configure: split out UML driver checks
by Roman Bogorodskiy
Move all the UML driver related routines into m4/virt-driver-uml.m4.
---
configure.ac | 28 ++--------------------------
m4/virt-driver-uml.m4 | 47 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 26 deletions(-)
create mode 100644 m4/virt-driver-uml.m4
diff --git a/configure.ac b/configure.ac
index 88e2e20..d19c1a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -537,10 +537,6 @@ AC_ARG_WITH([qemu],
[AS_HELP_STRING([--with-qemu],
[add QEMU/KVM support @<:@default=yes@:>@])])
m4_divert_text([DEFAULTS], [with_qemu=yes])
-AC_ARG_WITH([uml],
- [AS_HELP_STRING([--with-uml],
- [add UML support @<:@default=check@:>@])])
-m4_divert_text([DEFAULTS], [with_uml=check])
AC_ARG_WITH([openvz],
[AS_HELP_STRING([--with-openvz],
[add OpenVZ support @<:@default=check@:>@])])
@@ -1561,27 +1557,7 @@ dnl
dnl Checks for the UML driver
dnl
-if test "$with_libvirtd" = "no" ; then
- with_uml=no
-fi
-if test "$with_uml" = "yes" || test "$with_uml" = "check"; then
- AC_CHECK_HEADER([sys/inotify.h], [
- with_uml=yes
- ], [
- if test "$with_uml" = "check"; then
- with_uml=no
- AC_MSG_NOTICE([<sys/inotify.h> is required for the UML driver, disabling it])
- else
- AC_MSG_ERROR([The <sys/inotify.h> is required for the UML driver. Upgrade your libc6.])
- fi
- ])
-fi
-if test "$with_uml" = "yes" ; then
- AC_DEFINE_UNQUOTED([WITH_UML], 1, [whether UML driver is enabled])
-fi
-AM_CONDITIONAL([WITH_UML], [test "$with_uml" = "yes"])
-
-
+LIBVIRT_DRIVER_CHECK_UML
dnl
dnl check for PHYP
@@ -2747,7 +2723,7 @@ AC_MSG_NOTICE([Drivers])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([ Xen: $with_xen])
AC_MSG_NOTICE([ QEMU: $with_qemu])
-AC_MSG_NOTICE([ UML: $with_uml])
+LIBVIRT_DRIVER_RESULT_UML
AC_MSG_NOTICE([ OpenVZ: $with_openvz])
AC_MSG_NOTICE([ VMware: $with_vmware])
AC_MSG_NOTICE([ VBox: $with_vbox])
diff --git a/m4/virt-driver-uml.m4 b/m4/virt-driver-uml.m4
new file mode 100644
index 0000000..4132315
--- /dev/null
+++ b/m4/virt-driver-uml.m4
@@ -0,0 +1,47 @@
+dnl The UML driver
+dnl
+dnl Copyright (C) 2005-2015 Red Hat, Inc.
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License, or (at your option) any later version.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+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/>.
+dnl
+
+AC_DEFUN([LIBVIRT_DRIVER_CHECK_UML],[
+ AC_ARG_WITH([uml],
+ [AS_HELP_STRING([--with-uml],
+ [add UML support @<:@default=check@:>@])])
+ m4_divert_text([DEFAULTS], [with_uml=check])
+
+ if test "$with_uml" = "yes" || test "$with_uml" = "check"; then
+ AC_CHECK_HEADER([sys/inotify.h], [
+ with_uml=yes
+ ], [
+ if test "$with_uml" = "check"; then
+ with_uml=no
+ AC_MSG_NOTICE([<sys/inotify.h> is required for the UML driver, disabling it])
+ else
+ AC_MSG_ERROR([The <sys/inotify.h> is required for the UML driver. Upgrade your libc6.])
+ fi
+ ])
+ fi
+
+ if test "$with_uml" = "yes" ; then
+ AC_DEFINE_UNQUOTED([WITH_UML], 1, [whether UML driver is enabled])
+ fi
+ AM_CONDITIONAL([WITH_UML], [test "$with_uml" = "yes"])
+])
+
+AC_DEFUN([LIBVIRT_DRIVER_RESULT_UML],[
+ AC_MSG_NOTICE([ UML: $with_uml])
+])
--
2.7.4
8 years, 6 months
[libvirt] [PATCH v3 0/2] bhyve: implement domainShutdown
by Roman Bogorodskiy
Changes from v2:
- Split domainDestroy changes and domainShutdown addition into two
patches
- In bhyveDestroy, close bhyve monitor after running 'bhyvectl --destroy'
(reasoning in the commit message)
Roman Bogorodskiy (2):
bhyve: drop virProcessKillPainfully() from destroy
bhyve: implement domainShutdown
src/bhyve/bhyve_driver.c | 27 +++++++++++++++++++++++++++
src/bhyve/bhyve_process.c | 43 +++++++++++++++++++++++++++++--------------
src/bhyve/bhyve_process.h | 2 ++
3 files changed, 58 insertions(+), 14 deletions(-)
--
2.7.4
8 years, 6 months
[libvirt] ANNOUNCE: libvirt 1.3.3.1 maintenance release
by Cole Robinson
libvirt 1.3.3.1 is now available. This is a maintenance release of
libvirt 1.3.3 with additional bugfixes that have accumulated
upstream since the initial release.
This release can be downloaded at:
http://libvirt.org/sources/stable_updates/libvirt-1.3.3.1.tar.gz
Changes in this version:
* spec: Use proper indentation
* libvirt.spec: remove duplicate files from -docs package
* network: Fix segfault on daemon reload
* send default USB controller in xml to destination during migration
* virsh: Fix support for 64 migration options
* qemu: Regenerate VNC socket paths
* qemu: conf: Set default logging approach in virQEMUDriverConfigNew
* qemu: Unref cfg in qemuDomainDefPostParse
* spec: If installing default network, restart libvirtd
* qemu: fix error log in qemuAssignPCIAddresses()
* virsh: host: Use bitmap size in bytes rather than bit count
* qemu: Fix off-by-one error in block I/O throttle messages
* conf: Drop restrictions on rng backend path
* vbox: VIR_WARN if we don't support the API version
* qemu: Limit maximum block device I/O tune values
* virconf: Handle conf file without ending newline
* network: fix DHCPv6 on networks with prefix != 64
* rpc: Don't leak fd via CreateXMLWithFiles
* libvirt: Fix crash on URI without scheme
* tests: fix xen-related tests
* man: Clarify virsh vol-clone works within a single pool
* network: Don't use ERR_NO_SUPPORT for invalid net-update requests
* Revert "daemon: use socket activation with systemd"
* Explicitly error on uri=qemu://system
* lxc: explicitly error on interface type=ethernet
* tests: Fix syntax in iSCSI auth/secret tests
* Libvirt: virTypedParamsValidate: Fix detection of multiple parameters
* Resolve a couple of memory leaks
* libxl: use LIBXL_API_VERSION 0x040200
* Add functions for handling exponential backoff loops.
* spec: Only pull in API docs with -devel package
* util: Add virGettextInitialize, convert the code
* man: virsh: Document lxc-enter-namespace --noseclabel
* storage: mpath: Don't error on target_type=NULL
* qemu: command: don't overwrite watchdog dump action
* rpc: daemon: Fix virtlog/virtlock daemon reload
* conf: also mark the implicit video as primary
* conf: move default video addition after XML parsing
* virtlogd: Fix a couple minor memory leaks
* qemu: Free priv->machineName
* configure: Fix check for --with-login-shell on Windows
* util: move ENODATA redefine to internal.h
* libxl: libxl_domain_create_restore has an extra argument
* qemu: perf: Fix crash/memory corruption on failed VM start
* qemu: alias: Fix calculation of memory device aliases
* Link libvirt_xenconfig instead of libvirt against libxl
* virt-admin: get rid of LIBVIRT_DEFAULT_ADMIN_URI env var
* libvirt-admin: do not crash on URI without a scheme
* virsh: read default connection uri from env later
* build: add GCC 6.0 -Wlogical-op workaround
* build: cleanup GCC < 4.6 -Wlogical-op workaround
* qemu: support virt-2.6 machine type on arm
For info about past maintenance releases, see:
http://wiki.libvirt.org/page/Maintenance_Releases
Thanks,
Cole
8 years, 6 months