Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
VirtualBoxManager.stopVM(function (err, result)
{
if (isNull(err))
{
virtualbox.snapshotRestore(VirtualBoxManager.vmName, checkpointName, function (err, output)
{
if (isNull(err))
{
VirtualBoxManager.startVM(function (err, result)
{
if (isNull(err))
{
console.log("Snapshot has been restored!");
console.log("UUID: ", output);
callback(null, true);
}
else
{
Logger.log("error", err);
Logger.log("error", result);
callback(err);