How to use the virtualbox.snapshotRestore 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
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);