Hi Axel:

I believe it is because I use:

  # xm new /etc/xen/<domain>.cfg
  # xm start <domain>
  # xm shutdown <domain>

Which leaves the domain in xen's domain list. Reading other docs,
tutorial and such, I believe most people use:

  # xm create /etc/xen/<domain>.cfg   # create + boot at once
  # xm destroy <domain>

Obviously there are slight differences in the semantics of the new and
create commands. But I'm not completely sure I understand which.
Reading the manual page it would seem they are strictly equivalent,
but it also looks like the part documenting the new command is just a
plain kill/yank of the create one (e.g. it shows the -c option which
makes no sense).

Another way to see the problem is that since xen-tools never operates
on the machines only builds their disks and configuration file, you
should only warn the user that it has not deleted (issued an xm delete
<domain> command), not that the machine is running. It would be more
consistent with the whole xen-tools stack behaviour and provide a more
helpful information.

Regards,

2013/3/21 Axel Beckert <a...@debian.org>:
> Hi Nicolas,
>
> Nicolas Caniart wrote:
>>   The xenRunning function used by xen-delete-image to detect if the
>> guest to delete is running uses the xm list command. Yet that
>> particular command displays all created guests not only those
>> running. There is a --state option that should be used to check the
>> machines status.
>>
>> Here are sample output from one of our Dom0:
>>
>>  # xm list
>>   Name                                        ID   Mem VCPUs      State
>> Time(s)
>>   Domain-0                                     0  1023     8     r-----
>> 208.0
>>   machine0.subdomain.domain.tld                1  1024     1     -b----
>> 768.7
>>   machine1.subdomain.domain.tld                    256     1
>> 0.0
>>   machine2.subdomain.domain.tld                2   512     1     -b----
>> 38.3
>>   machine3.subdomain.domain.tld                   2096     2
>> 0.0
>>   machine4.subdomain.domain.tld                   1024     1
>> 3.8
>>   machine5.subdomain.domain.tld                   1024     2
>> 113.7
>>   machine6.subdomain.domain.tld                   1024     1
>> 5.2
>>   machine7.subdomain.domain.tld                    512     1
>> 0.0
>>   machine8.subdomain.domain.tld                   4096     3
>> 0.0
>
> Hrm. I've never seen cases where the State column is empty. From the
> xm man page on wheezy I can't get an idea how that can happen either.
>
> How did you create these non-running DomUs?
>
>>  # xm list --state running
>>   Name                                        ID   Mem VCPUs      State
>> Time(s)
>>   Domain-0                                     0  1023     8     r-----
>> 208.0
>>   machine0.subdomain.domain.tld                1  1024     1     -b----
>> 768.7
>>   machine2.subdomain.domain.tld                2   512     1     -b----
>> 38.3
>>
>> Note that 'running' may not be the only state to check and that the --state
>> option does not seem to accept mulptiple states (e.g. like in --state
>> running,dying
>
> "paused" is likely to be relevant, too.
>
>                 Regards, Axel
> --
>  ,''`.  |  Axel Beckert <a...@debian.org>, http://people.debian.org/~abe/
> : :' :  |  Debian Developer, ftp.ch.debian.org Admin
> `. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
>   `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to