Id = $Id; $this->LogFile = $this->LogFile.'.'.$this->Id.'.log'; } function create() { exec('vzctl create '.$this->Id.' 1> '.$this->LogFile,$output,$this->LastReturn); return $this->LastReturn; } function start() { exec('vzctl start '.$this->Id.' 1> '.$this->LogFile,$output,$this->LastReturn); return $this->LastReturn; } function stop() { exec('vzctl stop '.$this->Id.' 1> '.$this->LogFile,$output,$this->LastReturn); return $this->LastReturn; } function restart() { exec('vzctl restart '.$this->Id.' 1> '.$this->LogFile,$output,$this->LastReturn); return $this->LastReturn; } function destroy() { exec('vzctl destroy '.$this->Id.' 1> '.$this->LogFile,$output,$this->LastReturn); return $this->LastReturn; } function exec($command) { exec('vzctl create '.$this->Id.' '.$command.' 1> '.$this->LogFile,$output,$this->LastReturn); return $this->LastReturn; } function GetId() { return $this->Id; } } ?>