def rebootVM(vmid, vm): try: # Just try to reboot HdManager.rebootHook(vm) KVMManager.rebootDomain(vm) KVMProvisioningDispatcher.logger.info("VM named " + vm.name + " has been rebooted.") # Send async notification XmlRpcClient.sendAsyncProvisioningActionStatus(vmid, "SUCCESS", "") except Exception as e: KVMProvisioningDispatcher.logger.error(str(e)) # Send async notification XmlRpcClient.sendAsyncProvisioningActionStatus(vmid, "FAILED", str(e)) return