initParams(); $this->initServices(); $this->setHostingId($this->getWhmcsParamByKey("serviceid")); try{ if(!$this->vm()->isRunning()){ $this->log->info(sprintf("VM %s - Start", $this->vm()->getVmid())); $this->vm()->start(); $this->sleep(40); return false; } $this->vm()->agent()->ping(); $this->agentService->configureNetwork(); }catch (ProxmoxApiException $ex){ if(preg_match("/not running/", $ex->getMessage())){ $this->log->info($ex->getMessage()); }else{ $this->log->error($ex->getMessage()); } //sleep $this->sleep(30); return false; } } }