[libvirt] RFC (v2): Add virDomainBlockPull API family to libvirt
by Adam Litke
Changes since V1:
- Rebased to incorporate changes to generator and
removal of static driver structure initializers
- Other small fixups suggested by Matthias Bolte
To help speed the provisioning process for large domains, new QED disks are
created with backing to a template image. These disks are configured with copy
on read such that blocks that are read from the backing file are copied to the
new disk. This reduces I/O over a potentially costly path to the backing
image.
In such a configuration, there is a desire to remove the dependency on the
backing image as the domain runs. To accomplish this, qemu will provide an
interface to perform sequential copy on read operations during normal VM
operation. Once all data has been copied, the disk image's link to the backing
file is removed.
The virDomainBlockPull API family brings this functionality to libvirt.
virDomainBlockPullAll() instructs the hypervisor to stream the entire device in
the background. Progress of this operation can be checked with the function
virDomainBlockPullInfo(). An ongoing stream can be cancelled with
virDomainBlockPullAbort(). If a more controlled IO rate is desired,
virDomainBlockPull() can be used to perform a single increment of IO.
Subsequent calls to this function will automatically stream the appropriate
next increment until the disk has been fully populated.
An event (VIR_DOMAIN_EVENT_ID_BLOCK_PULL) will be emitted when a disk has been
fully populated or if a BlockPullAll() operation was terminated due to an
error. This event is useful to avoid polling on virDomainBlockPullInfo() for
completion and could also be used by the security driver to revoke access to
the backing file when it is no longer needed.
Note: I am sending this series out now (even though image streaming is not
quite committed to qemu upstream) because I want to start the review process.
At this stage, I expect only minor changes to the qemu implementation.
make check: PASS
make syntax-check: PASS
make -C tests valgrind: PASS
I am testing this API with Python Unittest (see the last patch).
[PATCH 1/8] Add new API virDomainBlockPull* to headers
[PATCH 2/8] virDomainBlockPull: Implement the main entry points
[PATCH 3/8] Add virDomainBlockPull support to the remote driver
[PATCH 4/8] Implement virDomainBlockPull for the qemu driver
[PATCH 5/8] Enable the virDomainBlockPull API in virsh
[PATCH 6/8] Enable virDomainBlockPull in the python API.
[PATCH 7/8] Asynchronous event for BlockPull completion
[PATCH 8/8] test: Python Unittests for DomainBlockPull API
13 years, 5 months
[libvirt] [PATCH v2] virsh: Add daemon version reporting
by Michal Prívozník
From: Michal Privoznik <mprivozn(a)redhat.com>
'virsh version' might report against which version of libvirtd is
running.
---
diff to v1:
- added 'daemon' switch
- don't fail when no deamon version is available
tools/virsh.c | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index 123781f..56405c0 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -8658,6 +8658,10 @@ static const vshCmdInfo info_version[] = {
{NULL, NULL}
};
+static const vshCmdOptDef opts_version[] = {
+ {"daemon", VSH_OT_BOOL, VSH_OFLAG_NONE, N_("report daemon version too")},
+ {NULL, 0, 0, NULL}
+};
static bool
cmdVersion(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
@@ -8667,6 +8671,7 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
unsigned long libVersion;
unsigned long includeVersion;
unsigned long apiVersion;
+ unsigned long daemonVersion;
int ret;
unsigned int major;
unsigned int minor;
@@ -8725,6 +8730,21 @@ cmdVersion(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
vshPrint(ctl, _("Running hypervisor: %s %d.%d.%d\n"),
hvType, major, minor, rel);
}
+
+ if (vshCommandOptBool(cmd, "daemon")) {
+ ret = virConnectGetLibVersion(ctl->conn, &daemonVersion);
+ if (ret < 0) {
+ vshError(ctl, "%s", _("failed to get the daemon version"));
+ } else {
+ major = daemonVersion / 1000000;
+ daemonVersion %= 1000000;
+ minor = daemonVersion / 1000;
+ rel = daemonVersion % 1000;
+ vshPrint(ctl, _("Running against daemon: %d.%d.%d\n"),
+ major, minor, rel);
+ }
+ }
+
return true;
}
@@ -11148,7 +11168,7 @@ static const vshCmdDef domManagementCmds[] = {
{"vcpucount", cmdVcpucount, opts_vcpucount, info_vcpucount, 0},
{"vcpuinfo", cmdVcpuinfo, opts_vcpuinfo, info_vcpuinfo, 0},
{"vcpupin", cmdVcpupin, opts_vcpupin, info_vcpupin, 0},
- {"version", cmdVersion, NULL, info_version, 0},
+ {"version", cmdVersion, opts_version, info_version, 0},
{"vncdisplay", cmdVNCDisplay, opts_vncdisplay, info_vncdisplay, 0},
{NULL, NULL, NULL, NULL, 0}
};
--
1.7.5.rc3
13 years, 5 months
[libvirt] [PATCH] Split out dlopen detection
by Guido Günther
since it's needed for the lock manager too. Fixes linking on non intel
architectures. See e.g.
https://buildd.debian.org/status/fetch.php?pkg=libvirt&arch=mips&ver=0.9....
O.k. to apply?
Cheers,
-- Guido
---
configure.ac | 44 ++++++++++++++++++++++++++------------------
src/Makefile.am | 2 ++
2 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index 985b8c2..ca6ba67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2130,6 +2130,28 @@ esac
AM_CONDITIONAL([WITH_WIN_ICON], [test "$WINDRES" != ""])
+# Check for dlopen needed for the locking manager and driver-modules
+DLOPEN_CFLAGS=
+DLOPEN_LIBS=
+old_cflags="$CFLAGS"
+old_libs="$LIBS"
+have_dlopen="yes"
+AC_CHECK_HEADER([dlfcn.h],[],[have_dlopen="no"])
+AC_SEARCH_LIBS([dlopen], [dl], [], [have_dlopen="no"])
+CFLAGS="$old_cflags"
+LIBS="$old_libs"
+
+if test "$have_dlopen" != "no"; then
+ case $ac_cv_search_dlopen in
+ no*) DLOPEN_LIBS= ;;
+ *) DLOPEN_LIBS=$ac_cv_search_dlopen ;;
+ esac
+fi
+AM_CONDITIONAL([HAVE_DLOPEN], [test "$have_dlopen" != "no"])
+AC_SUBST([DLOPEN_CFLAGS])
+AC_SUBST([DLOPEN_LIBS])
+
+
dnl Driver-Modules library
AC_ARG_WITH([driver-modules],
AC_HELP_STRING([--with-driver-modules], [build drivers as loadable modules @<:@default=no@:>@]),
@@ -2137,30 +2159,16 @@ AC_ARG_WITH([driver-modules],
[with_driver_modules=no])
DRIVER_MODULE_CFLAGS=
-DRIVER_MODULE_LIBS=
if test "x$with_driver_modules" = "xyes" ; then
- old_cflags="$CFLAGS"
- old_libs="$LIBS"
- fail=0
- AC_CHECK_HEADER([dlfcn.h],[],[fail=1])
- AC_SEARCH_LIBS([dlopen], [dl], [], [fail=1])
- test $fail = 1 &&
+ test $have_dlopen != "yes" &&
AC_MSG_ERROR([You must have dlfcn.h / dlopen() support to build driver modules])
-
- CFLAGS="$old_cflags"
- LIBS="$old_libs"
fi
if test "$with_driver_modules" = "yes"; then
DRIVER_MODULE_CFLAGS="-export-dynamic"
- case $ac_cv_search_dlopen in
- no*) DRIVER_MODULE_LIBS= ;;
- *) DRIVER_MODULE_LIBS=$ac_cv_search_dlopen ;;
- esac
AC_DEFINE_UNQUOTED([WITH_DRIVER_MODULES], 1, [whether to build drivers as modules])
fi
AM_CONDITIONAL([WITH_DRIVER_MODULES], [test "$with_driver_modules" != "no"])
AC_SUBST([DRIVER_MODULE_CFLAGS])
-AC_SUBST([DRIVER_MODULE_LIBS])
# Set LV_LIBTOOL_OBJDIR to "." or $lt_cv_objdir, depending on whether
@@ -2457,10 +2465,10 @@ AC_MSG_NOTICE([])
AC_MSG_NOTICE([ SELinux: $with_secdriver_selinux])
AC_MSG_NOTICE([AppArmor: $with_secdriver_apparmor])
AC_MSG_NOTICE([])
-AC_MSG_NOTICE([Driver Loadable Modules])
+AC_MSG_NOTICE([Driver Loadable Modules / Dlopen])
AC_MSG_NOTICE([])
-if test "$with_driver_modules" != "no" ; then
-AC_MSG_NOTICE([ dlopen: $DRIVER_MODULE_CFLAGS $DRIVER_MODULE_LIBS])
+if test "$have_dlopen" != "no" ; then
+AC_MSG_NOTICE([ dlopen: $DRIVER_MODULE_CFLAGS $DLOPEN_CFLAGS $DLOPEN_LIBS])
else
AC_MSG_NOTICE([ dlopen: no])
fi
diff --git a/src/Makefile.am b/src/Makefile.am
index 3612a24..a6d6a1e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,6 +10,7 @@ INCLUDES = \
-I@top_srcdir@/src/util \
-I@top_srcdir@/include \
$(DRIVER_MODULE_CFLAGS) \
+ $(DLOPEN_CFLAGS) \
$(LIBXML_CFLAGS) \
$(WARN_CFLAGS) \
$(LOCK_CHECKING_CFLAGS) \
@@ -1141,6 +1142,7 @@ libvirt_la_LDFLAGS = $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_SYMBOL_FILE) \
libvirt_la_BUILT_LIBADD += ../gnulib/lib/libgnu.la
libvirt_la_LIBADD += $(LIBXML_LIBS) \
$(DRIVER_MODULE_LIBS) \
+ $(DLOPEN_LIBS) \
$(CYGWIN_EXTRA_LIBADD)
libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
# Because we specify libvirt_la_DEPENDENCIES for $(LIBVIRT_SYMBOL_FILE), we
--
1.7.5.3
13 years, 5 months
[libvirt] [PATCH] nodeinfo: remove superflous braces
by Guido Günther
that break compilation on non intel architectures:
mips:
https://buildd.debian.org/status/fetch.php?pkg=libvirt&arch=mips&ver=0.9....
powerpc:
https://buildd.debian.org/status/fetch.php?pkg=libvirt&arch=powerpc&ver=0...
s390:
https://buildd.debian.org/status/fetch.php?pkg=libvirt&arch=s390&ver=0.9....
sparc:
https://buildd.debian.org/status/fetch.php?pkg=libvirt&arch=sparc&ver=0.9...
O.k. to apply?
Cheers,
-- Guido
---
src/nodeinfo.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index f55c83e..1fe6ec9 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -248,7 +248,6 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
&& (*p == '\0' || c_isspace(*p))
&& id > nodeinfo->cores)
nodeinfo->cores = id;
- }
# elif defined(__powerpc__) || \
defined(__powerpc64__)
} else if (STRPREFIX(buf, "clock")) {
@@ -266,7 +265,6 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
/* Accept trailing fractional part. */
&& (*p == '\0' || *p == '.' || c_isspace(*p)))
nodeinfo->mhz = ui;
- }
# elif defined(__s390__) || \
defined(__s390x__)
} else if (STRPREFIX(buf, "# processors")) {
@@ -289,10 +287,10 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
* and parsed in next iteration, because it is not in expected
* format and thus lead to error. */
break;
- }
# else
# warning Parser for /proc/cpuinfo needs to be adapted for your architecture
# endif
+ }
}
if (!nodeinfo->cpus) {
--
1.7.5.3
13 years, 5 months
[libvirt] [PATCH] util: Cleanup indention problem in virterror.c
by Osier Yang
Push under trivial rule.
---
src/util/virterror.c | 52 +++++++++++++++++++++++++-------------------------
1 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/src/util/virterror.c b/src/util/virterror.c
index 948c8c5..75058f3 100644
--- a/src/util/virterror.c
+++ b/src/util/virterror.c
@@ -1008,63 +1008,63 @@ virErrorMsg(virErrorNumber error, const char *info)
break;
case VIR_ERR_NO_STORAGE_POOL:
if (info == NULL)
- errmsg = _("Storage pool not found");
+ errmsg = _("Storage pool not found");
else
- errmsg = _("Storage pool not found: %s");
+ errmsg = _("Storage pool not found: %s");
break;
case VIR_ERR_NO_STORAGE_VOL:
if (info == NULL)
- errmsg = _("Storage volume not found");
+ errmsg = _("Storage volume not found");
else
- errmsg = _("Storage volume not found: %s");
+ errmsg = _("Storage volume not found: %s");
break;
case VIR_ERR_INVALID_STORAGE_POOL:
if (info == NULL)
- errmsg = _("invalid storage pool pointer in");
+ errmsg = _("invalid storage pool pointer in");
else
- errmsg = _("invalid storage pool pointer in %s");
+ errmsg = _("invalid storage pool pointer in %s");
break;
case VIR_ERR_INVALID_STORAGE_VOL:
if (info == NULL)
- errmsg = _("invalid storage volume pointer in");
+ errmsg = _("invalid storage volume pointer in");
else
- errmsg = _("invalid storage volume pointer in %s");
+ errmsg = _("invalid storage volume pointer in %s");
break;
case VIR_WAR_NO_STORAGE:
if (info == NULL)
- errmsg = _("Failed to find a storage driver");
+ errmsg = _("Failed to find a storage driver");
else
- errmsg = _("Failed to find a storage driver: %s");
+ errmsg = _("Failed to find a storage driver: %s");
break;
case VIR_WAR_NO_NODE:
if (info == NULL)
- errmsg = _("Failed to find a node driver");
+ errmsg = _("Failed to find a node driver");
else
- errmsg = _("Failed to find a node driver: %s");
+ errmsg = _("Failed to find a node driver: %s");
break;
case VIR_ERR_INVALID_NODE_DEVICE:
if (info == NULL)
- errmsg = _("invalid node device pointer");
+ errmsg = _("invalid node device pointer");
else
- errmsg = _("invalid node device pointer in %s");
+ errmsg = _("invalid node device pointer in %s");
break;
case VIR_ERR_NO_NODE_DEVICE:
if (info == NULL)
- errmsg = _("Node device not found");
+ errmsg = _("Node device not found");
else
- errmsg = _("Node device not found: %s");
+ errmsg = _("Node device not found: %s");
break;
case VIR_ERR_NO_SECURITY_MODEL:
if (info == NULL)
- errmsg = _("Security model not found");
+ errmsg = _("Security model not found");
else
- errmsg = _("Security model not found: %s");
+ errmsg = _("Security model not found: %s");
break;
case VIR_ERR_OPERATION_INVALID:
if (info == NULL)
- errmsg = _("Requested operation is not valid");
+ errmsg = _("Requested operation is not valid");
else
- errmsg = _("Requested operation is not valid: %s");
+ errmsg = _("Requested operation is not valid: %s");
break;
case VIR_WAR_NO_INTERFACE:
if (info == NULL)
@@ -1116,21 +1116,21 @@ virErrorMsg(virErrorNumber error, const char *info)
break;
case VIR_ERR_INVALID_NWFILTER:
if (info == NULL)
- errmsg = _("Invalid network filter");
+ errmsg = _("Invalid network filter");
else
- errmsg = _("Invalid network filter: %s");
+ errmsg = _("Invalid network filter: %s");
break;
case VIR_ERR_NO_NWFILTER:
if (info == NULL)
- errmsg = _("Network filter not found");
+ errmsg = _("Network filter not found");
else
- errmsg = _("Network filter not found: %s");
+ errmsg = _("Network filter not found: %s");
break;
case VIR_ERR_BUILD_FIREWALL:
if (info == NULL)
- errmsg = _("Error while building firewall");
+ errmsg = _("Error while building firewall");
else
- errmsg = _("Error while building firewall: %s");
+ errmsg = _("Error while building firewall: %s");
break;
case VIR_ERR_CONFIG_UNSUPPORTED:
if (info == NULL)
--
1.7.4
13 years, 5 months
[libvirt] [PATCH v4 0/4] vcpupin: configure inactive domain's CPU affinity setting
by Taku Izumi
Hi all,
I'll resend this patchset because what sent yesterday was broken.
Sorry to be a nuisance.
--
This patchset enables us to configure inactive domains' CPU affinity setting.
This is the rebased version, but retains the version number.
*[PATCH v4 1/4] vcpupin: introduce a new libvirt API (virDomainPinVcpuFlags)
*[PATCH v4 2/4] vcpupin: implement the code to address the new API in the qemu driver
*[PATCH v4 3/4] vcpupin: implement the remote protocol to address the new API
*[PATCH v4 4/4] vcpupin: add the new option to "virsh vcpupin" command
Best regards,
Taku Izumi
13 years, 5 months
[libvirt] [PATCH 1/2] Use '-' to read from stdin
by Michael Williams
Modify virFileReadAll to open stdin when '-' is given as the filename.
Signed-off-by: Michael Williams <mspacex(a)gmail.com>
---
src/util/util.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/util/util.c b/src/util/util.c
index df4dfac..554d68e 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -443,7 +443,13 @@ virFileReadLimFD(int fd, int maxlen, char **buf)
int virFileReadAll(const char *path, int maxlen, char **buf)
{
- int fd = open(path, O_RDONLY);
+ int fd;
+
+ if (strcmp(path,"-") == 0)
+ fd = fileno(stdin);
+ else
+ fd = open(path, O_RDONLY);
+
if (fd < 0) {
virReportSystemError(errno, _("Failed to open file '%s'"), path);
return -1;
--
1.7.3.4
13 years, 5 months
[libvirt] [PATCH v2 RESEND] qemu: Parse current balloon value returned by query_balloon
by Osier Yang
Qemu once supported following memory stats which will returned by
"query_balloon":
stat_put(dict, "actual", actual);
stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]);
stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]);
stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]);
stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]);
stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]);
stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]);
But it later disabled all the stats except "actual" by commit
07b0403dfc2b2ac179ae5b48105096cc2d03375a.
libvirt doesn't parse "actual", so user will always see a empty result
with "virsh dommemstat $domain". Even qemu haven't disabled the stats,
we should support parsing "actual".
---
include/libvirt/libvirt.h.in | 4 +++-
src/libvirt.c | 2 ++
src/qemu/qemu_monitor_json.c | 12 ++++++++++++
src/qemu/qemu_monitor_text.c | 4 +++-
tools/virsh.c | 2 ++
5 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 76ad908..3d8a0a1 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -467,11 +467,13 @@ typedef enum {
*/
VIR_DOMAIN_MEMORY_STAT_AVAILABLE = 5,
+ /* Current balloon value (in KB). */
+ VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON = 6,
/*
* The number of statistics supported by this version of the interface.
* To add new statistics, add them to the enum and increase this value.
*/
- VIR_DOMAIN_MEMORY_STAT_NR = 6,
+ VIR_DOMAIN_MEMORY_STAT_NR = 7,
} virDomainMemoryStatTags;
typedef struct _virDomainMemoryStat virDomainMemoryStatStruct;
diff --git a/src/libvirt.c b/src/libvirt.c
index caace01..505481a 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -5750,6 +5750,8 @@ error:
* The amount of memory which is not being used for any purpose (in kb).
* VIR_DOMAIN_MEMORY_STAT_AVAILABLE:
* The total amount of memory available to the domain's OS (in kb).
+ * VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON:
+ * Current balloon value (in kb).
*
* Returns: The number of stats provided or -1 in case of failure.
*/
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 75adf66..2680b3c 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1119,6 +1119,18 @@ int qemuMonitorJSONGetMemoryStats(qemuMonitorPtr mon,
goto cleanup;
}
+ if (virJSONValueObjectHasKey(data, "actual") && (got < nr_stats)) {
+ if (virJSONValueObjectGetNumberUlong(data, "actual", &mem) < 0) {
+ qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("info balloon reply was missing balloon actual"));
+ ret = -1;
+ goto cleanup;
+ }
+ stats[got].tag = VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON;
+ stats[got].val = (mem/1024);
+ got++;
+ }
+
if (virJSONValueObjectHasKey(data, "mem_swapped_in") && (got < nr_stats)) {
if (virJSONValueObjectGetNumberUlong(data, "mem_swapped_in", &mem) < 0) {
qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 3b42e7a..d432027 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -549,7 +549,9 @@ static int qemuMonitorParseExtraBalloonInfo(char *text,
parseMemoryStat(&p, VIR_DOMAIN_MEMORY_STAT_UNUSED,
",free_mem=", &stats[nr_stats_found]) ||
parseMemoryStat(&p, VIR_DOMAIN_MEMORY_STAT_AVAILABLE,
- ",total_mem=", &stats[nr_stats_found]))
+ ",total_mem=", &stats[nr_stats_found]) ||
+ parseMemoryStat(&p, VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON,
+ ",actual=", &stats[nr_stats_found]))
nr_stats_found++;
/* Skip to the next label. When *p is ',' the last match attempt
diff --git a/tools/virsh.c b/tools/virsh.c
index 76478dc..863b2de 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -1147,6 +1147,8 @@ cmdDomMemStat(vshControl *ctl, const vshCmd *cmd)
vshPrint (ctl, "unused %llu\n", stats[i].val);
if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_AVAILABLE)
vshPrint (ctl, "available %llu\n", stats[i].val);
+ if (stats[i].tag == VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON)
+ vshPrint (ctl, "actual %llu\n", stats[i].val);
}
virDomainFree(dom);
--
1.7.4
13 years, 5 months
[libvirt] [PATCH 0/2] Update virsh to use stdin where appropriate
by Michael Williams
Allow virsh to use stdin for xml and other config file input when
otherwise it would have required a file input. This allows for easier
passing of configs through pipes, for example:
virsh dumpxml 6 | ssh remote-host "virsh define"
Michael Williams (2):
Use '-' to read from stdin
Try stdin for input when no file is specified
src/util/util.c | 16 ++++++++-
tools/virsh.c | 99
+++++++++++++++++++++++++++++++++++--------------------
2 files changed, 78 insertions(+), 37 deletions(-)
--
1.7.3.4
13 years, 5 months