I found no clean way to get the qemu pid from the python libvirt
bindings, however irc discussion on #virt pointed to a better solution,
using callbacks:

17:30 < eblake> hallyn: can you install an event callback, so that when the 
guest changes state your callback can take note of the fact that it rebooted?
17:31 < hallyn> eblake: that'd be neat
17:32 < hallyn> dir(vm) doesnt' show anything like 'registercallback' or 
'event' or 'callback'
17:32 < hallyn> is that supported natively in the libvirt python bindings?
17:33 < hallyn> ah, registerCloseCallback perhaps?
17:33 < eblake> hallyn: yes, it is supported in python bindings
17:34 < eblake> not registerCloseCallback; give me a moment, and I'll point you 
to it...
17:34 < eblake> 
http://libvirt.org/git/?p=libvirt-python.git;a=blob;f=examples/event-test.py;h=aa3c5a755ab046af9154eeb754241d07b25b01f0;hb=b5e36a39581dbb8f64a9891fcd976c58af7f1e1e
 
17:35 < eblake> conn.domainEventRegisterAny, with 
libvirt.VIR_DOMAIN_EVENT_ID_LIFECYCLE, is most likely what you want

I'm currently testing lv.registerCloseCallback (bc it was already
started) but I'm sure eblake's suggestion is the better one.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1329254

Title:
  VMs do not become inactive during the reboot on saucy  and later hosts

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1329254/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to