From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Pre-domain released event? Date: Mon, 14 Dec 2015 18:23:38 +0200 Message-ID: <566EED0A.70709@bitdefender.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org 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