Re: [libvirt] some unsorted questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 17, 2008 at 10:22:05AM -0400, Cole Robinson wrote:
> 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)

A plain ListUUIDs wouldn't be any more efficient - we'd still have to
hit either Xenstore or XenD to get the listing, and once you're doing
that you may as well return the name & ID too in a virDomainPtr object

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]