[libvirt] [PATCH 0/2] Libvirt-java event handling

Julian Stecklina jsteckli at os.inf.tu-dresden.de
Wed Aug 17 15:23:29 UTC 2011


Thus spake Bryan Kearney <bkearney at redhat.com>:

> Thank you for the patch. I am applying it now. Did you get the
> registration call backes working. I am getting failures consistently
> with every domain registration I do with the callbacks.

I think most drivers don't support that. We have a custom driver for our
hypervisor and it works. The only weird thing is the following. Suppose
I have a callback like this:

 @Override
 public void eventCallback(ConnectionPointer virConnectPtr,
                           DomainPointer virDomainPointer, Pointer arg4) {
   System.out.printf("p %s\n", virDomainPointer.toString());
   Domain d = new Domain(c, virDomainPointer);
   try {
     System.out.printf("REBOOT(%s)\n", d.getName());
   } catch (LibvirtException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
  }

Sometimes I get the following output:

p org.libvirt.jna.DomainPointer at c016a2b8
libvir: Domain error : invalid domain pointer in virDomainFree
REBOOT(linux)


I am at a loss to explain where this call to virDomainFree comes
from... Any clues?

Regards, Julian




More information about the libvir-list mailing list