Example #1
0
        public void SaveState()
        {
            CheckProfileHasMaster();
            CheckProfileHasVM();

            Log(string.Format("Saving state and stopping VM '{0}'.", profile.VM));
            SaveStateRequest request = new SaveStateRequest()
            {
                Vm = profile.VM
            };

            GetMasterClient().SaveState(request);
        }
Example #2
0
        public SaveStateResponse SaveState(SaveStateRequest request)
        {
            log.InfoFormat("SaveState:\n  VM: {0}", request.Vm);

            string output;
            int    exitCode = ExecuteVBoxCommand("VBoxManage.exe",
                                                 string.Format("controlvm \"{0}\" savestate", request.Vm),
                                                 TimeSpan.FromSeconds(30),
                                                 out output);

            if (exitCode != 0)
            {
                throw OperationFailed(
                          "Failed to save the state and stop the virtual machine.",
                          ErrorDetails(exitCode, output));
            }

            return(new SaveStateResponse());
        }
Example #3
0
        public SaveStateResponse SaveState(SaveStateRequest request)
        {
            log.InfoFormat("SaveState:\n  VM: {0}", request.Vm);

            string output;
            int exitCode = ExecuteVBoxCommand("VBoxManage.exe",
                string.Format("controlvm \"{0}\" savestate", request.Vm),
                TimeSpan.FromSeconds(30),
                out output);

            if (exitCode != 0)
            {
                throw OperationFailed(
                    "Failed to save the state and stop the virtual machine.",
                    ErrorDetails(exitCode, output));
            }

            return new SaveStateResponse();
        }
Example #4
0
        public void SaveState()
        {
            CheckProfileHasMaster();
            CheckProfileHasVM();

            Log(string.Format("Saving state and stopping VM '{0}'.", profile.VM));
            SaveStateRequest request = new SaveStateRequest() { Vm = profile.VM };
            GetMasterClient().SaveState(request);
        }