[libvirt] [PATCHv5 0/7] Gluster snapshot series
by Peter Krempa
New version after the recent feedback and fixing a few bugs found while testing.
Please see individual patches for changes.
Peter Krempa (7):
storage: Add APIs for internal handling of files via the storage
driver
storage: Implement file storage APIs in the default storage driver
storage: add file functions for local and block files
storage: Add storage file backends for gluster
qemu: Switch snapshot deletion to the new API functions
qemu: snapshot: Use new APIs to detect presence of existing storage
files
qemu: snapshot: Add support for external active snapshots on gluster
docs/formatsnapshot.html.in | 5 +-
docs/hvsupport.pl | 4 +-
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/check-aclrules.pl | 1 +
src/check-drivername.pl | 1 +
src/driver.h | 30 ++++-
src/libvirt_private.c | 180 ++++++++++++++++++++++++++++++
src/libvirt_private.h | 61 ++++++++++
src/libvirt_private.syms | 9 ++
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_command.h | 9 ++
src/qemu/qemu_driver.c | 204 ++++++++++++++++++++++++++--------
src/storage/storage_backend.c | 42 +++++++
src/storage/storage_backend.h | 43 +++++++
src/storage/storage_backend_fs.c | 48 ++++++++
src/storage/storage_backend_fs.h | 2 +
src/storage/storage_backend_gluster.c | 143 ++++++++++++++++++++++++
src/storage/storage_backend_gluster.h | 1 +
src/storage/storage_driver.c | 95 ++++++++++++++++
20 files changed, 829 insertions(+), 53 deletions(-)
create mode 100644 src/libvirt_private.c
create mode 100644 src/libvirt_private.h
--
1.8.5.3
10 years, 9 months
[libvirt] [PATCH] qemu driver: sync guest time via qemu-guest-agent when domain is resumed
by Marcelo Tosatti
Since QEMU commit "kvmclock: clock should count only if vm is running"
(http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg01225.html),
guests have their realtime clock stopped during pause.
To correct the situation, invoke guest agent to sync time from
host time.
Signed-off-by: Marcelo Tosatti <mtosatti(a)redhat.com>
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 8bcd98e..df01244 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -2695,6 +2695,40 @@ qemuProcessPrepareMonitorChr(virQEMUDriverConfigPtr cfg,
}
+
+#include <sys/time.h>
+
+static void
+qemuAgentSyncGuestTime(virDomainObjPtr vm)
+{
+ int ret;
+ struct timeval tv;
+ char *result;
+ qemuDomainObjPrivatePtr priv;
+ char buf[500];
+
+ priv = vm->privateData;
+
+ ret = gettimeofday(&tv, NULL);
+ if (ret) {
+ virReportSystemError(errno, "%s", _("gettimeofday failure"));
+ return;
+ }
+
+ memset(buf, 0, sizeof(buf));
+
+ sprintf(buf, "{ \"execute\": \"guest-set-time\","
+ "\"arguments\":{\"time\":%lld}}\" ",
+ tv.tv_usec * 1000 + (tv.tv_sec * 1000000000LL));
+
+ qemuDomainObjEnterAgent(vm);
+ ret = qemuAgentArbitraryCommand(priv->agent, buf, &result,
+ VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT);
+ qemuDomainObjExitAgent(vm);
+ if (ret < 0)
+ VIR_FREE(result);
+}
+
/*
* Precondition: vm must be locked, and a job must be active.
* This method will call {Enter,Exit}Monitor
@@ -2727,6 +2761,7 @@ qemuProcessStartCPUs(virQEMUDriverPtr driver, virDomainObjPtr vm,
if (ret == 0) {
virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, reason);
+ qemuAgentSyncGuestTime(vm);
} else {
if (virDomainLockProcessPause(driver->lockManager, vm, &priv->lockState) < 0)
VIR_WARN("Unable to release lease on %s", vm->def->name);
10 years, 9 months
[libvirt] [PATCH] spec: add missing dep of libvirt-daemon-config-nwfilter
by Eric Blake
Similar to cf76c4b, if modules are used, then nwfilter configuration
requires the nwfilter driver module.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
libvirt.spec.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 2d57c71..2b44c21 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -737,6 +737,9 @@ Summary: Network filter configuration files for the libvirtd daemon
Group: Development/Libraries
Requires: libvirt-daemon = %{version}-%{release}
+ %if %{with_driver_modules}
+Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
+ %endif
%description daemon-config-nwfilter
Network filter configuration files for cleaning guest traffic
--
1.8.5.3
10 years, 9 months
[libvirt] [PATCH] spec: require libvirt-wireshark from libvirt metapackage
by Eric Blake
In general, the 'libvirt' metapackage should pull in all subpackages.
Fix this for the wireshark subpackage created in commit f9ada9f.
* libvirt.spec.in (Requires): Add dependency.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
libvirt.spec.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index d3e6048..2d57c71 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -428,6 +428,9 @@ Requires: libvirt-daemon-driver-storage = %{version}-%{release}
Requires: libvirt-daemon-driver-network = %{version}-%{release}
Requires: libvirt-daemon-driver-nodedev = %{version}-%{release}
%endif
+ %if %{with_wireshark}
+Requires: libvirt-wireshark = %{version}-%{release}
+ %endif
%endif
Requires: libvirt-client = %{version}-%{release}
--
1.8.5.3
10 years, 9 months
[libvirt] [PATCH] rpm: create libvirt-wireshark sub-package
by Eric Blake
On Fedora 20, with wireshark-devel installed, 'make rpm' failed
due to installed but unpackaged files related to wireshark. As
F20 is already released without wireshark, I chose to add a new
sub-package that is enabled only for F21 and later. Furthermore,
all existing wireshark plugins belong to the wireshark package,
so I got to invent behavior of how the first third-part wireshark
module will behave.
* libvirt.spec.in (with_wireshark): Add new conditional.
* configure.ac (ws-plugindir): Improve wording.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
I was tempted to push this as a build-breaker fix for 'make rpm',
but rpms are close enough to black magic that I decided a review
is safer, after all. Tested with both F20 (not built) and F21
(new subpackage built just fine), using normal build of all
subpackages and also a build with '%client_only 1' in ~/.rpmmacros
to ensure that it indeed works in a client-only setup.
configure.ac | 4 ++--
libvirt.spec.in | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 884e0e4..23e2201 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2578,8 +2578,8 @@ AM_CONDITIONAL([WITH_WIRESHARK_DISSECTOR], [test "$with_wireshark_dissector" = "
AC_ARG_WITH([ws-plugindir],
[AS_HELP_STRING([--with-ws-plugindir],
- [wireshark plugins directory that plugin will installed])],
- [ ws_plugindir=$withval ])
+ [wireshark plugins directory for use when installing wireshark plugin])],
+ [ws_plugindir=$withval])
if test "$with_wireshark_dissector" != "no" && test -z "$ws_plugindir"; then
ws_version=`$WIRESHARK -v | head -1 | cut -f 2 -d' '`
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 5229ece..e006f2b 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -129,6 +129,7 @@
%define with_numad 0%{!?_without_numad:0}
%define with_firewalld 0%{!?_without_firewalld:0}
%define with_libssh2 0%{!?_without_libssh2:0}
+%define with_wireshark 0%{!?_without_wireshark:0}
# Non-server/HV driver defaults which are always enabled
%define with_sasl 0%{!?_without_sasl:1}
@@ -269,6 +270,11 @@
%define with_libssh2 0%{!?_without_libssh2:1}
%endif
+# Enable wireshark plugins for all distros shipping libvirt 1.2.2 or newer
+%if 0%{?fedora} >= 21
+ %define with_wireshark 0%{!?_without_wireshark:1}
+%endif
+
# Disable some drivers when building without libvirt daemon.
# The logic is the same as in configure.ac
%if ! %{with_libvirtd}
@@ -631,6 +637,10 @@ BuildRequires: scrub
BuildRequires: numad
%endif
+%if %{with_wireshark}
+BuildRequires: wireshark-devel
+%endif
+
Provides: bundled(gnulib)
%description
@@ -1115,6 +1125,17 @@ Requires: cyrus-sasl-md5
Shared libraries and client binaries needed to access to the
virtualization capabilities of recent versions of Linux (and other OSes).
+%if %{with_wireshark}
+%package wireshark
+Summary: Wireshark dissector plugin for libvirt RPC transactions
+Group: Development/Libraries
+Requires: wireshark
+Requires: %{name}-client = %{version}-%{release}
+
+%description wireshark
+Wireshark dissector plugin for better analysis of libvirt RPC traffic.
+%endif
+
%if %{with_lxc}
%package login-shell
Summary: Login shell for connecting users to an LXC container
@@ -1340,6 +1361,10 @@ driver
%define _with_firewalld --with-firewalld
%endif
+%if ! %{with_wireshark}
+ %define _without_wireshark --without-wireshark-dissector
+%endif
+
%define when %(date +"%%F-%%T")
%define where %(hostname)
%define who %{?packager}%{!?packager:Unknown}
@@ -1412,6 +1437,7 @@ driver
%{?_without_dtrace} \
%{?_without_driver_modules} \
%{?_with_firewalld} \
+ %{?_without_wireshark} \
%{with_packager} \
%{with_packager_version} \
--with-qemu-user=%{qemu_user} \
@@ -1442,6 +1468,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/lock-driver/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt/connection-driver/*.a
%endif
+%if %{with_wireshark}
+rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/*/libvirt.la
+%endif
%if %{with_network}
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/
@@ -2117,6 +2146,11 @@ exit 0
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
%endif
+%if %{with_wireshark}
+%files wireshark
+%{_libdir}/wireshark/plugins/*/libvirt.so
+%endif
+
%if %{with_lxc}
%files login-shell
%attr(4750, root, virtlogin) %{_bindir}/virt-login-shell
--
1.8.5.3
10 years, 9 months
[libvirt] [PATCH] lxc from native: removed now remaining useless line
by Cédric Bosdonnat
---
src/lxc/lxc_native.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c
index ee07635..2cf479d 100644
--- a/src/lxc/lxc_native.c
+++ b/src/lxc/lxc_native.c
@@ -900,7 +900,6 @@ lxcParseConfigString(const char *config)
}
/* Loop over lxc.mount.entry to add filesystem devices for them */
- value = virConfGetValue(properties, "lxc.mount.entry");
if (virConfWalk(properties, lxcFstabWalkCallback, vmdef) < 0)
goto error;
--
1.8.5.2
10 years, 9 months
[libvirt] [PATCH] Fix stream related spelling mistakes
by Philipp Hahn
Consistent spelling of all-uppercase I/O.
Signed-off-by: Philipp Hahn <hahn(a)univention.de>
---
libvirt-override-virStream.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libvirt-override-virStream.py b/libvirt-override-virStream.py
index 53000da..e9dd09a 100644
--- a/libvirt-override-virStream.py
+++ b/libvirt-override-virStream.py
@@ -28,7 +28,7 @@
def recvAll(self, handler, opaque):
"""Receive the entire data stream, sending the data to the
requested data sink. This is simply a convenient alternative
- to virStreamRecv, for apps that do blocking-I/o.
+ to virStreamRecv, for apps that do blocking-I/O.
A hypothetical handler function looks like:
@@ -61,7 +61,7 @@
"""
Send the entire data stream, reading the data from the
requested data source. This is simply a convenient alternative
- to virStreamSend, for apps that do blocking-I/o.
+ to virStreamSend, for apps that do blocking-I/O.
A hypothetical handler function looks like:
--
1.8.5.3
10 years, 9 months
[libvirt] [PATCH] Fix stream related spelling mistakes
by Philipp Hahn
Remove double "is".
Consistent spelling of all-uppercase I/O.
Signed-off-by: Philipp Hahn <hahn(a)univention.de>
---
src/libvirt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libvirt.c b/src/libvirt.c
index 9cc5b1c..666ab1e 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -15890,7 +15890,7 @@ error:
*
* Send the entire data stream, reading the data from the
* requested data source. This is simply a convenient alternative
- * to virStreamSend, for apps that do blocking-I/o.
+ * to virStreamSend, for apps that do blocking-I/O.
*
* An example using this with a hypothetical file upload
* API looks like
@@ -15983,7 +15983,7 @@ cleanup:
*
* Receive the entire data stream, sending the data to the
* requested data sink. This is simply a convenient alternative
- * to virStreamRecv, for apps that do blocking-I/o.
+ * to virStreamRecv, for apps that do blocking-I/O.
*
* An example using this with a hypothetical file download
* API looks like
@@ -16192,7 +16192,7 @@ error:
* virStreamFinish:
* @stream: pointer to the stream object
*
- * Indicate that there is no further data is to be transmitted
+ * Indicate that there is no further data to be transmitted
* on the stream. For output streams this should be called once
* all data has been written. For input streams this should be
* called once virStreamRecv returns end-of-file.
--
1.8.5.3
10 years, 9 months
[libvirt] [Question] Is it a bug about cpu model Westmere?
by Wangyufei (James)
Hello,
I find that the cpu model Westmere defined in recently qemu has the cupid CPUID_EXT_PCLMULQDQ,
but the cpu model Westmere defined in libvirt doesn't have it, SandyBridge defined in libvirt has it. In my opinion,
the same cpu model defined in qemu and libvirt should have the same cpuids, or there'll be some problem happened.
First, am I right? Second, if I'm right, whose bug it is? Libvirt or qemu?
Thanks for your attention.
Best Regards,
-WangYufei
10 years, 9 months
[libvirt] [PATCH] bandwidth: Adjust documentation
by John Ferlan
Recent autotest/virt-test testing on f20 discovered an anomaly in how
the bandwidth options are documented and used. This was discovered due
to a bug fix in the /sbin/tc utility found in iproute-3.11.0.1 (on f20)
in which overflow was actually caught and returned as an error. The fix
was first introduced in iproute-3.10 (search on iproute2 commit 'a303853e').
The autotest/virt-test test for virsh domiftune was attempting to send
the largest unsigned integer value (4294967295) for maximum value
testing. The libvirt xml implementation was designed to manage values
in kibibytes (eg, 1024 blocks of bytes), thus when this value was
passed to /sbin/tc, it (now) properly rejected the 4294967295kbps value.
Investigation of the problem discovered that formatdomain.html.in and
formatnetwork.html.in described the elements and property types slightly
differently, although they use the same code - virNetDevBandwidthParseRate()
(shared by portgroups, domains, and networks xml parsers). Rather than
have the descriptions in two places, this patch will combine and reword
the description under formatnetwork.html.in and have formatdomain.html.in
link to that description.
This documentation faux pas was continued into the virsh man page where
the bandwidth description for both 'attach-interface' and 'domiftune'
did not indicate the scope of each value, thus leading to the test using
largest unsigned integer value, which ultimately will be wrong.
Additionally, modified the virnetdevbandwidth.h to use kibibytes instead
of kbytes (to be more clear).
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
docs/formatdomain.html.in | 35 +++----------------
docs/formatnetwork.html.in | 81 ++++++++++++++++++++++++++++++++-----------
src/util/virnetdevbandwidth.h | 8 ++---
tools/virsh.pod | 10 ++++--
4 files changed, 77 insertions(+), 57 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 4660983..ea1a97b 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -3750,37 +3750,10 @@ qemu-kvm -net nic,model=? /dev/null
<p>
This part of interface XML provides setting quality of service. Incoming
- and outgoing traffic can be shaped independently. The
- <code>bandwidth</code> element can have at most one <code>inbound</code>
- and at most one <code>outbound</code> child elements. Leaving any of these
- children element out result in no QoS applied on that traffic direction.
- So, when you want to shape only domain's incoming traffic, use
- <code>inbound</code> only, and vice versa. Each of these elements have one
- mandatory attribute <code>average</code> (or <code>floor</code> as
- described below). <code>average</code> specifies average bit rate on
- the interface being shaped. Then there are two optional attributes:
- <code>peak</code>, which specifies maximum rate at which interface can send
- data, and <code>burst</code>, amount of bytes that can be burst at
- <code>peak</code> speed. Accepted values for attributes are integer
- numbers. The units for <code>average</code> and <code>peak</code> attributes
- are kilobytes per second, and for the <code>burst</code> just kilobytes.
- Note the limitation of implementation: the <code>peak</code> attribute in
- <code>outbound</code> element is ignored (as linux ingress filters don't
- know it yet). <span class="since">Since 0.9.4</span> The <code>inbound</code> can
- optionally have <code>floor</code> attribute. This is there for
- guaranteeing minimal throughput for shaped interfaces. This, however,
- requires that all traffic goes through one point where QoS decisions can
- take place. That's why this attribute works only for virtual networks for
- now (that is <code><interface type='network'/></code> with a
- forward type of route, nat, or no forward at all). Moreover, the
- virtual network the interface is connected to is required to have at least
- inbound QoS set (<code>average</code> at least). Moreover, with
- <code>floor</code> attribute users don't need to specify
- <code>average</code>. However, <code>peak</code> and <code>burst</code>
- attributes still require <code>average</code>. Currently, linux kernel
- doesn't allow ingress qdiscs to have any classes therefore
- <code>floor</code> can be applied only on <code>inbound</code> and not
- <code>outbound</code>. <span class="since">Since 1.0.1</span>
+ and outgoing traffic can be shaped independently.
+ The <code>bandwidth</code> element and its child elements are described
+ in the <a href="formatnetwork.html#elementQoS">QoS</a> section of
+ the Network XML.
</p>
<h5><a name="elementVlanTag">Setting VLAN tag (on supported network types only)</a></h5>
diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in
index 1ca1bec..de71ebf 100644
--- a/docs/formatnetwork.html.in
+++ b/docs/formatnetwork.html.in
@@ -412,40 +412,81 @@
<p>
The <code><bandwidth></code> element allows setting
- quality of service for a particular network.
- <span class="since">Since 0.9.4</span> The limits specified
+ quality of service for a particular network
+ (<span class="since">since 0.9.4</span>). For a <code>domain</code>
+ object, the limits specified are applied to the domain traffic.
+ For a <code>network</code> object, the limits specified
are applied to the aggregate of all traffic to/from all guest
interfaces attached to that network, <b>not</b> to each guest
- interface individually. Setting <code>bandwidth</code> for a
+ interface individually. Setting <code>bandwidth</code> for a
network is supported only for networks with
a <code><forward></code> mode
of <code>route</code>, <code>nat</code>, or no mode at all
- (i.e. an "isolated" network). <code>bandwidth</code> setting
+ (i.e. an "isolated" network). Setting <code>bandwidth</code>
is <b>not</b> supported for forward modes
of <code>bridge</code>, <code>passthrough</code>, <code>private</code>,
or <code>hostdev</code>, and attempts to do this will lead to
- a failure to define the network (or to create a transient
- network).
+ a failure to define the network (or to create a transient network).
</p>
<p>
Incoming and outgoing traffic can be shaped independently. The
- <code>bandwidth</code> element can have at most
- one <code>inbound</code> and at most one <code>outbound</code>
+ <code>bandwidth</code> element can have at most one
+ <code>inbound</code> and at most one <code>outbound</code>
child element. Leaving either of these children elements out
results in no QoS applied for that traffic direction. So,
- when you want to shape only a network's incoming traffic, use
+ when you want to shape only incoming traffic, use
<code>inbound</code> only, and vice versa. Each of these
- elements have one mandatory attribute - <code>average</code>,
- which specifies the desired average bit rate for the interface
- being shaped (in kibibytes/second). There are also two
- optional attributes: <code>peak</code>, which specifies the
- maximum rate at which the bridge can send data (again in
- kibibytes/second), and <code>burst</code> - the amount of
- bytes that can be transmitted in a single burst at
- <code>peak</code> speed (in kibibytes). Accepted values for
- attributes are integer numbers. The allotted bandwidth is
- shared equally between domains connected to the network.
+ elements have one mandatory attribute - <code>average</code> (or
+ <code>floor</code> as described below). The attributes are as follows,
+ where accepted values for each attribute is an integer number.
</p>
+ <dl>
+ <dt><code>average</code></dt>
+ <dd>
+ Specifies the desired average bit rate for the interface
+ being shaped (in kibibytes/second).
+ </dd>
+ <dt><code>peak</code></dt>
+ <dd>
+ Optional attribute which specifies the maximum rate at
+ which the bridge can send data (in kibibytes/second).
+ Note the limitation of implementation: this attribute in the
+ <code>outbound</code> element is ignored (as Linux ingress
+ filters don't know it yet).
+ </dd>
+ <dt><code>burst</code></dt>
+ <dd>
+ Optional attribute which specifies the amount of kibibytes that
+ can be transmitted in a single burst at <code>peak</code> speed.
+ </dd>
+ <dt><code>floor</code></dt>
+ <dd>
+ Optional attribute available only for the <code>inbound</code>
+ element. This attribute guarantees minimal throughput for
+ shaped interfaces. This, however, requires that all traffic
+ goes through one point where QoS decisions can take place, hence
+ why this attribute works only for virtual networks for now
+ (that is <code><interface type='network'/></code> with a
+ forward type of route, nat, or no forward at all). Moreover, the
+ virtual network the interface is connected to is required to have
+ at least inbound QoS set (<code>average</code> at least). If
+ using the <code>floor</code> attribute users don't need to specify
+ <code>average</code>. However, <code>peak</code> and
+ <code>burst</code> attributes still require <code>average</code>.
+ Currently, the Linux kernel doesn't allow ingress qdiscs to have
+ any classes therefore <code>floor</code> can be applied only
+ on <code>inbound</code> and not <code>outbound</code>.
+ </dd>
+ </dl>
+
+ <p>
+ Note that a kibibyte is a block of 1024 bytes. Attributes
+ <code>average</code>, <code>peak</code>, and <code>burst</code>
+ are available <span class="since">since 0.9.4</span>, while
+ the <code>floor</code> attribute is only available
+ <span class="since">since 1.0.1</span>.
+ </p>
+
<p>
A <code><portgroup></code> element can also include
a <code><bandwidth></code> element. In that case, the
@@ -561,7 +602,7 @@
network), and each portgroup has a name, as well as various
subelements associated with it. The currently supported
subelements are <code><bandwidth></code>
- (documented <a href="formatdomain.html#elementQoS">here</a>)
+ (described <a href="formatnetwork.html#elementQoS">here</a>)
and <code><virtualport></code>
(documented <a href="formatdomain.html#elementsNICSDirect">here</a>).
If a domain interface definition specifies a portgroup (by
diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h
index 4606a07..2a22820 100644
--- a/src/util/virnetdevbandwidth.h
+++ b/src/util/virnetdevbandwidth.h
@@ -29,10 +29,10 @@
typedef struct _virNetDevBandwidthRate virNetDevBandwidthRate;
typedef virNetDevBandwidthRate *virNetDevBandwidthRatePtr;
struct _virNetDevBandwidthRate {
- unsigned long long average; /* kbytes/s */
- unsigned long long peak; /* kbytes/s */
- unsigned long long floor; /* kbytes/s */
- unsigned long long burst; /* kbytes */
+ unsigned long long average; /* kibibytes/s */
+ unsigned long long peak; /* kibibytes/s */
+ unsigned long long floor; /* kibibytes/s */
+ unsigned long long burst; /* kibibytes */
};
typedef struct _virNetDevBandwidth virNetDevBandwidth;
diff --git a/tools/virsh.pod b/tools/virsh.pod
index f221475..2cf58a6 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -680,7 +680,11 @@ or the MAC address.
If no I<--inbound> or I<--outbound> is specified, this command will
query and show the bandwidth settings. Otherwise, it will set the
inbound or outbound bandwidth. I<average,peak,burst> is the same as
-in command I<attach-interface>.
+in command I<attach-interface>. Values for I<average>, I<peak>, and
+I<burst> are expressed in kibibytes (blocks of 1024 bytes) as described
+in the Network XML documentation at
+L<http://libvirt.org/formatnetwork.html#elementQoS>.
+
If I<--live> is specified, affect a running guest.
If I<--config> is specified, affect the next boot of a persistent guest.
@@ -2019,7 +2023,9 @@ of the network interface. I<script> allows to specify a path to a script
handling a bridge instead of the default one. I<model> allows to specify the
model type. I<inbound> and I<outbound> control the bandwidth of the interface.
I<peak> and I<burst> are optional, so "average,peak", "average,,burst" and
-"average" are also legal.
+"average" are also legal. Values for I<average>, I<peak>, and I<burst> are
+expressed in kibibytes (blocks of 1024 bytes) as described in the Network
+XML documentation at L<http://libvirt.org/formatnetwork.html#elementQoS>.
If I<--live> is specified, affect a running domain.
If I<--config> is specified, affect the next startup of a persistent domain.
--
1.8.4.2
10 years, 9 months