[libvirt] some unsorted questions

Cole Robinson crobinso at redhat.com
Thu Jul 17 14:22:05 UTC 2008


Daniel P. Berrange wrote:
> On Thu, Jul 17, 2008 at 01:29:45AM +0200, Stefan de Konink wrote:
>> If this gets implemented I would suggest a call that fetches all domains 
>> from a running system and not only the defined or only the active ones.
> 
> This is a good idea regardless. The current APIs require an application
> todo
> 
>    num = list number of domains
>    for 1 to num
>        lookup domain by id
> 
> In the case of the Xen drivers, this requires  O(n) calls to XenD which
> are rather expensive. XenD does actually have ability to return data about
> all domains in a single request. So if we had an API for fetching all
> domains at once it'd only require  O(1)  expensive XenD calls. I'd imagine
> something like this
> 
> 
>     int virConnectListAllDomains(virConnectPtr conn,
>                                  virDomainPtr **domains,
>                                  int stateflags);

I've thought about something similar as well. It would also be useful to
have a command like ListUUIDs with similar state flags, giving apps a
more light weight manner of polling for domain state changes (ex.
virt-manager)

- Cole




More information about the libvir-list mailing list