Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
virtualbox.start(vm, function(error){
if(error){
logging.error('Failed to start VM "%s"', vm);
callback && callback(error);
return;
}
logging.debug('Executing VirtualBox command on VM "%s". Username: %s Password: %s', vm, username, passwd);
virtualbox.exec({ 'vm': vm, 'username': username, 'passwd': passwd, 'cmd': path, 'params': params }, function(error, stdout){
if(error){
logging.error(error);
}
callback && callback(error, stdout);
});
});
}