Re: [libvirt] Event on domain state change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 10, 2008 at 06:12:23PM +0200, Stefan de Konink wrote:
> Hi,
> 
> In the TODO list I find this line:
> 
> - event on big domain state change (create, crashed, paused, shutdown,
> destroy)
> 
> 
> Because this is a feature that is very useful, I first wonder how libvirt
> reliably get 'events' itself for example from Xen? From what I can read
> from xen_internal there is a xenHypervisorGetDomInfo function, but this
> function should be scheduled in order to see event changes. Even if so,
> can we be 'quick' enough to detect a destroy? Or determine the difference
> between a shutdown and a destroy?

I don't believe it is possible to distinguish shutdown vs destroy reliably.

For QEMU we can trivially get 'events' for create/paused/destroy etc since
we're in direct control of QEMU. 

Xen is a little more tricky - we'd have to register watches against xenstore
to get events back.


In the absence of this support in libvirt you can infer events by periodically
sampling  virDomainGetInfo and tracking changes in the state - though of
course you can miss some intermediate states. This is what virt-manager does
for event tracking.


Dan.
-- 
|: Red Hat, Engineering, Boston   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]