[libvirt] [PATCH 1/4] qemu: minor formatting cleanup

2011-08-05 Thread Eric Blake
I noticed some inconsistent use of 'else'. * src/qemu/qemu_driver.c (qemuCPUCompare) (qemuDomainSnapshotCreateXML, qemuDomainRevertToSnapshot) (qemuDomainSnapshotDiscard): Match coding conventions. --- No functional changes. src/qemu/qemu_driver.c | 23 ++- 1 files changed

[libvirt] [PATCH 0/4] snapshot improvements

2011-08-05 Thread Eric Blake
There's still a lot to go before virsh snapshot can manage disk snapshots in addition to checkpoints, but I wanted to get the review started on these. Even with these patches, there are some major bugs with snapshots: 1. Snapshots aren't storing the domain XML. If you create a snapshot, then hotp

[libvirt] [PATCH 2/4] qemu: give correct event when reverting to paused snapshot

2011-08-05 Thread Eric Blake
When reverting a running domain to a paused snapshot, the event that fires should mention that the domain is suspended. * include/libvirt/libvirt.h.in (VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT): New sub-event. * src/qemu/qemu_driver.c (qemuDomainRevertToSnapshot): Use it. --- include/libvirt/libv

[libvirt] [PATCH 3/4] qemu: improve reverting to paused snapshots

2011-08-05 Thread Eric Blake
If you take a checkpoint snapshot of a running domain, then pause qemu, then restore the snapshot, the result should be a running domain, but the code was leaving things paused. Furthermore, if you take a checkpoint of a paused domain, then run, then restore, there was a brief but non-deterministi

[libvirt] [PATCH 4/4] virsh: concatenate qemu-monitor-command arguments

2011-08-05 Thread Eric Blake
Call me lazy, but: virsh qemu-monitor-command dom --hmp info status is nicer than: virsh qemu-monitor-command dom --hmp 'info status' * tools/virsh.c (cmdQemuMonitorCommand): Allow multiple arguments, for convenience. --- This helped me test the previous patch :) tools/virsh.c | 19 +

Re: [libvirt] [RFC v2] Export KVM Host Power Management capabilities

2011-08-05 Thread Vaidyanathan Srinivasan
* Daniel P. Berrange [2011-08-05 17:11:50]: > On Fri, Aug 05, 2011 at 05:24:13PM +0530, Srivatsa S. Bhat wrote: > > This patch exports KVM Host Power Management capabilities as XML so that > > higher-level systems management software can make use of these features > > available in the host. > >

Re: [libvirt] [PATCH] qemu: Avoid overwriting errors from virGetHostname

2011-08-05 Thread Jiri Denemark
On Wed, Aug 03, 2011 at 07:03:03 -0600, Eric Blake wrote: > On 08/03/2011 04:08 AM, Jiri Denemark wrote: > > --- > > src/qemu/qemu_migration.c |2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c > > index 7aee

Re: [libvirt] [RFC v2] Export KVM Host Power Management capabilities

2011-08-05 Thread Eric Blake
On 08/05/2011 10:11 AM, Daniel P. Berrange wrote: On Fri, Aug 05, 2011 at 05:24:13PM +0530, Srivatsa S. Bhat wrote: This patch exports KVM Host Power Management capabilities as XML so that higher-level systems management software can make use of these features available in the host. Exposing i

Re: [libvirt] Disk snapshot mode proposal: patch for storing the snapshot mode from .vmx to .xml

2011-08-05 Thread Eric Blake
On 07/12/2011 09:17 AM, Matthias Bolte wrote: Here's the preliminary patch. Anyway, you decided to add an snapshot_mode attribute to the disk element and exposed the VMX values there. I'm not sure that this is a good idea as scsi0:0.mode affects two aspects. scsi0:0.mode can basically hav

Re: [libvirt] [RFC v2] Export KVM Host Power Management capabilities

2011-08-05 Thread Daniel P. Berrange
On Fri, Aug 05, 2011 at 05:24:13PM +0530, Srivatsa S. Bhat wrote: > This patch exports KVM Host Power Management capabilities as XML so that > higher-level systems management software can make use of these features > available in the host. > > The script "pm-is-supported" (from pm-utils package) i

[libvirt] [test-API][PATCH] Add testcases for testing permission control and sasl authentication of unix socket

2011-08-05 Thread Guannan Ren
add new testcases repos/remoteAccess/unix_perm_sasl.py --- repos/remoteAccess/unix_perm_sasl.py | 234 ++ 1 files changed, 234 insertions(+), 0 deletions(-) create mode 100644 repos/remoteAccess/unix_perm_sasl.py diff --git a/repos/remoteAccess/unix_perm_sasl

Re: [libvirt] [RFC v2] Export KVM Host Power Management capabilities

2011-08-05 Thread Eric Blake
On 08/05/2011 05:54 AM, Srivatsa S. Bhat wrote: This patch exports KVM Host Power Management capabilities as XML so that higher-level systems management software can make use of these features available in the host. The script "pm-is-supported" (from pm-utils package) is run to discover if Suspe

Re: [libvirt] [PATCH 3/3] qemu: avoid dead store in doPeer2PeerMigrate3

2011-08-05 Thread Eric Blake
On 08/05/2011 02:12 AM, Alex Jia wrote: On 08/04/2011 10:27 PM, Eric Blake wrote: On 08/03/2011 11:30 PM, Alex Jia wrote: Value stored to 'ret' is never read. If Confirm3 returns -1, there's nothing more we can do, here should remove this dead assignment. * src/qemu/qemu_migration.c: kill dead

[libvirt] [PATCH] qemu: silence clang false positive

2011-08-05 Thread Eric Blake
Our logic throws off analyzer tools: ptr var = NULL; if (flags == 0) flags = live ? _LIVE : _CONFIG; if (flags & _LIVE) do stuff if (flags & _CONFIG) var = non-null; if (flags & _LIVE) do more stuff else if (flags & _CONFIG) use var the tools keep thinking that var can still be NULL in the last i

Re: [libvirt] [PATCH] qemu: avoid pass null pointer as an argument

2011-08-05 Thread Eric Blake
On 08/04/2011 07:10 PM, Alex Jia wrote: We definitely have a bug here, but this is not the right fix. The bug is that the cleanup: label is trying to read from logfd if the vm crashed, without having opened logfd in the qemuProcessAttach case. I think the more appropriate patch is this: diff --

Re: [libvirt] libvirt-0.9.1 to 0.9.3-r1: managedsave/save won't start/restore at saved state

2011-08-05 Thread Laine Stump
On 08/03/2011 06:44 AM, Nicolas Sebrecht wrote: The 02/08/11, Nicolas Sebrecht wrote: I'm stuck! As told before, I have one working (in production) system and others failing Gentoo systems (including the testing machine). I've check the working system against the testing machine and looked fo

[libvirt] [RFC v2] Export KVM Host Power Management capabilities

2011-08-05 Thread Srivatsa S. Bhat
This patch exports KVM Host Power Management capabilities as XML so that higher-level systems management software can make use of these features available in the host. The script "pm-is-supported" (from pm-utils package) is run to discover if Suspend-to-RAM (S3) or Suspend-to-Disk (S4) is supporte

Re: [libvirt] [PATCH] qemu: avoid pass null pointer as an argument

2011-08-05 Thread Eric Blake
On 08/04/2011 07:00 PM, Alex Jia wrote: closelog: - VIR_FREE(buf); - if (VIR_CLOSE(logfd) < 0) { char ebuf[1024]; VIR_WARN("Unable to close logfile: %s", virStrerror(errno, ebuf, sizeof ebuf)); } VIR_FREE(buf); Right, this is a double free, Eric, Hasn't Coverity found this issue? It's not a

Re: [libvirt] PCI devices passthough to LXC containers using libvirt

2011-08-05 Thread Daniel P. Berrange
On Thu, Aug 04, 2011 at 11:23:20AM -0700, Devendra K. Modium wrote: > Hi Daniel, > > Thanks for the reply. > > I am trying to access GPU devices from inside > the containers. > > (Only way I know)For this I need to add the GPU device numbers in ACL/(device > whiteist) > to get access to these d

Re: [libvirt] [PATCH] Allow use of file images for LXC container filesystems

2011-08-05 Thread Daniel P. Berrange
On Thu, Aug 04, 2011 at 11:55:21AM -0600, Eric Blake wrote: > On 08/04/2011 09:41 AM, Daniel P. Berrange wrote: > >From: "Daniel P. Berrange" > > > >A previous commit gave the LXC driver the ability to mount > >block devices for the container filesystem. Through use of > >the loopback device functi

Re: [libvirt] [PATCH] qemu: avoid double free in qemuProcessWaitForMonitor

2011-08-05 Thread Osier Yang
于 2011年08月05日 16:22, Alex Jia 写道: Reported by Eric. * src/qemu/qemu_process.c: avoid double free 'buf' on closelog lable. Signed-off-by: Alex Jia --- src/qemu/qemu_process.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_proc

[libvirt] [PATCH] qemu: avoid double free in qemuProcessWaitForMonitor

2011-08-05 Thread ajia
Reported by Eric. * src/qemu/qemu_process.c: avoid double free 'buf' on closelog lable. Signed-off-by: Alex Jia --- src/qemu/qemu_process.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index b0d2149..5ef25cb 100644 -

Re: [libvirt] [PATCH 3/3] qemu: avoid dead store in doPeer2PeerMigrate3

2011-08-05 Thread Alex Jia
On 08/04/2011 10:27 PM, Eric Blake wrote: On 08/03/2011 11:30 PM, Alex Jia wrote: Value stored to 'ret' is never read. If Confirm3 returns -1, there's nothing more we can do, here should remove this dead assignment. * src/qemu/qemu_migration.c: kill dead assignment. Signed-off-by: Alex Jia --