[libvirt] [PATCH v3 0/2] Make virsh *edit more bearable
by Michal Privoznik
If there's an error in XML, all changes made by user are lost.
Users (read /me) tends to get angry with this. Allow them to
get back and re-edit.
diff to v2:
-some bugfixes (like flawn in snapshot edit)
-new EDIT_FREE to avoid leaks
(Both suggested by Eric)
diff to v1:
-Eric's review suggestions included
Michal Privoznik (2):
virsh: Switch from generated cmd*Edit commands to nongenerated
virsh: Allow users to reedit rejected XML
cfg.mk | 4 +-
po/POTFILES.in | 1 +
tools/Makefile.am | 40 +----
tools/console.c | 40 +++--
tools/console.h | 2 +
tools/virsh-edit.c | 148 +++++++++++++++
tools/virsh.c | 509 +++++++++++++++++++++++-----------------------------
7 files changed, 407 insertions(+), 337 deletions(-)
create mode 100644 tools/virsh-edit.c
--
1.7.8.5
12 years, 5 months
[libvirt] [PATCH] qemu: Move -name arg to be the 1st so it's visible in "ps x"
by Marti Raudsepp
Hi list,
Currently, monitoring QEMU virtual machines with standard Unix
sysadmin tools is harder than it has to be. The QEMU command line is
often miles long and mostly redundant, it's hard to tell which process
is which.
This patch reorders the QEMU -name argument to be the first, so it's
immediately visible in "ps x", htop and "atop -c" output.
Patch attached and also available from my github fork (master @
git://github.com/intgr/libvirt.git)
Regards,
Marti
12 years, 5 months
[libvirt] [PATCH] qemu: fix netdev alias name assignment wrt type='hostdev'
by Laine Stump
This patch resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=827519
The problem is that an interface with type='hostdev' will have an
alias of the form "hostdev%d", while the function that looks through
existing netdevs to determine the name to use for a new addition will
fail if there's an existing entry that does not match the form
"net%d".
This is another of the handful of places that need an exception due to
the hybrid nature of <interface type='hostdev'> (which is not exactly
an <interface> or a <hostdev>, but is both at the same time).
---
src/qemu/qemu_command.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 9f99dce..1a240fb 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -548,6 +548,11 @@ qemuAssignDeviceNetAlias(virDomainDefPtr def, virDomainNetDefPtr net, int idx)
idx = 0;
for (i = 0 ; i < def->nnets ; i++) {
int thisidx;
+
+ if (def->nets[i]->type == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
+ /* type='hostdev' interfaces have a hostdev%d alias */
+ continue;
+ }
if ((thisidx = qemuDomainDeviceAliasIndex(&def->nets[i]->info, "net")) < 0) {
qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Unable to determine device index for network device"));
--
1.7.10.2
12 years, 5 months
Re: [libvirt] hello:about libvirt collectd monitor plugin
by Richard W.M. Jones
On Fri, Jun 01, 2012 at 04:36:17PM +0800, xingxing gao wrote:
> hi,rjones:
> i am using libvirt and qemu-kvm on rhel,in these days i need to
> monitor the vm's performance on my computer,and i've found the
> wonderful tool---collectd and the lovely plugin for libvirt,but i
> found that the libvirt plugin seems didnot collect the memory info of
> the vm,so i ask you for help,thanks!!!^^
The libvirt collectd plugin predates support for memory statistics.
Therefore it would need to be extended to add this feature.
Patches for this best sent to the collectd project.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
12 years, 5 months
[libvirt] [PATCH][libvirt-glib] glib-events: Allow zero timeouts for timer
by Michal Privoznik
In libvirt, it's perfectly possible and widely used to have disabled
timers (timeout=-1) and fire them up 'randomly' with timeout=0.
However, with current mapping into glib mainloop it's not possible
and causing troubles.
---
libvirt-glib/libvirt-glib-event.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libvirt-glib/libvirt-glib-event.c b/libvirt-glib/libvirt-glib-event.c
index 94f4de8..c3eb3c8 100644
--- a/libvirt-glib/libvirt-glib-event.c
+++ b/libvirt-glib/libvirt-glib-event.c
@@ -384,7 +384,7 @@ gvir_event_timeout_update(int timer,
if (interval >= 0) {
if (data->source)
- goto cleanup;
+ g_source_remove(data->source);
data->interval = interval;
data->source = g_timeout_add(data->interval,
--
1.7.8.5
12 years, 5 months