[libvirt] Just to make sure I understand the API

Matthias Bolte matthias.bolte at googlemail.com
Sun Jan 10 12:20:38 UTC 2010


2010/1/9 Bryan Kearney <bkearney at redhat.com>:
> To make sure I understand the API. If I have a domain defined, but not
> started.. it will show up in the list returned by:
>
> virConnectListDefinedDomains
>
> but not in the list
>
> virConnectListDomains
>
> Conversely, if it is started... it will only be in the list:
>
> virConnectListDomains
>
> not in the list
>
> virConnectListDefinedDomains
>
>
> Is that correct?
>
> -- bk
>

Yes, that's the correct behavior of these functions.
virConnectListDefinedDomains list domains that are inactive but
defined and virConnectListDomains lists domains that are active.

If you combine the output of both functions then you get the complete
list of domains libvirt knows about for a given host.

Matthias




More information about the libvir-list mailing list