Fix bug with lookup of uuid
This commit is contained in:
parent
fd7e240891
commit
ef1acc0188
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue