Re: [libvirt] [PATCH] Log virRun command output, return with error

2008-09-23 Thread Chris Lalancette
Cole Robinson wrote: > The attached patch adds some extra logging to the > virRun command. The full argv is now logged with > DEBUG, as well as the commands stdout and stderr > (if anything is found). > > Also, if the command returns an error, we raise > the stderr content with the reported error

[libvirt] [PATCH] Log virRun command output, return with error

2008-09-23 Thread Cole Robinson
The attached patch adds some extra logging to the virRun command. The full argv is now logged with DEBUG, as well as the commands stdout and stderr (if anything is found). Also, if the command returns an error, we raise the stderr content with the reported error msg. This will significantly help w

[libvirt] [PATCH] Sanitize qemu monitor reads

2008-09-23 Thread Cole Robinson
Reading from the qemu monitor pulls in a whole bunch of useless control characters. For example, sending the command 'somecomm' to the monitor returns: somecomm unknown command: 'somecomm' (qemu) Which is 36 characters, however we end up reading over 200. The amount we read actually grows quadrat

Re: [libvirt] [PATCH 3/3]: Implement logical stopPool and deletePool more fully

2008-09-23 Thread Daniel Veillard
On Tue, Sep 23, 2008 at 09:59:35AM +0100, Daniel P. Berrange wrote: > On Tue, Sep 23, 2008 at 09:30:46AM +0200, Chris Lalancette wrote: > > Daniel P. Berrange wrote: > > >> 3) In deletePool, remove the -f from the vgremove command. Besides the > > >> fact > > >> that we probably don't usually wa

[libvirt] Monitoring guest state (xen hvms)

2008-09-23 Thread Matthew Donovan
I would like to be able to monitor the state of a Xen guest OS via virDomainGetInfo (and Domain.getInfo() in the Java bindings.) When I start, pause, and resume the guest via the libvirt API, it works as expected. However, if I shutdown the guest vm by opening a VNC window and actually selectin

Re: [libvirt] [RFC] Events API

2008-09-23 Thread Steve Ofsthun
Daniel Veillard wrote: On Tue, Sep 23, 2008 at 09:19:28AM +0100, Daniel P. Berrange wrote: On Mon, Sep 22, 2008 at 10:54:58PM +0200, Daniel Veillard wrote: On Fri, Sep 19, 2008 at 10:54:39AM +0100, Daniel P. Berrange wrote: Against a virConnectPtr object I'd expect to be able to register to ge

Re: [libvirt] [PATCH 3/3]: Implement logical stopPool and deletePool more fully

2008-09-23 Thread Daniel P. Berrange
On Tue, Sep 23, 2008 at 09:30:46AM +0200, Chris Lalancette wrote: > Daniel P. Berrange wrote: > >> 3) In deletePool, remove the -f from the vgremove command. Besides the > >> fact > >> that we probably don't usually want to force things, the -f option doesn't > >> exist > >> prior to F-9, so th

Re: [libvirt] [RFC] Events API

2008-09-23 Thread Daniel Veillard
On Tue, Sep 23, 2008 at 09:19:28AM +0100, Daniel P. Berrange wrote: > On Mon, Sep 22, 2008 at 10:54:58PM +0200, Daniel Veillard wrote: > > On Fri, Sep 19, 2008 at 10:54:39AM +0100, Daniel P. Berrange wrote: > > > Against a virConnectPtr object I'd expect to be able to register > > > to get an even

Re: [libvirt] [RFC] Events API

2008-09-23 Thread Daniel P. Berrange
On Mon, Sep 22, 2008 at 10:54:58PM +0200, Daniel Veillard wrote: > On Fri, Sep 19, 2008 at 10:54:39AM +0100, Daniel P. Berrange wrote: > > Against a virConnectPtr object I'd expect to be able to register > > to get an event upon > > > > - A new domain object coming into existance > > - A existi

Re: [libvirt] [RFC] Events API

2008-09-23 Thread Daniel P. Berrange
On Mon, Sep 22, 2008 at 03:15:25PM -0400, David Lively wrote: > Okay, at long last, I see what you mean (I think). Apps using libvirt > events must register an EventImpl via virRegisterEventImpl. Internally, > suppose we implement events via an anonymous pipe. libvirt would call > > EventImp

Re: [libvirt] [PATCH 1/3]: Cleanup the virStorageDriver structs

2008-09-23 Thread Daniel Veillard
On Tue, Sep 23, 2008 at 07:34:17AM +0200, Chris Lalancette wrote: > Daniel Veillard wrote: > > On Fri, Sep 19, 2008 at 10:36:37AM +0200, Chris Lalancette wrote: > >> This patch just cleans up the virStorageDriver structs so that they use the > >> functionPointer = functionname syntax of gcc. This

Re: [libvirt] [PATCH 3/3]: Implement logical stopPool and deletePool more fully

2008-09-23 Thread Chris Lalancette
Daniel P. Berrange wrote: >> 3) In deletePool, remove the -f from the vgremove command. Besides the fact >> that we probably don't usually want to force things, the -f option doesn't >> exist >> prior to F-9, so this would fail on F-8, RHEL-5, etc. > > Hmm, are you sure it won't prompt for a y/