← Back to team overview

openstack team mailing list archive

Re: Nova is considering Xen Domain-0 as instance

 

On Mon, Jan 16, 2012 at 10:29:19AM -0200, Rogério Vinhal Nunes wrote:
> As Daniel suggested, I just ignored the ID == 0 and it seems to work fine
> now. The resulting code is even simpler than suggested by Vish:
> 
> def list_instances(self):
>     return [self._conn.lookupByID(x).name()
>             for x in self._conn.listDomainsID()
>             if x != 0]
> 
> this is more of a design decision. So is this the correct approach to
> correct this bug or for the record it should be done in another way?

Speaking as a libvirt maintainer, using Domain ID == 0 as you do here,
is the best recommendation we have.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


References