Changeset 91363 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Sep 24, 2021 1:08:32 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r91326 r91363 1581 1581 HRESULT Console::i_loadDataFromSavedState() 1582 1582 { 1583 if ( mMachineState != MachineState_Saved|| mSavedStateDataLoaded)1583 if ((mMachineState != MachineState_Saved && mMachineState != MachineState_AbortedSaved) || mSavedStateDataLoaded) 1584 1584 return S_OK; 1585 1585 … … 2182 2182 /* extra nice error message for a common case */ 2183 2183 case MachineState_Saved: 2184 case MachineState_AbortedSaved: 2184 2185 return setError(VBOX_E_INVALID_VM_STATE, tr("Cannot power down a saved virtual machine")); 2185 2186 case MachineState_Stopping: … … 2965 2966 2966 2967 /// @todo see @todo in AttachUSBDevice() about the Paused state 2967 if (mMachineState == MachineState_Saved )2968 if (mMachineState == MachineState_Saved || mMachineState == MachineState_AbortedSaved) 2968 2969 return setError(VBOX_E_INVALID_VM_STATE, 2969 tr("Cannot create a transient shared folder on the machine in the saved state")); 2970 tr("Cannot create a transient shared folder on a machine in a saved state (machine state: %s)"), 2971 Global::stringifyMachineState(mMachineState)); 2970 2972 if ( mMachineState != MachineState_PoweredOff 2971 2973 && mMachineState != MachineState_Teleported … … 3036 3038 3037 3039 /// @todo see @todo in AttachUSBDevice() about the Paused state 3038 if (mMachineState == MachineState_Saved )3040 if (mMachineState == MachineState_Saved || mMachineState == MachineState_AbortedSaved) 3039 3041 return setError(VBOX_E_INVALID_VM_STATE, 3040 tr("Cannot remove a transient shared folder from the machine in the saved state")); 3042 tr("Cannot remove a transient shared folder from a machine in a saved state (machine state: %s)"), 3043 Global::stringifyMachineState(mMachineState));; 3041 3044 if ( mMachineState != MachineState_PoweredOff 3042 3045 && mMachineState != MachineState_Teleported … … 7705 7708 pPowerupProgress.createObject(); 7706 7709 Bstr progressDesc; 7707 if (mMachineState == MachineState_Saved )7710 if (mMachineState == MachineState_Saved || mMachineState == MachineState_AbortedSaved) 7708 7711 progressDesc = tr("Restoring virtual machine"); 7709 7712 else if (fTeleporterEnabled) … … 7717 7720 * Saved VMs will have to prove that their saved states seem kosher. 7718 7721 */ 7719 if (mMachineState == MachineState_Saved )7722 if (mMachineState == MachineState_Saved || mMachineState == MachineState_AbortedSaved) 7720 7723 { 7721 7724 rc = mMachine->COMGETTER(StateFilePath)(savedStateFile.asOutParam()); … … 7784 7787 task->mSharedFolders = sharedFolders; 7785 7788 task->mStartPaused = aPaused; 7786 if (mMachineState == MachineState_Saved )7789 if (mMachineState == MachineState_Saved || mMachineState == MachineState_AbortedSaved) 7787 7790 try { task->mSavedStateFile = savedStateFile; } 7788 7791 catch (std::bad_alloc &) { throw rc = E_OUTOFMEMORY; } … … 7928 7931 } 7929 7932 else if ( mMachineState == MachineState_Saved 7933 || mMachineState == MachineState_AbortedSaved 7930 7934 || !fTeleporterEnabled) 7931 7935 { … … 8042 8046 * since we've already started the thread and it is now responsible for 8043 8047 * any error reporting and appropriate state change! */ 8044 if (mMachineState == MachineState_Saved )8048 if (mMachineState == MachineState_Saved || mMachineState == MachineState_AbortedSaved) 8045 8049 i_setMachineState(MachineState_Restoring); 8046 8050 else if (fTeleporterEnabled) … … 8964 8968 case MachineState_Restoring: 8965 8969 /* failed to load the saved state file, but be patient: set 8966 * back toSaved (to preserve the saved state file) */8967 that->i_setMachineState(MachineState_ Saved);8970 * to AbortedSaved (to preserve the saved state file) */ 8971 that->i_setMachineState(MachineState_AbortedSaved); 8968 8972 break; 8969 8973 case MachineState_TeleportingIn:
Note:
See TracChangeset
for help on using the changeset viewer.