Fix bug with lookup of uuid

This commit is contained in:
Joshua Boniface 2018-06-02 14:50:26 -04:00
parent fd7e240891
commit ef1acc0188
1 changed files with 3 additions and 2 deletions

View File

@ -94,8 +94,9 @@ class NodeInstance(threading.Thread):
# Make sure that the VMs we think we're running actually are
for domain in self.domain_list:
try:
dom = conn.getDomainByUUID(domain)
state = dom.state()
buuid = uuid.UUID(domain).bytes
dom = conn.lookupByUUID(buuid)
state = dom.state()[0]
if state != libvirt.VIR_DOMAIN_RUNNING:
self.domain_list.remove(domain)
except: