Re: [libvirt] [PATCH] vmware: os x support is broken

2014-01-04 Thread Denis Kondratenko
Behaviour of vmware* utilities is hidden from us. It seems to me that they didn't expect vmware-vmx direct usage so reporting everything to stderr in case of os x. This obvious option is reported to stderr too and has some bug : $ /Applications/VMware\ Fusion.app/Contents/Library/vmware-vmx -?

Re: [libvirt] [PATCH] rbd: Use rbd_create3 to create RBD format 2 images by default

2014-01-04 Thread Wido den Hollander
On 01/02/2014 08:42 PM, Doug Goldstein wrote: On Thu, Jan 2, 2014 at 10:01 AM, Wido den Hollander w...@widodh.nl wrote: On 12/11/2013 03:47 PM, Wido den Hollander wrote: This new RBD format supports snapshotting and cloning. By having libvirt create images in format 2 end-users of the

Re: [libvirt] detection of events in kvm

2014-01-04 Thread Eric Blake
On 01/04/2014 12:27 AM, rash wrote: Hello, I am student and doing a project in virtualization.My project requires detection of events in kvm like start of a virtual machine,shutoff of a virtual machine. Yes, libvirt supports various events for asynchronous feedback when certain actions

Re: [libvirt] event detection in kvm

2014-01-04 Thread Eric Blake
[meta-question] On 01/04/2014 12:31 AM, rash g wrote: Hello, I am student and doing a project in virtualization.My project requires detection of events in kvm like start of a virtual machine,shutoff of a virtual machine. It appears you mailed twice, because you didn't realize that

[libvirt] [PATCH 8/2] event: tighten scope of object_event

2014-01-04 Thread Eric Blake
Tighten up scope after the previous patch avoided using internals. This will also make it easier to change internal implementation without having to chase down quite as many impacted callers or worrying about two files getting implementations out of sync. * src/conf/object_event_private.h

[libvirt] [PATCH 10a/2] event [squash with next]: test that old-style is distinct from new-style

2014-01-04 Thread Eric Blake
Done as a separate patch from 10/2 so that I can prove it flushes out the flaw; but will be squashed when I push. * tests/objecteventtest.c (testDomainCreateXMLMixed): Enhance test. Signed-off-by: Eric Blake ebl...@redhat.com --- tests/objecteventtest.c | 37

[libvirt] [PATCH 5a/2] event [sqaush with next]: test shared state driver in test:///default

2014-01-04 Thread Eric Blake
Done as a separate patch from 5/2 so that I can prove it flushes out the flaw; but will be squashed when I push. Valgrind didn't report any leaks when running this test plus the fixed source. * tests/objecteventtest.c (testDomainStartStopEvent): Enhance to cover this. (timeout, mymain): Ensure

[libvirt] [PATCH 11/2] event: don't turn offline domain into global event

2014-01-04 Thread Eric Blake
If a user registers for a domain event filtered to a particular domain, but the persistent domain is offline at the time, then the code silently failed to set up the filter. As a result, the event fires for all domains, rather than being filtered. Network events were immune, since they always

[libvirt] [PATCH 10/2] event: don't allow mix of old- and new-style registration

2014-01-04 Thread Eric Blake
Consider these two calls, in either order: id1 = virConnectDomainEventRegisterAny(conn, NULL, VIR_DOMAIN_EVENT_ID_LIFECYCLE, VIR_DOMAIN_EVENT_CALLBACK(callback), NULL, NULL); virConnectDomainEventRegister(conn, callback, NULL, NULL); Right now, the second call fails, because under the

[libvirt] [PATCH 7/2] event: don't let old-style events clobber per-domain events

2014-01-04 Thread Eric Blake
Right now, the older virConnectDomainEventRegister (takes a function pointer, returns 0 on success) and the newer virConnectDomainEventRegisterID (takes an eventID, returns a callbackID) share the underlying implementation (the older API ends up consuming a callbackID for eventID 0 under the

[libvirt] [PATCH 7a/2] event [squash with next]: test that old-style can't clobber new-style

2014-01-04 Thread Eric Blake
Done as a separate patch from 7/2 so that I can prove it flushes out the flaw; but will be squashed when I push. * tests/objecteventtest.c (testDomainCreateXMLMixed): New test. Signed-off-by: Eric Blake ebl...@redhat.com --- tests/objecteventtest.c | 69

[libvirt] [PATCH 11a/2] event [squash with next]: test per-domain events of offline domain

2014-01-04 Thread Eric Blake
Done as a separate patch from 11/2 so that I can prove it flushes out the flaw; but will be squashed when I push. * tests/objecteventtest.c (testDomainCreateXMLMixed): Enhance test. --- tests/objecteventtest.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[libvirt] [PATCH 5/2] event: share state driver between test:///default connections

2014-01-04 Thread Eric Blake
Prior to this patch, every test:/// URI has its own event manager, which means that registering for an event can only ever receive events from the connection where it issued the API that triggered the event. But the whole idea of events is to be able to learn about something where an API call did

[libvirt] [PATCH 9/2] event: properly filter count of remaining events

2014-01-04 Thread Eric Blake
On the surface, this sequence of API calls should succeed: id1 = virConnectDomainEventRegisterAny(..., VIR_DOMAIN_EVENT_ID_LIFECYCLE,...); id2 = virConnectDomainEventRegisterAny(..., VIR_DOMAIN_EVENT_ID_RTC_CHANGE,...); virConnectDomainEventDeregisterAny(id1); id1 =

[libvirt] [PATCH 6/2] event: rename confusing variable in test, remote drivers

2014-01-04 Thread Eric Blake
Since the introduction of network events, any driver that uses a single event state object to track both domain and network events should not include 'domain' in the name of that object. * src/test/test_driver.c (_testConn): s/domainEventState/eventState/, and fix all callers. *

Re: [libvirt] [PATCH 0/2] event cleanups

2014-01-04 Thread Eric Blake
Apologies for not creating a cover letter originally, so now this thread is all awkward. While I still have pending event patches (for my new proposed API, among other things), those can be in a new series. The patches in this series represent cleanups to a number of bugs that I found while

Re: [libvirt] [PATCH 07/24] maint: avoid nested public calls

2014-01-04 Thread Eric Blake
On 01/02/2014 12:50 PM, John Ferlan wrote: On 12/28/2013 11:11 AM, Eric Blake wrote: Having one API call into another is generally not good; among other issues, it gives confusing logs, and is not quite as efficient. * src/libvirt.c (virDomainGetUUIDString, virNetworkGetUUIDString)

Re: [libvirt] [PATCH 08/24] maint: improve VIR_ERR_NO_SUPPORT usage

2014-01-04 Thread Eric Blake
On 01/02/2014 03:54 PM, John Ferlan wrote: Note that in libvirt.c, we were inconsistent on whether virDomain* API used virLibConnError() (with VIR_FROM_NONE) or virLibDomainError() (with VIR_FROM_DOMAIN); this patch unifies these errors to all use VIR_FROM_NONE, on the grounds that it is

Re: [libvirt] [PATCHv2] Fix explicit usage of default video PCI slots

2014-01-04 Thread Eric Blake
On 01/03/2014 04:06 AM, Ján Tomko wrote: Do not leave the PCI address of the primary video card set to the legacy default (:00:02.0) if we're doing two-pass allocation. Since QEMU 1.6 (QEMU_CAPS_VIDEO_PRIMARY) we allow the primary video card to be on other slots than :00:02.0 (as we

Re: [libvirt] [PATCH] spice: expose the disable file transfer option

2014-01-04 Thread Eric Blake
On 01/02/2014 02:59 AM, Francesco Romani wrote: spice-server offers an API to disable file transfer messages on the agent channel between the client and the guest. This is supported in qemu through the disable-agent-file-xfer option. This patch exposes this option to libvirt. ---

Re: [libvirt] Add pool to domain xml

2014-01-04 Thread Eric Blake
On 01/02/2014 02:58 AM, Wout Mertens wrote: Yes, that seems like a nice interface. It does throw away some info (the full path to the .vmx file in the case of VMWare) but that doesn’t really matter very much. I had a look at implementing this but I’m stuck. I don’t know the code very

Re: [libvirt] [PATCH 08/24] maint: improve VIR_ERR_NO_SUPPORT usage

2014-01-04 Thread Eric Blake
On 01/04/2014 07:21 AM, Eric Blake wrote: The only one that I'd say is different is virDomainOpenGraphics(). It checks VIR_DRV_SUPPORTS_FEATURE on one of its calls to virLibDomainError(). Thus perhaps it'd be better to generate a real error so as to differentiate between the function not

[libvirt] [PATCH 12/2] event: make network events easier to use without casts

2014-01-04 Thread Eric Blake
While comparing network and domain events, I noticed that the test driver had to do a cast in one place and not the other. For consistency, we should hide the necessary casting as low as possible in the stack, with everything else using saner types. * src/conf/network_event.h

Re: [libvirt] [PATCH 6/2] event: rename confusing variable in test, remote drivers

2014-01-04 Thread Eric Blake
On 01/04/2014 07:00 AM, Eric Blake wrote: Since the introduction of network events, any driver that uses a single event state object to track both domain and network events should not include 'domain' in the name of that object. * src/test/test_driver.c (_testConn):