Set state back to start after restart

This commit is contained in:
Joshua Boniface 2018-06-13 12:55:07 -04:00
parent cf6cc9ff8a
commit 51843cf911
1 changed files with 1 additions and 1 deletions

View File

@ -107,8 +107,8 @@ class VMInstance:
ansiiprint.echo('Successfully restarted VM', '{}:'.format(self.domuuid), 'o') ansiiprint.echo('Successfully restarted VM', '{}:'.format(self.domuuid), 'o')
except libvirt.libvirtError as e: except libvirt.libvirtError as e:
ansiiprint.echo('Failed to restart VM', '{}:'.format(self.domuuid), 'e') ansiiprint.echo('Failed to restart VM', '{}:'.format(self.domuuid), 'e')
self.zk.set('/domains/{}/state'.format(self.domuuid), 'start'.encode('ascii'))
self.zk.set('/domains/{}/state'.format(self.domuuid), 'start'.encode('ascii'))
conn.close() conn.close()
self.inrestart = False self.inrestart = False