[libvirt] CLI management tool
by Michal Privoznik
Dear list,
you might have seen a discussion about virsh, and adding some new
features to it [1]. While the feature was rejected, it got me thinking.
What options do we offer for sysadmins that:
a) want to stay in command line
b) want higher level mgmt of their domains
c) yet want to manage a single host
Basically, virsh is just too low level for some operations (and using it
in non-interactive mode from a script can mean hundreds of connections).
Then we have virt-manager, which suits b) and c), but it's not a CLI
tool. Therefore I was thinking whether we should start a new project on
the top of libvirt that would fit all three points.
Personally, I've never been a sysadmin, so perhaps I am not the best one
to write the tool. But I'm open for suggestions.
What do you think?
Michal
1: https://www.redhat.com/archives/libvir-list/2017-May/msg00051.html
7 years, 11 months
[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, 11 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, 11 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, 11 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, 11 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, 11 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, 11 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, 11 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, 11 months