[libvirt] [libvirt-php] About the inconsistency in libvirt-php
Michal Novotny
minovotn at redhat.com
Tue Feb 22 07:01:54 UTC 2011
On 02/22/2011 05:12 AM, Lyre wrote:
>
> WARNING: In previous releases of libvirt-php, the function
> libvirt_list_defined_domains()
> was returning the wrong kind of information. It
> *should* have been showing all
> persistent domains, both active and inactive. However
> it was instead showing
> just inactive domains.
>
>
> Hi justin, Is there a way to list the "defined/persistent" domains in
> libvirt?
> virConenctListDefinedDomains() doesn't behavior like that.
>
> I'm really amazed, the behavior of "defined" in libvirt development
> guide seems to be equivalent to "inactive".
> But you guys told me there are different, it refer to the persistent
> domains.
From my understanding virConnectListActiveDomains() is listing all the
active (running) domains and virConnectListDefinedDomains() is listing
all the inactive domains that are defined since if we create a domain
directly from XML, i.e. non-persistent, we have the domain in active
domains list but it's not defined. Only inactive but defined domains are
in the defined list AFAIK.
If we have 2 domains created *directly* from XML file, 3 persistent
domains active and 4 domains inactive (but defined) we should be getting
number 5 from virConnectListActiveDomains() since 2 + 3. For defined
(inactive) domains we should be getting number for and total number
should be 2 + 3 + 4 = 9 domains.
Michal
--
Michal Novotny<minovotn at redhat.com>, RHCE
Virtualization Team (xen userspace), Red Hat
More information about the libvir-list
mailing list