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:<br><br><div>def list_instances(self):</div><div>    return [self._conn.lookupByID(x).name()</div>
<div>            for x in self._conn.listDomainsID()</div><div>            if x != 0]</div><br>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?<br>
<br><div class="gmail_quote">Em 12 de janeiro de 2012 19:55, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>></span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Jan 12, 2012 at 07:36:59PM -0200, Rogério Vinhal Nunes wrote:<br>
> I really need some help in getting this to work. This seems pretty simple,<br>
> just tell nova-compute to ignore any instance named Domain-0 (actually it<br>
> could ignore any instance not named 'instance-XXXXXXXX'). As there is a<br>
> libvirt type to connect to xen, it is in openstack interest to fix this. As<br>
> I did make it work with a flawed old libvirt in Ubuntu 10.04, this seems<br>
> close to working.<br>
<br>
</div>To be generally applicable to any libvirt driver, you should check for<br>
domain ID == 0.  Libvirt reserves the domain ID 0, to refer to the VM<br>
representing the host OS, if any. This is why all LXC/KVM guests start<br>
from number 1 instead.<br>
<br>
Regards,<br>
Daniel<br>
<span class="HOEnZb"><font color="#888888">--<br>
|: <a href="http://berrange.com" target="_blank">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a> :|<br>
|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/%7Edanberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: <a href="http://entangle-photo.org" target="_blank">http://entangle-photo.org</a>       -o-       <a href="http://live.gnome.org/gtk-vnc" target="_blank">http://live.gnome.org/gtk-vnc</a> :|<br>
</font></span></blockquote></div><br>