Skip to contentSkip to conversation

Pre-domain released event?

DISCUSSION Razvan Cojocaru 1 participant 1 message Dec 14, 2015

lore
Share & tools
lore
#0 lore raw

Hello,

Currently, all the in-tree examples that figure out that a domain has been shut down subscribe to xenstore's @releaseDomain combined with an xs_is_domain_introduced() check. That works fine if you're only interested that the domain no longer exists. However, I'd like to be able to do some cleanup before a domain is suspended (on taking a snapshot, for example).

There are various degrees of tolerability doing this if I subscribe to various xenstore paths that disappear before @releaseDomain gets fired, and before the guest disappears, but it looks like it's not always foolproof.

I've previously asked the question in a somewhat more convoluted manner
here: http://lists.xen.org/archives/html/xen-devel/2015-08/msg00735.html

I'm still interested in what the best solution would be here. A new, blocking vm_event, that fires from the hypervisor immediately after it's decided that the guest will be shutdown is what comes to mind, but I'm not sure where the best place to put it would be. Or indeed if there another / better way to do this.

Thanks,
Razvan