Fix the handling a bit
This commit is contained in:
parent
5a0cd65561
commit
6e8bfd5741
|
@ -34,9 +34,11 @@ class VMInstance:
|
||||||
print("Starting VM %s" % self.domuuid)
|
print("Starting VM %s" % self.domuuid)
|
||||||
try:
|
try:
|
||||||
dom = conn.createXML(xmlconfig, 0)
|
dom = conn.createXML(xmlconfig, 0)
|
||||||
except libvirt.libvirtError:
|
except:
|
||||||
self.zk.set(self.zkey + '/status', 'stop'.encode('ascii'))
|
|
||||||
print('Failed to create domain %s' % self.domuuid)
|
print('Failed to create domain %s' % self.domuuid)
|
||||||
|
|
||||||
|
if dom == None:
|
||||||
|
self.zk.set(self.zkey + '/status', 'stop'.encode('ascii'))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if not self.domuuid in self.thishypervisor.domain_list:
|
if not self.domuuid in self.thishypervisor.domain_list:
|
||||||
|
|
Loading…
Reference in New Issue