You can use SSH client to get to management server and restart. Similar to this
try: sshClient = SshClient( self.mgtSvrDetails["mgtSvrIp"], 22, self.mgtSvrDetails["user"], self.mgtSvrDetails["passwd"], retries=1, log_lvl=logging.INFO ) result = sshClient.runCommand("/etc/init.d/cloudstack-management restart") if 'status' in result and result['status'] == 'SUCCESS' and 'stdout' in result and len(result['stdout']) > 0: exec_stdout = result['stdout'] except Exception: self.debug("Failed to ssh into mgmt server host and execute command") Don’t forget to wait enough for management server to come online after the restart. Thanks, Sergey