support QEMU
This commit is contained in:
parent
f665da032a
commit
12d21d645c
1 changed files with 5 additions and 3 deletions
|
@ -144,11 +144,13 @@ while True:
|
||||||
p['vm_id'],
|
p['vm_id'],
|
||||||
p['ssh_key'],
|
p['ssh_key'],
|
||||||
)
|
)
|
||||||
|
# Start virtual server after creation
|
||||||
|
qemu.QEMU().start(task['plain']['vm_id'])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# TODO: back to origin task status
|
# back to origin task status
|
||||||
|
nodeclient.task_status_update(task['id'], 0)
|
||||||
logging.warning(e)
|
logging.warning(e)
|
||||||
pass
|
else:
|
||||||
finally:
|
|
||||||
nodeclient.task_status_update(task['id'], 2)
|
nodeclient.task_status_update(task['id'], 2)
|
||||||
# Start virtual machine
|
# Start virtual machine
|
||||||
if task.get('task') == 'vm_start':
|
if task.get('task') == 'vm_start':
|
||||||
|
|
Loading…
Add table
Reference in a new issue