This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Domains not being destroyed properly

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Domains not being destroyed properly
From: Anthony Wright <anthony@xxxxxxxxxxxxxxx>
Date: Tue, 21 Jun 2011 17:04:12 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Tue, 21 Jun 2011 09:06:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1308671090.6920.89.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4DFB3A90.70707@xxxxxxxxxxxxxxx> <1308657108.6920.25.camel@xxxxxxxxxxxxxxxxxxxxxx> <4E009530.2040108@xxxxxxxxxxxxxxx> <20110621133908.GE5650@xxxxxxxxxxxx> <4E00B019.5090108@xxxxxxxxxxxxxxx> <1308671090.6920.89.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv: Gecko/20110414 Thunderbird/3.1.10
On 21/06/2011 16:44, Ian Campbell wrote:
> On Tue, 2011-06-21 at 15:52 +0100, Anthony Wright wrote:
>> Ok, to be clear what I did....
>> xl create -e domain-details
>> xl shutdown <domain>
>> (End up with a domain called (null) in state --ps-d according to xl list
>> kill the qemu-dm process associated with the domain
>> the domain goes away
>> note that I didn't need to do an 'xl destroy' the kill of qemu-dm was
>> sufficient
>> If I do....
>> xl create -e domain-details
>> xl destroy <domain>
>> the domain goes away
> The difference is that shutdown is only a request to the guest to shut
> itself down, while destroy is the big hammer which kills the guest with
> prejudice and tidies up any detritus (or at least that is the intention
> IIRC).
> I suspect that you will probably find that only the hypervisor parts of
> the domain are being cleaned up by killing qemu -- e.g. the xenstore
> entries and some other stuff (e.g. libxl user data) are not being
> cleaned up.
> If you do:
> xl create -e domain-details
> xl shutdown <domain>
> xl destroy <domain>
> Does everything get cleaned up?
If I do:
xl create -e domain-details
xl shutdown <domain>
[ Wait for the domain to go to state --ps-d ]
xl destroy <domain>

The 'xl destroy' has no effect. The only thing that has an effect is
killing the qemu-dm processes which destroys the domain even without
running 'xl destroy'.

> If you don't want to run an xl daemon for each domain (although I agree
> with IanJ that they should be pretty cheap) I think a new xl sub-command
> which caused it to behave as a single daemon reaping domains would be a
> fine thing to have in our toolkit.
That would be really helpful, something that would inform me when a
domain died supplying it's domain id & domain name - the name is really
important because that's my reference, and I can't convert from an
domain id to a domain name after the domain has died. I used to have a
script that sat in /etc/xen/scripts/domain-destroyed which was called on
domain death with the dom-id and dom-name as arguments.


Xen-devel mailing list