/**
  * @param VMConfig $VMConfig
  *
  * @return static
  */
 public static function init(VMConfig $VMConfig)
 {
     $server = $VMConfig->getServer();
     $manager = new static($server, $VMConfig->getUsername(), $VMConfig->getPassword(), $VMConfig->getConfig());
     if ($VMConfig->hasUseSudo()) {
         $manager->setUseSudo(true);
     }
     return $manager;
 }