[libvirt] Event on domain state change

Stefan de Konink skinkie at xs4all.nl
Sat May 10 16:53:29 UTC 2008


On Sat, 10 May 2008, Daniel P. Berrange wrote:

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

If it was initiated by libvirt itself, I guess we can fire it after we
suddenly miss the domain. Destroy would be a direct miss that isn't marked
as crashed. (directly leads to the question: does libvirt clean up crashed
states?)

> 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.

I was thinking about implementing this TODO...

With a brainstorm session within our group I also pointed out it would be
pretty hard to find a 'within domain' initialised reboot/shutdown. Do you
have any clues on that one?


Stefan




More information about the libvir-list mailing list