[libvirt] [PATCH] virsh: Add --tls description for the virsh man page
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1448806
Commit id '6a8d898d' neglected to update the man page.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
tools/virsh.pod | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index cd1f25f..727acf6 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -1672,7 +1672,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<--persistent-xml> B<file>]
+[I<auto-converge-increment>] [I<--persistent-xml> B<file>] [I<--tls>]
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>
@@ -1753,6 +1753,11 @@ compression. I<--comp-mt-threads> and I<--comp-mt-dthreads> set the number
of compress threads on source and the number of decompress threads on target
respectively. I<--comp-xbzrle-cache> sets size of page cache in bytes.
+Providing I<--tls> causes the migration to use the host configured TLS setup
+(see migrate_tls_x509_cert_dir in /etc/libvirt/qemu.conf) in order to perform
+the migration of the domain. Usage requires proper TLS setup for both source
+and target.
+
Running migration can be canceled by interrupting virsh (usually using
C<Ctrl-C>) or by B<domjobabort> command sent from another virsh instance.
--
2.9.3
7 years, 6 months
[libvirt] [libvirt-php PATCH 0/2] implement a few network API bindings
by Dawid Zamirski
Hello,
The followinig two patches add a few useful API bindings for dealing
with libvirt networks:
* virConnectListAllNetworks - allows for better control when filtering
and returns array of handles to virNetworkPtr which can then be used
to get other info for each network such as name, uuid, autostart etc.
* virNetworkGetUUIDString, virNetworkGetUUID, virNetworkGetName to be
able to easily get said info when working with virNetworkPtr handles.
Dawid Zamirski (2):
implement binding for virConnectListAllNetworks.
implement additional network functions.
src/libvirt-php.c | 149 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/libvirt-php.h | 4 ++
2 files changed, 153 insertions(+)
--
2.12.2
7 years, 6 months
[libvirt] src/remote_protocol-structs file
by Vasiliy Tolstov
Hi. While i'm writing go binding for libvirt rpc api i'm parse
src/remote/remote_protocol.x and generate needed code for go, but as i
see libvirt have src/remote_protocol-structs file. That contains all
needed data in mo simple syntax. But i don't see such files for
qemu_protocol.x and lxc_protocol.x
do you plan to add files for this xdr files, or
src/remote_protocol-structs will be deprecated?
Thanks!
--
Vasiliy Tolstov,
e-mail: v.tolstov(a)selfip.ru
7 years, 6 months
[libvirt] [PATCH v2 0/5] Prevent losing IPv6 routes due to forwarding
by Cédric Bosdonnat
Hi Laine, all,
Here is the v2 of my series. The changes are:
* Add a commit to create a virNetDevGetName() function
* Fix Laine's comments
Cédric Bosdonnat (5):
util: extract the request sending code from virNetlinkCommand()
util: add virNetlinkDumpCommand()
bridge_driver.c: more uses of SYSCTL_PATH
util: add virNetDevGetName() function
network: check accept_ra before enabling ipv6 forwarding
src/libvirt_private.syms | 3 +
src/network/bridge_driver.c | 25 ++++---
src/util/virnetdev.c | 19 ++++++
src/util/virnetdev.h | 2 +
src/util/virnetdevip.c | 158 ++++++++++++++++++++++++++++++++++++++++++++
src/util/virnetdevip.h | 1 +
src/util/virnetlink.c | 145 ++++++++++++++++++++++++++++++----------
src/util/virnetlink.h | 9 +++
8 files changed, 319 insertions(+), 43 deletions(-)
--
2.11.0
7 years, 6 months
[libvirt] [PATCH v2] libxl: report numa sibling distances on host capabilities
by Wim Ten Have
From: Wim ten Have <wim.ten.have(a)oracle.com>
When running on a NUMA machine, populate the sibling node
and distance information using data supplied by Xen.
Wim ten Have (1):
libxl: report numa sibling distances on host capabilities
src/libxl/libxl_capabilities.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
--
2.9.3
7 years, 6 months
[libvirt] [PATCH] Add missing deps on virfilewrapper.h
by Daniel P. Berrange
The test programs depend on virfilewrapper.h as well as the
virfilewrapper.c. Adding the dep ensures that virfilewrapper.h
gets included in the dist tarball.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
Pushed as a build fix, since RPM build / distcheck is broken without this
tests/Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5c77b55..7673329 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -930,7 +930,7 @@ virconftest_SOURCES = \
virconftest_LDADD = $(LDADDS)
virhostcputest_SOURCES = \
- virhostcputest.c testutils.h testutils.c virfilewrapper.c
+ virhostcputest.c testutils.h testutils.c virfilewrapper.h virfilewrapper.c
virhostcputest_LDADD = $(LDADDS)
commandtest_SOURCES = \
@@ -1147,7 +1147,7 @@ virhostcpumock_la_LIBADD = $(MOCKLIBS_LIBS)
if WITH_LINUX
vircaps2xmltest_SOURCES = \
- vircaps2xmltest.c testutils.h testutils.c virfilewrapper.c
+ vircaps2xmltest.c testutils.h testutils.c virfilewrapper.h virfilewrapper.c
vircaps2xmltest_LDADD = $(LDADDS)
virnumamock_la_SOURCES = \
--
2.9.3
7 years, 6 months
[libvirt] [PATCH] nodedev_udev: Fix missing events when kernel report lots of udev events within a short time
by ZhiPeng Lu
From: "ning.bo" <ning.bo9(a)zte.com.cn>
When create Virtual Function for Inter XL710 use below commands:
for i in `seq 0 1`; do
echo 63 > /sys/devices/pci0000:00/0000:00:03.2/0000:07:00.$i/sriov_numvfs
done
for i in `seq 0 3`; do
echo 31 > /sys/devices/pci0000:80/0000:80:02.2/0000:82:00.$i/sriov_numvfs
done
The libvirtd will missing some udev events, the result of libvirt-python API
listDevices('pci') will not list all pci devices.
The reason is that the buffer of udev monitor default size cann't save all udev
events reported by kernel.
So we need change buffer size so that we can receive as much events as possible
whitin a short time.
Signed-off-by: ning.bo <ning.bo9(a)zte.com.cn>
---
src/node_device/node_device_udev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 6e706a1..d813206 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1564,6 +1564,7 @@ static int nodeStateInitialize(bool privileged,
}
udev_monitor_enable_receiving(priv->udev_monitor);
+ udev_monitor_set_receive_buffer_size(priv->udev_monitor, 128 * 1024 * 1024);
/* We register the monitor with the event callback so we are
* notified by udev of device changes before we enumerate existing
--
2.8.3
7 years, 6 months
[libvirt] [PATCH] Don't inline virStringTrimOptionalNewline
by Daniel P. Berrange
GCC complains that inlining virStringTrimOptionalNewline is not
likely on some platforms:
cc1: warnings being treated as errors
../../src/util/virfile.c: In function 'virFileReadValueBitmap':
../../src/util/virstring.h:292: error: inlining failed in call to 'virStringTrimOptionalNewline': call is unlikely and code size would grow [-Winline]
../../src/util/virfile.c:3987: error: called from here [-Winline]
Inlining this function is not going to be a measurable performance
benefit either, since the time required to execute it is going to
be dominated by running of strlen() over the string, not by the
function call overhead.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
Pushed as a broken build fix
src/libvirt_private.syms | 1 +
src/util/virstring.c | 14 ++++++++++++++
src/util/virstring.h | 8 +-------
3 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 4cca0ca..afb9100 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2630,6 +2630,7 @@ virStringSplitCount;
virStringStripControlChars;
virStringStripIPv6Brackets;
virStringToUpper;
+virStringTrimOptionalNewline;
virStrncpy;
virStrndup;
virStrToDouble;
diff --git a/src/util/virstring.c b/src/util/virstring.c
index 69abc26..335e773 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -1180,3 +1180,17 @@ virStringEncodeBase64(const uint8_t *buf, size_t buflen)
return ret;
}
+
+/**
+ * virStringTrimOptionalNewline:
+ * @str: the string to modify in-place
+ *
+ * Modify @str to remove a single '\n' character
+ * from its end, if one exists.
+ */
+void virStringTrimOptionalNewline(char *str)
+{
+ char *tmp = str + strlen(str) - 1;
+ if (*tmp == '\n')
+ *tmp = '\0';
+}
diff --git a/src/util/virstring.h b/src/util/virstring.h
index 603650a..c545ca3 100644
--- a/src/util/virstring.h
+++ b/src/util/virstring.h
@@ -288,12 +288,6 @@ bool virStringBufferIsPrintable(const uint8_t *buf, size_t buflen);
char *virStringEncodeBase64(const uint8_t *buf, size_t buflen);
-static inline void
-virStringTrimOptionalNewline(char *str)
-{
- char *tmp = str + strlen(str) - 1;
- if (*tmp == '\n')
- *tmp = '\0';
-}
+void virStringTrimOptionalNewline(char *str);
#endif /* __VIR_STRING_H__ */
--
2.9.3
7 years, 6 months
[libvirt] [RFC PATCH REBASE 00/10] introduce push backups
by Nikolay Shirokovskiy
Push backup is a backup when hypervisor itself copy backup data to destination
in contrast to pull backup when hypervisor exports backup data thru some
interface and mgmt itself make a copy.
This patch series basically adds creating backup to API/remote/qemu/virsh and
initial backup XML definition.
Just like other blockjobs backup creation is asynchronous. That is creation is
merely a backup start and client should track backup error/completion thru
blockjob events. As backup is done transactionally all individual disk backup
jobs will be aborted by qemu itself in case of error, client need not to do it
manually. Client can cancel the backup by aborting blockjob on any disk being
backed up.
Backup xml desription is similar to snapshot one with some exceptions and is
described in more details in definition patch [1].
I guess good client will track progress for every disk in backup to report
progress and detect hangs so it don't need extra backup complete/error event
that aggregate the overall backup result. However it looks like aborting backup
can be implemented in libvirt as code will be common for all clients. We need
to abort some of not yet completed per disk backups and retry if job to be
aborted is completed meanwhile.
Of coures this series is far from being complete. Incremental backups and
backup persistent metadata is to be implemented. Let's just start work in this
direction.
Nikolay Shirokovskiy (10):
api: backup: add api to create backup
api: backup: add driver based implementation
remote: backup: add create backup implementation
backup: qemu: monitor: add drive-backup command
backup: misc: add backup block job type
conf: backup: add backup xml definition [1]
qemu: backup: add qemuDomainBackupCreateXML implementation
qemu: backup: check backup destination before start
qemu: backup: prepare backup destination
virsh: backup: add backup-create command
Links:
In [1] we came to agreement to create distinct API to support backup operations
and there is a discussion of pull backup series in [2]. The latter is blocked
as some necessary operations are still experimental in qemu.
[1] https://www.redhat.com/archives/libvir-list/2016-March/msg00937.html
[2] https://www.redhat.com/archives/libvir-list/2016-September/msg00192.html
daemon/remote.c | 8 +
examples/object-events/event-test.c | 3 +
include/libvirt/libvirt-domain-backup.h | 59 +++++++
include/libvirt/libvirt-domain.h | 3 +
include/libvirt/libvirt.h | 1 +
include/libvirt/virterror.h | 2 +
po/POTFILES.in | 2 +
src/Makefile.am | 3 +
src/access/viraccessperm.c | 3 +-
src/access/viraccessperm.h | 6 +
src/conf/backup_conf.c | 299 ++++++++++++++++++++++++++++++++
src/conf/backup_conf.h | 70 ++++++++
src/conf/domain_conf.c | 2 +-
src/datatypes.c | 60 +++++++
src/datatypes.h | 29 ++++
src/driver-hypervisor.h | 5 +
src/libvirt-domain-backup.c | 202 +++++++++++++++++++++
src/libvirt_private.syms | 9 +
src/libvirt_public.syms | 10 ++
src/qemu/qemu_conf.h | 1 +
src/qemu/qemu_driver.c | 239 ++++++++++++++++++++++++-
src/qemu/qemu_monitor.c | 14 ++
src/qemu/qemu_monitor.h | 5 +
src/qemu/qemu_monitor_json.c | 36 ++++
src/qemu/qemu_monitor_json.h | 5 +
src/remote/remote_driver.c | 7 +
src/remote/remote_protocol.x | 23 ++-
src/rpc/gendispatch.pl | 29 +++-
src/util/virerror.c | 6 +
tools/Makefile.am | 1 +
tools/virsh-backup.c | 100 +++++++++++
tools/virsh-backup.h | 29 ++++
tools/virsh-domain.c | 3 +-
tools/virsh-util.c | 11 ++
tools/virsh-util.h | 3 +
tools/virsh.c | 2 +
tools/virsh.h | 1 +
37 files changed, 1279 insertions(+), 12 deletions(-)
create mode 100644 include/libvirt/libvirt-domain-backup.h
create mode 100644 src/conf/backup_conf.c
create mode 100644 src/conf/backup_conf.h
create mode 100644 src/libvirt-domain-backup.c
create mode 100644 tools/virsh-backup.c
create mode 100644 tools/virsh-backup.h
--
1.8.3.1
7 years, 6 months