apache/libcloud — pull request #106 by fitati (2013-05-15 20:36:59+00:00)
Title: Update libvirt_driver.py

in the management of virtual machines with libvirt, a machine has stopped ID = -1 and therefore we can never recover a blocked field through its ID, the solution is to look up the domain by its name or by its UUID, the solution I have used is the search domain with the name,
according to :
http://libvirt.org/html/libvirt-libvirt.html#virDomainLookupByID
virDomainLookupByID
virDomainPtr	virDomainLookupByID(virConnectPtr conn, int id)
Try to find a domain based on the hypervisor ID number Note that this won't work for inactive domains which have an ID of -1, in that case a lookup based on the Name or UUId need to be done instead