[libvirt] [PATCH v5 0/7] New libssh transport
by Pino Toscano
Hi,
this series introduces a new libssh transport in libvirt, based on the
libssh C library. This library supports what libssh2 does, and more:
- easier API for known_hosts handling (there's a ticket upstream to
request extensions for it, but what is implemented now works well)
- potential GSSAPI authentication (not enabled yet because of a libssh
bug [1])
- easier API for ssh-agent support
The implementation for the new transport is based on the libssh2 one,
hence it shares origin and style.
[1] https://red.libssh.org/issues/242
Thanks,
Changes from v4 to v5:
- fixed EOF on unavailable libvirtd on remote
- fixed variable for an error message
Changes from v3 to v4:
- integrate most of the issues spotted by Peter Krempa
- add patch #3
- minor naming changes
Changes from v2 to v3:
- split into more commits
- integrate all the issues spotted by Daniel P. Berrange and
Peter Krempa
- restore the specified order of authentication methods (as in libssh2)
- add a related documentation fix
- minor coding fixes
Changes from v1 to v2:
- implemented keyboard interactive
- code polish, and fixes
Pino Toscano (7):
virNetSocket: allow to not close FD
virerror: add error for libssh transport
virnetsocket: improve search for default SSH key
libssh_transport: add new libssh-based transport
remote: expose a new libssh transport
spec: enable libssh transport on Fedora
docs: fix default value for sshauth option of libssh2/libssh
config-post.h | 2 +
configure.ac | 3 +
docs/remote.html.in | 39 +-
include/libvirt/virterror.h | 2 +
libvirt.spec.in | 10 +
m4/virt-libssh.m4 | 26 +
po/POTFILES.in | 1 +
src/Makefile.am | 21 +-
src/libvirt_libssh.syms | 21 +
src/remote/remote_driver.c | 41 ++
src/rpc/virnetclient.c | 167 ++++-
src/rpc/virnetclient.h | 13 +
src/rpc/virnetlibsshsession.c | 1492 +++++++++++++++++++++++++++++++++++++++++
src/rpc/virnetlibsshsession.h | 78 +++
src/rpc/virnetsocket.c | 184 ++++-
src/rpc/virnetsocket.h | 13 +
src/util/virerror.c | 9 +-
17 files changed, 2089 insertions(+), 33 deletions(-)
create mode 100644 m4/virt-libssh.m4
create mode 100644 src/libvirt_libssh.syms
create mode 100644 src/rpc/virnetlibsshsession.c
create mode 100644 src/rpc/virnetlibsshsession.h
--
2.7.4
8 years, 1 month
[libvirt] [PATCH 0/2] docs: Couple of improvements
by Michal Privoznik
CMSIA
(Commit Messages Say It All)
Michal Privoznik (2):
docs: Add apps.html link to index.html
docs: List go-libvirt in bindings
docs/bindings.html.in | 14 ++++++++++++--
docs/index.html.in | 1 +
2 files changed, 13 insertions(+), 2 deletions(-)
--
2.8.4
8 years, 1 month
[libvirt] [PATCH 0/2] qemu: agent: fix unsafe agent access
by Nikolay Shirokovskiy
The series is about second patch actually. First is just a small cleanup.
Nikolay Shirokovskiy (2):
qemu: drop write-only agentStart
qemu: agent: fix unsafe agent access
src/qemu/qemu_domain.c | 43 ++++----------
src/qemu/qemu_domain.h | 8 +--
src/qemu/qemu_driver.c | 153 ++++++++++++++++++++++++------------------------
src/qemu/qemu_process.c | 2 -
4 files changed, 91 insertions(+), 115 deletions(-)
--
1.8.3.1
8 years, 1 month
[libvirt] [PATCH v2 0/3] qemu: agent: cleanup agent error flag correctly
by Nikolay Shirokovskiy
Patches 1 and 2 are refactorings to help review patch 3.
diff from v1:
=============
1. error flag cleanup logic clarified
2. patches that touch io loop are dropped
Nikolay Shirokovskiy (3):
qemu: agent: handle agent connection errors in one place
qemu: agent: remove redundant check
qemu: agent: clenup agent error flag correctly
src/qemu/qemu_driver.c | 12 +++-------
src/qemu/qemu_migration.c | 13 ++--------
src/qemu/qemu_process.c | 61 +++++++++++++----------------------------------
3 files changed, 22 insertions(+), 64 deletions(-)
--
1.8.3.1
8 years, 1 month
[libvirt] [PATCH] libvirtd: systemd: add special target for system shutdown
by Nikolay Shirokovskiy
AFAIU we don't need special actions on rpm update to switch to using
virt-guest-shutdown.target. Domains started before update will
stay depend upon libvirt-guests.service, newly started domains
will depend upon virt-guest-shutdown.target. On reboot/shutdown
systemd will order stopping both old and new domains after
libvirt-guests.service.
Nikolay Shirokovskiy (1):
libvirtd: systemd: add special target for system shutdown
daemon/Makefile.am | 4 ++++
daemon/virt-guest-shutdown.target | 3 +++
libvirt.spec.in | 1 +
src/util/virsystemd.c | 4 ++--
tools/libvirt-guests.service.in | 2 ++
5 files changed, 12 insertions(+), 2 deletions(-)
create mode 100644 daemon/virt-guest-shutdown.target
--
1.8.3.1
8 years, 1 month
[libvirt] [PATCH] virsh: Document --rdma-pin-all migrate option in man page
by Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1368351
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
tools/virsh.pod | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 74d531122..894863848 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -1618,7 +1618,7 @@ to the I<uri> namespace is displayed instead of being modified.
=item B<migrate> [I<--live>] [I<--offline>] [I<--direct>] [I<--p2p> [I<--tunnelled>]]
[I<--persistent>] [I<--undefinesource>] [I<--suspend>] [I<--copy-storage-all>]
[I<--copy-storage-inc>] [I<--change-protection>] [I<--unsafe>] [I<--verbose>]
-[I<--abort-on-error>] [I<--postcopy>] [I<--postcopy-after-precopy>]
+[I<--rdma-pin-all>] [I<--abort-on-error>] [I<--postcopy>] [I<--postcopy-after-precopy>]
I<domain> I<desturi> [I<migrateuri>] [I<graphicsuri>] [I<listen-address>] [I<dname>]
[I<--timeout> B<seconds> [I<--timeout-suspend> | I<--timeout-postcopy>]]
[I<--xml> B<file>] [I<--migrate-disks> B<disk-list>] [I<--disks-port> B<port>]
@@ -1662,6 +1662,10 @@ guest CPU throttling rate can be set with I<auto-converge-initial>. If the
initial throttling rate is not enough to ensure convergence, the rate is
periodically increased by I<auto-converge-increment>.
+I<--rdma-pin-all> can be used with RDMA migration (i.e., when I<migrateuri>
+starts with rdma://) to tell the hypervisor to pin all domain's memory at once
+before migration starts rather then letting it pin memory pages as needed.
+
B<Note>: Individual hypervisors usually do not support all possible types of
migration. For example, QEMU does not support direct migration.
--
2.11.0.rc2
8 years, 1 month
[libvirt] [PATCH] virsh: Add support for VIR_MIGRATE_PARAM_PERSIST_XML
by Jiri Denemark
Commit v1.3.3-181-gb028e9d7c implmented support for
VIR_MIGRATE_PARAM_PERSIST_XML migration parameter, but forgot to update
virsh.
https://bugzilla.redhat.com/show_bug.cgi?id=835300
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
docs/news.html.in | 2 ++
tools/virsh-domain.c | 23 +++++++++++++++++++++++
tools/virsh.pod | 5 ++++-
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/docs/news.html.in b/docs/news.html.in
index 56c03b35c..a6f86e518 100644
--- a/docs/news.html.in
+++ b/docs/news.html.in
@@ -26,6 +26,8 @@
</li>
<li><strong>Improvements</strong>
<ul>
+ <li>virsh: Add support for passing an alternative persistent XML
+ to migrate command</li>
<li>vhostuser: Allow hotplug of multiqueue devices
</li>
<li>NEWS: Switch to an improved format<br/>
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index a133c81ac..dedddeb96 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10105,6 +10105,10 @@ static const vshCmdOptDef opts_migrate[] = {
.type = VSH_OT_INT,
.help = N_("CPU throttling rate increment for auto-convergence")
},
+ {.name = "persistent-xml",
+ .type = VSH_OT_STRING,
+ .help = N_("filename containing updated persistent XML for the target")
+ },
{.name = NULL}
};
@@ -10265,6 +10269,24 @@ doMigrate(void *opaque)
VIR_FREE(xml);
}
+ if (vshCommandOptStringReq(ctl, cmd, "persistent-xml", &opt) < 0)
+ goto out;
+ if (opt) {
+ char *xml;
+
+ if (virFileReadAll(opt, VSH_MAX_XML_FILE, &xml) < 0) {
+ vshError(ctl, _("cannot read file '%s'"), opt);
+ goto save_error;
+ }
+
+ if (virTypedParamsAddString(¶ms, &nparams, &maxparams,
+ VIR_MIGRATE_PARAM_PERSIST_XML, xml) < 0) {
+ VIR_FREE(xml);
+ goto save_error;
+ }
+ VIR_FREE(xml);
+ }
+
if ((rv = vshCommandOptInt(ctl, cmd, "auto-converge-initial", &intOpt)) < 0) {
goto out;
} else if (rv > 0) {
@@ -10421,6 +10443,7 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
VSH_EXCLUSIVE_OPTIONS("live", "offline");
VSH_EXCLUSIVE_OPTIONS("timeout-suspend", "timeout-postcopy");
VSH_REQUIRE_OPTION("postcopy-after-precopy", "postcopy");
+ VSH_REQUIRE_OPTION("persistent-xml", "persistent");
if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
return false;
diff --git a/tools/virsh.pod b/tools/virsh.pod
index f278fecaf..74d531122 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -1625,7 +1625,7 @@ I<domain> I<desturi> [I<migrateuri>] [I<graphicsuri>] [I<listen-address>] [I<dna
[I<--compressed>] [I<--comp-methods> B<method-list>]
[I<--comp-mt-level>] [I<--comp-mt-threads>] [I<--comp-mt-dthreads>]
[I<--comp-xbzrle-cache>] [I<--auto-converge>] [I<auto-converge-initial>]
-[I<auto-converge-increment>]
+[I<auto-converge-increment>] [I<--persistent-xml> B<file>]
Migrate domain to another host. Add I<--live> for live migration; <--p2p>
for peer-2-peer migration; I<--direct> for direct migration; or I<--tunnelled>
@@ -1679,6 +1679,9 @@ omitted, but can be used to supply an alternative XML file for use on
the destination to supply a larger set of changes to any host-specific
portions of the domain XML, such as accounting for naming differences
between source and destination in accessing underlying storage.
+If I<--persistent> is enabled, I<--persistent-xml> B<file> can be used to
+supply an alternative XML file which will be used as the persistent domain
+definition on the destination host.
I<--timeout> B<seconds> tells virsh to run a specified action when live
migration exceeds that many seconds. It can only be used with I<--live>.
--
2.11.0.rc2
8 years, 1 month
[libvirt] [PATCH 0/8] admin: Introduce runtime logging APIs
by Erik Skultety
Because all the necessary refactors to the logging code have been merged for
some time already, now it's time to finally enable the logging APIs.
Since there's been an effort to deprecate the concept of the log_level
setting in the config (as per discussion [1]), I dropped patches introducing
APIs handling the logging level, even though I still think that for an average
user it's easier to just turn on debug logs by setting log_level to 1 compared
to the alternative way using filters only - kind of like this:
"1:conf 1:cpu 1:network 1:secret 1:security 1:storage 1:qemu 1:util" etc. to
override the default global logging level 3.
Since we treat an unset log_output variable the same way as an explicit empty
string in the config - we use a default logging output - it is necessary to
store the default logging output we can fallback to later once a user tries to
set the logging outputs to an empty string, assuming that it would turn the
logging off (which kind of would be the intuitive approach) which it can't,
since the only way to do it is to use X:file:/dev/null.
The decision for the default logging output is supposed to be made at
the daemon's start only and we should really only use getters throughout our
code to retrieve the default output, not try to set it (because the variable is
not protected by a mutex by design for the reason above).
[1] https://www.redhat.com/archives/libvir-list/2016-March/msg01575.html
Erik Skultety (8):
daemon: Introduce daemonSetLoggingDefaults
virlog: Introduce virLog{Get,Set}DefaultOutput
daemon: Hook up the virLog{Get,Set}DefaultOutput to the daemon's init
routine
admin: Introduce virAdmConnectGetLoggingOutputs
admin: Introduce virAdmConnectGetLoggingFilters
admin: Introduce virAdmConnectSetLoggingOutputs
admin: Introduce virAdmConnectSetLoggingFilters
virt-admin: Wire-up the logging APIs
daemon/admin.c | 115 ++++++++++++++++++++++++++++++
daemon/libvirtd.c | 93 ++++++++-----------------
include/libvirt/libvirt-admin.h | 16 +++++
src/admin/admin_protocol.x | 50 ++++++++++++-
src/admin/admin_remote.c | 86 +++++++++++++++++++++++
src/admin_protocol-structs | 26 +++++++
src/libvirt-admin.c | 151 ++++++++++++++++++++++++++++++++++++++++
src/libvirt_admin_private.syms | 6 ++
src/libvirt_admin_public.syms | 4 ++
src/libvirt_private.syms | 2 +
src/util/virlog.c | 99 +++++++++++++++++++++++++-
src/util/virlog.h | 2 +
tools/virt-admin.c | 141 +++++++++++++++++++++++++++++++++++++
13 files changed, 725 insertions(+), 66 deletions(-)
--
2.5.5
8 years, 1 month
[libvirt] [PATCH 0/2] Forbid new-line char in name of domains and storagepools
by Sławek Kapłoński
As https://bugzilla.redhat.com/show_bug.cgi?id=818064 is closed and new-line
char is now forbiden in name of network, this patch forbids it also in names of
domains and storage pools.
Sławek Kapłoński (2):
Forbid new-line char in name of new domain
Forbid new-line char in name of new storagepool
src/bhyve/bhyve_driver.c | 3 +++
src/esx/esx_driver.c | 3 +++
src/libxl/libxl_driver.c | 3 +++
src/lxc/lxc_driver.c | 3 +++
src/openvz/openvz_driver.c | 3 +++
src/qemu/qemu_driver.c | 3 +++
src/storage/storage_driver.c | 3 +++
src/test/test_driver.c | 3 +++
src/uml/uml_driver.c | 3 +++
src/vmware/vmware_driver.c | 3 +++
src/vz/vz_driver.c | 3 +++
src/xen/xen_driver.c | 3 +++
src/xenapi/xenapi_driver.c | 3 +++
13 files changed, 39 insertions(+)
--
2.7.4
8 years, 1 month
[libvirt] [PATCH 0/3] Fix improper union member access on hostdevs and refactoring
by Marc Hartmayer
This patch series fixes improper union member accesses on
hostdevs. Additionally, it adds a util function which checks whether a
hostdev is a SCSI device or not. This function is used to simplify and
clarify the code.
Marc Hartmayer (3):
qemu: Fix improper union member access on hostdevs
util: Add virHostdevIsSCSIDevice()
Refactoring: Use virHostdevIsSCSIDevice()
src/Makefile.am | 3 ++-
src/conf/domain_conf.c | 8 +++-----
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 3 +--
src/qemu/qemu_conf.c | 7 +++----
src/qemu/qemu_domain.c | 14 +++++---------
src/qemu/qemu_process.c | 3 +++
src/util/virhostdev.c | 23 +++++++++++++++++------
src/util/virhostdev.h | 3 +++
9 files changed, 38 insertions(+), 27 deletions(-)
--
2.5.5
8 years, 1 month