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 # Make sure that the VMs we think we're running actually are
for domain in self.domain_list: for domain in self.domain_list:
try: try:
dom = conn.getDomainByUUID(domain) buuid = uuid.UUID(domain).bytes
state = dom.state() dom = conn.lookupByUUID(buuid)
state = dom.state()[0]
if state != libvirt.VIR_DOMAIN_RUNNING: if state != libvirt.VIR_DOMAIN_RUNNING:
self.domain_list.remove(domain) self.domain_list.remove(domain)
except: except: