From 12d21d645ca5236539bd9be64955f78ab4bb7eaf Mon Sep 17 00:00:00 2001 From: vanzhiganov Date: Sat, 21 May 2016 17:08:39 +0000 Subject: [PATCH] support QEMU --- cloud_node_agent.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cloud_node_agent.py b/cloud_node_agent.py index 217efb4..a02879f 100644 --- a/cloud_node_agent.py +++ b/cloud_node_agent.py @@ -144,11 +144,13 @@ while True: p['vm_id'], p['ssh_key'], ) + # Start virtual server after creation + qemu.QEMU().start(task['plain']['vm_id']) 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) - pass - finally: + else: nodeclient.task_status_update(task['id'], 2) # Start virtual machine if task.get('task') == 'vm_start':