How to use the virtualbox.stop function in virtualbox

To help you get started, we’ve selected a few virtualbox examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github feup-infolab / dendro / src / utils / virtualbox / vm_manager.js View on Github external
virtualbox.isRunning(VirtualBoxManager.vmName, function (error, running)
        {
            if (isNull(error))
            {
                if (running)
                {
                    Logger.log("Stopping Virtualbox VM.");
                    virtualbox.stop(VirtualBoxManager.vmName, function startCallback (error)
                    {
                        if (isNull(error))
                        {
                            Logger.log("Stopped VM");
                        }
                        else
                        {
                            Logger.log("Failed to stop VM");
                            Logger.log("error", error);
                        }

                        callback(error);
                    });
                }
                else
                {
github azer / lowkick / lib / drivers / virtualbox.js View on Github external
function stop(vm, callback){
  virtualbox.stop(vm, function(vmError){
    if(vmError) {
      logging.error('Failed to stop VM "%s"', vm);
      callback(vmError);
      return;
    }

    server.stop();

    callback();
  });
}