Changeset 91363 in vbox
- Timestamp:
- Sep 24, 2021 1:08:32 PM (3 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostartUtils.cpp
r83797 r91363 48 48 case MachineState_Aborted: 49 49 return "aborted"; 50 case MachineState_AbortedSaved: 51 return "aborted-saved"; 50 52 case MachineState_Running: 51 53 return "running"; -
trunk/src/VBox/Frontends/VBoxBalloonCtrl/VBoxModAPIMonitor.cpp
r83798 r91363 137 137 case MachineState_Saved: 138 138 return "saved"; 139 case MachineState_Teleported: 140 return "teleported"; 139 141 case MachineState_Aborted: 140 142 return "aborted"; 141 case MachineState_ Teleported:142 return " teleported";143 case MachineState_AbortedSaved: 144 return "aborted-saved"; 143 145 case MachineState_Running: 144 146 return "running"; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r91326 r91363 157 157 case MachineState_Aborted: 158 158 return "aborted"; 159 case MachineState_AbortedSaved: 160 return "aborted-saved"; 159 161 case MachineState_Running: 160 162 return "running"; -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r86650 r91363 480 480 if ( machineState == MachineState_Aborted 481 481 || machineState == MachineState_Teleported 482 || (machineState == MachineState_Saved && !m_fIgnorePowerOffEvents) 483 || (machineState == MachineState_PoweredOff && !m_fIgnorePowerOffEvents) 482 || (machineState == MachineState_Saved && !m_fIgnorePowerOffEvents) 483 || (machineState == MachineState_AbortedSaved && !m_fIgnorePowerOffEvents) 484 || (machineState == MachineState_PoweredOff && !m_fIgnorePowerOffEvents) 484 485 ) 485 486 { … … 615 616 case MachineState_Teleported: return "Teleported"; 616 617 case MachineState_Aborted: return "Aborted"; 618 case MachineState_AbortedSaved: return "Aborted-Saved"; 617 619 case MachineState_Running: return "Running"; 618 620 case MachineState_Teleporting: return "Teleporting"; … … 1892 1894 MachineState_T machineState; 1893 1895 gpMachine->COMGETTER(State)(&machineState); 1894 if (machineState == MachineState_Saved )1896 if (machineState == MachineState_Saved || machineState == MachineState_AbortedSaved) 1895 1897 { 1896 1898 CHECK_ERROR(gpMachine, DiscardSavedState(true /* fDeleteFile */)); … … 3079 3081 */ 3080 3082 if ( gpMachine 3081 && machineState != MachineState_Saved) 3083 && machineState != MachineState_Saved 3084 && machineState != MachineState_AbortedSaved) 3082 3085 { 3083 3086 rc = gpMachine->DiscardSettings(); -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp
r89549 r91363 99 99 case KMachineState_PoweredOff: return QColor(Qt::gray); 100 100 case KMachineState_Saved: return QColor(Qt::yellow); 101 case KMachineState_Teleported: return QColor(Qt::red); 101 102 case KMachineState_Aborted: return QColor(Qt::darkRed); 102 case KMachineState_ Teleported: return QColor(Qt::red);103 case KMachineState_AbortedSaved: return QColor(Qt::yellow); 103 104 case KMachineState_Running: return QColor(Qt::green); 104 105 case KMachineState_Paused: return QColor(Qt::darkGreen); … … 135 136 case KMachineState_PoweredOff: return UIIconPool::iconSet(":/state_powered_off_16px.png"); 136 137 case KMachineState_Saved: return UIIconPool::iconSet(":/state_saved_16px.png"); 138 case KMachineState_Teleported: return UIIconPool::iconSet(":/state_saved_16px.png"); 137 139 case KMachineState_Aborted: return UIIconPool::iconSet(":/state_aborted_16px.png"); 138 case KMachineState_ Teleported:return UIIconPool::iconSet(":/state_saved_16px.png");140 case KMachineState_AbortedSaved: return UIIconPool::iconSet(":/state_saved_16px.png"); 139 141 case KMachineState_Running: return UIIconPool::iconSet(":/state_running_16px.png"); 140 142 case KMachineState_Paused: return UIIconPool::iconSet(":/state_paused_16px.png"); … … 171 173 case KMachineState_PoweredOff: return QApplication::translate("UICommon", "Powered Off", "MachineState"); 172 174 case KMachineState_Saved: return QApplication::translate("UICommon", "Saved", "MachineState"); 175 case KMachineState_Teleported: return QApplication::translate("UICommon", "Teleported", "MachineState"); 173 176 case KMachineState_Aborted: return QApplication::translate("UICommon", "Aborted", "MachineState"); 174 case KMachineState_ Teleported: return QApplication::translate("UICommon", "Teleported", "MachineState");177 case KMachineState_AbortedSaved: return QApplication::translate("UICommon", "Aborted-Saved", "MachineState"); 175 178 case KMachineState_Running: return QApplication::translate("UICommon", "Running", "MachineState"); 176 179 case KMachineState_Paused: return QApplication::translate("UICommon", "Paused", "MachineState"); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r91341 r91363 1301 1301 || enmState == KMachineState_Teleported 1302 1302 || enmState == KMachineState_Aborted 1303 || enmState == KMachineState_AbortedSaved 1303 1304 , ("Machine must be PoweredOff/Saved/Teleported/Aborted (%d)", enmState)); 1304 1305 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r91104 r91363 2498 2498 || enmState == KMachineState_Teleported 2499 2499 || enmState == KMachineState_Aborted 2500 || enmState == KMachineState_AbortedSaved 2500 2501 , ("Machine must be PoweredOff/Saved/Teleported/Aborted (%d)", enmState)); 2501 2502 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.cpp
r91125 r91363 97 97 || m_enmMachineState == KMachineState_Teleported 98 98 || m_enmMachineState == KMachineState_Aborted 99 || m_enmMachineState == KMachineState_AbortedSaved 99 100 ) 100 101 { … … 184 185 { 185 186 return accessible() 186 && machineState() == KMachineState_Saved; 187 && ( machineState() == KMachineState_Saved 188 || machineState() == KMachineState_AbortedSaved); 187 189 } 188 190 … … 193 195 || machineState() == KMachineState_Saved 194 196 || machineState() == KMachineState_Teleported 195 || machineState() == KMachineState_Aborted); 197 || machineState() == KMachineState_Aborted 198 || machineState() == KMachineState_AbortedSaved); 196 199 } 197 200 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
r89253 r91363 100 100 && enmState != KMachineState_Saved 101 101 && enmState != KMachineState_Teleported 102 && enmState != KMachineState_Aborted; 102 && enmState != KMachineState_Aborted 103 && enmState != KMachineState_AbortedSaved; 103 104 } 104 105 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIMachinePreview.cpp
r82968 r91363 246 246 /* If machine is in SAVED/RESTORING state: */ 247 247 case KMachineState_Saved: 248 case KMachineState_AbortedSaved: 248 249 case KMachineState_Restoring: 249 250 { -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumItem.cpp
r91221 r91363 146 146 continue; 147 147 if (comMachine.GetState() != KMachineState_PoweredOff && 148 comMachine.GetState() != KMachineState_Aborted) 148 comMachine.GetState() != KMachineState_Aborted && 149 comMachine.GetState() != KMachineState_AbortedSaved) 149 150 return false; 150 151 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r91132 r91363 445 445 return; 446 446 bool fMediumIsModifiable = true; 447 if (state != KMachineState_Aborted && state != KMachineState_PoweredOff )447 if (state != KMachineState_Aborted && state != KMachineState_PoweredOff && state != KMachineState_AbortedSaved) 448 448 fMediumIsModifiable = false; 449 449 m_pDetailsWidget->enableDisableMediumModificationWidgets(fMediumIsModifiable); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r91179 r91363 517 517 case KMachineState_Teleported: 518 518 case KMachineState_Aborted: 519 case KMachineState_AbortedSaved: 519 520 { 520 521 /* If not in 'manual-override' mode: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r91169 r91363 927 927 /* Processing pseudo resize-event to synchronize frame-buffer with stored framebuffer size. 928 928 * On X11 this will be additional done when the machine state was 'saved'. */ 929 if (machine().GetState() == KMachineState_Saved )929 if (machine().GetState() == KMachineState_Saved || machine().GetState() == KMachineState_AbortedSaved) 930 930 size = guestScreenSizeHint(); 931 931 #endif /* VBOX_WS_X11 */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r91169 r91363 175 175 && !(( m_machineState == KMachineState_PoweredOff 176 176 || m_machineState == KMachineState_Aborted 177 || m_machineState == KMachineState_AbortedSaved 177 178 || m_machineState == KMachineState_Teleported) 178 179 && machine().GetTeleporterEnabled())) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r90925 r91363 162 162 UIVisualStateType requestedVisualState() const; 163 163 164 bool isSaved() const { return machineState() == KMachineState_Saved; } 164 bool isSaved() const { return machineState() == KMachineState_Saved || 165 machineState() == KMachineState_AbortedSaved; } 165 166 bool isTurnedOff() const { return machineState() == KMachineState_PoweredOff || 166 167 machineState() == KMachineState_Saved || 167 168 machineState() == KMachineState_Teleported || 168 machineState() == KMachineState_Aborted; } 169 machineState() == KMachineState_Aborted || 170 machineState() == KMachineState_AbortedSaved; } 169 171 bool isPaused() const { return machineState() == KMachineState_Paused || 170 172 machineState() == KMachineState_TeleportingPausedVM; } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r91109 r91363 396 396 397 397 /* If previous machine-state was NOT SAVED => normalize window to the optimal-size: */ 398 if (machine().GetState() != KMachineState_Saved )398 if (machine().GetState() != KMachineState_Saved && machine().GetState() != KMachineState_AbortedSaved) 399 399 normalizeGeometry(false /* adjust position */, shouldResizeToGuestDisplay()); 400 400 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.cpp
r82968 r91363 33 33 ConfigurationAccessLevel_Full : 34 34 ConfigurationAccessLevel_Partial_PoweredOff; 35 case KMachineState_AbortedSaved: 35 36 case KMachineState_Saved: return ConfigurationAccessLevel_Partial_Saved; 36 37 case KMachineState_Running: -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotPane.cpp
r91128 r91363 1470 1470 || enmState == KMachineState_Saved 1471 1471 || enmState == KMachineState_Aborted 1472 || enmState == KMachineState_AbortedSaved 1472 1473 || enmState == KMachineState_Running 1473 1474 || enmState == KMachineState_Paused; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp
r91260 r91363 95 95 uUuid = machine.GetId(); 96 96 fEnabled = machine.GetSessionState() == KSessionState_Unlocked; 97 fInSaveState = machine.GetState() == KMachineState_Saved ;97 fInSaveState = machine.GetState() == KMachineState_Saved || machine.GetState() == KMachineState_AbortedSaved; 98 98 } 99 99 else -
trunk/src/VBox/Main/cbinding/tstCAPIGlue.c
r83828 r91363 74 74 case MachineState_Teleported: return "Teleported"; 75 75 case MachineState_Aborted: return "Aborted"; 76 case MachineState_AbortedSaved: return "Aborted-Saved"; 76 77 case MachineState_Running: return "Running"; 77 78 case MachineState_Paused: return "Paused"; … … 181 182 || state == MachineState_Teleported 182 183 || state == MachineState_Aborted 184 || state == MachineState_AbortedSaved 183 185 ) 184 186 g_fStop = 1; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r91326 r91363 653 653 +-> PoweredOff --+-->[powerUp()]--> Starting --+ | +-----[resume()]-----+ 654 654 | | | | V | 655 | Aborted -----+ +--> Running --[pause()]--> Paused655 | Aborted <----+ +--> Running --[pause()]--> Paused 656 656 | | ^ | ^ | 657 | Saved -----------[powerUp()]--> Restoring -+ | | | | 657 | AbortedSaved <-----------[failure]-----<----+ | | | | 658 | | | | | | | 659 | +-------------+ | | | | | 660 | V | | | | | 661 | Saved --------[powerUp()]-----> Restoring -+ | | | | 658 662 | ^ | | | | 659 663 | | +-----------------------------------------+-|-------------------+ + … … 666 670 </pre> 667 671 668 Note that states to the right from PoweredOff, Aborted and Saved in the669 above diagram are called <i>online VM states</i>. These states670 represent the virtual machine which is being executed in a dedicated671 process (usually with a GUI window attached to it where you can see the672 activity of the virtual machine and interact with it). There are two673 special pseudo-states, FirstOnline and LastOnline, that can be used in674 relational expressions to detect if the given machine state is online or675 not:672 Note that states to the right of PoweredOff, Aborted, AbortedSaved, and 673 Saved in the above diagram are called <i>online VM states</i>. These 674 states represent the virtual machine which is being executed in a 675 dedicated process (usually with a GUI window attached to it where you can 676 see the activity of the virtual machine and interact with it). There are 677 two special pseudo-states, FirstOnline and LastOnline, that can be used 678 in relational expressions to detect if the given machine state is online 679 or not: 676 680 677 681 <pre> … … 708 712 virtual machine execution and therefore are shown separately. The states 709 713 shown on these diagrams are called <i>offline VM states</i> (this includes 710 PoweredOff, Aborted and Saved too).714 PoweredOff, Aborted, AbortedSaved and Saved too). 711 715 712 716 The first diagram shows what happens when a lengthy setup operation is … … 785 789 </desc> 786 790 </const> 787 <const name="Running" value="5"> 791 <const name="AbortedSaved" value="5"> 792 <desc> 793 A machine in the @c Saved stated has terminated abnormally before 794 reaching the @c Running state. Similar to the @c Aborted state, 795 this may indicate a crash of the VM process in host execution 796 context, or the VM process has been terminated externally. 797 </desc> 798 </const> 799 800 <const name="Running" value="6"> 788 801 <desc> 789 802 The machine is currently being executed. … … 797 810 </desc> 798 811 </const> 799 <const name="Paused" value=" 6">812 <const name="Paused" value="7"> 800 813 <desc> 801 814 Execution of the machine has been paused. … … 809 822 </desc> 810 823 </const> 811 <const name="Stuck" value=" 7">824 <const name="Stuck" value="8"> 812 825 <desc> 813 826 Execution of the machine has reached the "Guru Meditation" … … 820 833 </desc> 821 834 </const> 822 <const name="Teleporting" value=" 8">835 <const name="Teleporting" value="9"> 823 836 <desc> 824 837 The machine is about to be teleported to a different host or process. … … 828 841 </desc> 829 842 </const> 830 <const name="LiveSnapshotting" value=" 9">843 <const name="LiveSnapshotting" value="10"> 831 844 <desc> 832 845 A live snapshot is being taken. The machine is running normally, but … … 837 850 </desc> 838 851 </const> 839 <const name="Starting" value="1 0">852 <const name="Starting" value="11"> 840 853 <desc> 841 854 Machine is being started after powering it on from a … … 843 856 </desc> 844 857 </const> 845 <const name="Stopping" value="1 1">858 <const name="Stopping" value="12"> 846 859 <desc> 847 860 Machine is being normally stopped powering it off, or after the guest OS … … 849 862 </desc> 850 863 </const> 851 <const name="Saving" value="1 2">864 <const name="Saving" value="13"> 852 865 <desc> 853 866 Machine is saving its execution state to a file. 854 867 </desc> 855 868 </const> 856 <const name="Restoring" value="1 3">869 <const name="Restoring" value="14"> 857 870 <desc> 858 871 Execution state of the machine is being restored from a file 859 after powering it on from the saved execution state. 860 </desc> 861 </const> 862 <const name="TeleportingPausedVM" value="14"> 872 after powering it on from either the @c Saved or @c AbortedSaved 873 execution state. 874 </desc> 875 </const> 876 <const name="TeleportingPausedVM" value="15"> 863 877 <desc> 864 878 The machine is being teleported to another host or process, but it is … … 867 881 </desc> 868 882 </const> 869 <const name="TeleportingIn" value="1 5">883 <const name="TeleportingIn" value="16"> 870 884 <desc> 871 885 Teleporting the machine state in from another host or process. 872 886 </desc> 873 887 </const> 874 <const name="DeletingSnapshotOnline" value="1 6">888 <const name="DeletingSnapshotOnline" value="17"> 875 889 <desc> 876 890 Like @c DeletingSnapshot, but the merging of media is ongoing in … … 878 892 </desc> 879 893 </const> 880 <const name="DeletingSnapshotPaused" value="1 7">894 <const name="DeletingSnapshotPaused" value="18"> 881 895 <desc> 882 896 Like @c DeletingSnapshotOnline, but the machine was paused when the … … 884 898 </desc> 885 899 </const> 886 <const name="OnlineSnapshotting" value="1 8">900 <const name="OnlineSnapshotting" value="19"> 887 901 <desc> 888 902 Like @c LiveSnapshotting, but the machine was paused when the … … 890 904 </desc> 891 905 </const> 892 <const name="RestoringSnapshot" value=" 19">906 <const name="RestoringSnapshot" value="20"> 893 907 <desc> 894 908 A machine snapshot is being restored; this typically does not take long. 895 909 </desc> 896 910 </const> 897 <const name="DeletingSnapshot" value="2 0">911 <const name="DeletingSnapshot" value="21"> 898 912 <desc> 899 913 A machine snapshot is being deleted; this can take a long time since this … … 902 916 </desc> 903 917 </const> 904 <const name="SettingUp" value="2 1">918 <const name="SettingUp" value="22"> 905 919 <desc> 906 920 Lengthy setup operation is in progress. 907 921 </desc> 908 922 </const> 909 <const name="Snapshotting" value="2 2">923 <const name="Snapshotting" value="23"> 910 924 <desc> 911 925 Taking an (offline) snapshot. … … 913 927 </const> 914 928 915 <const name="FirstOnline" value=" 5" wsmap="suppress"> <!-- Running -->929 <const name="FirstOnline" value="6" wsmap="suppress"> <!-- Running --> 916 930 <desc> 917 931 Pseudo-state: first online state (for use in relational expressions). 918 932 </desc> 919 933 </const> 920 <const name="LastOnline" value="1 8" wsmap="suppress"> <!-- OnlineSnapshotting -->934 <const name="LastOnline" value="19" wsmap="suppress"> <!-- OnlineSnapshotting --> 921 935 <desc> 922 936 Pseudo-state: last online state (for use in relational expressions). … … 924 938 </const> 925 939 926 <const name="FirstTransient" value=" 8" wsmap="suppress"> <!-- Teleporting -->940 <const name="FirstTransient" value="9" wsmap="suppress"> <!-- Teleporting --> 927 941 <desc> 928 942 Pseudo-state: first transient state (for use in relational expressions). 929 943 </desc> 930 944 </const> 931 <const name="LastTransient" value="2 2" wsmap="suppress"> <!-- Snapshotting -->945 <const name="LastTransient" value="23" wsmap="suppress"> <!-- Snapshotting --> 932 946 <desc> 933 947 Pseudo-state: last transient state (for use in relational expressions). … … 6534 6548 <desc> 6535 6549 Full path to the file that stores the execution state of 6536 the machine when it is in the <link to="MachineState_Saved"/> state. 6550 the machine when it is in either the <link to="MachineState_Saved"/> 6551 or <link to="MachineState_AbortedSaved"/> state. 6537 6552 <note> 6538 When the machine is not in the Saved state, this attributeis6539 a n empty string.6553 When the machine is not in the Saved or AbortedSaved state, this 6554 attribute is an empty string. 6540 6555 </note> 6541 6556 </desc> … … 8426 8441 <ul> 8427 8442 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional 8428 cleanup will be performed. The call will fail if the machine is in "Saved" state 8429 or has any snapshots or any media attached (see <link to="IMediumAttachment" />). 8430 It is the responsibility of the caller to delete all such configuration in this mode. 8431 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API 8432 which it replaces.</li> 8443 cleanup will be performed. The call will fail if the machine has any snapshots or 8444 any media attached (see <link to="IMediumAttachment" />). It is the responsibility 8445 of the caller to delete all such configuration in this mode. In this mode, the API 8446 behaves like the former @c IVirtualBox::unregisterMachine() API which it replaces.</li> 8433 8447 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved" 8434 8448 state or if it has snapshots or media attached. All media attached to the current machine … … 8508 8522 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode 8509 8523 argument other than "UnregisterOnly", this will delete all saved state files that 8510 the machine had in use; possibly one if the machine was in "Saved" state and one8511 for each online snapshot that the machine had.</li>8524 the machine had in use; possibly one if the machine was in either the "Saved" or 8525 "AbortedSaved" state and one for each online snapshot that the machine had.</li> 8512 8526 <li>On each medium object passed in the @a aMedia array, this will call 8513 8527 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the … … 9180 9194 9181 9195 After this operation completes, the machine will go to the 9182 Saved state. Next time it is powered up,this state will9196 Saved state. The next time it is powered up this state will 9183 9197 be restored and the machine will continue its execution from 9184 9198 the place where it was saved. … … 9222 9236 Associates the given saved state file to the virtual machine. 9223 9237 9224 On success, the machine will go to the Saved state. Next time it is9225 powered up ,it will be restored from the adopted saved state and9238 On success, the machine will go to the Saved state. The next time it is 9239 powered up it will be restored from the adopted saved state and 9226 9240 continue execution from the place where the saved state file was 9227 9241 created. … … 9250 9264 <desc> 9251 9265 Forcibly resets the machine to "Powered Off" state if it is 9252 currently in the "Saved" state (previously created by <link to="#saveState"/>). 9253 Next time the machine is powered up, a clean boot will occur. 9266 currently in the "Saved" state previously created by <link to="#saveState"/>) 9267 or in the "AbortedSaved" state. The next time the machine is powered up 9268 a clean boot will occur. 9254 9269 <note> 9255 9270 This operation is equivalent to resetting or powering off … … 9265 9280 <link to="#stateFilePath" /> attribute. 9266 9281 <result name="VBOX_E_INVALID_VM_STATE"> 9267 Virtual machine not in state Saved.9282 Virtual machine not in either the Saved or AbortedSaved state. 9268 9283 </result> 9269 9284 </desc> … … 9281 9296 9282 9297 This method can be called for a PoweredOff, Saved (see 9283 <link to="#saveState"/>), Running or9298 <link to="#saveState"/>), AbortedSaved, Running or 9284 9299 Paused virtual machine. When the machine is PoweredOff, an 9285 9300 offline snapshot is created. When the machine is Running a live … … 9474 9489 9475 9490 If the given snapshot is an online snapshot, the machine will go to 9476 the <link to="MachineState_Saved"> saved state</link>, so that the9491 the <link to="MachineState_Saved">Saved</link> state, so that the 9477 9492 next time it is powered on, the execution state will be restored 9478 9493 from the state of the snapshot. … … 9483 9498 9484 9499 <note> 9485 If the machine state is<link to="MachineState_Saved">Saved</link>9486 prior to this operation, the saved state file will be implicitly9500 If the machine is in the <link to="MachineState_Saved">Saved</link> 9501 state prior to this operation, the saved state file will be implicitly 9487 9502 deleted (as if <link to="IMachine::discardSavedState"/> were 9488 9503 called). … … 9854 9869 powered on). 9855 9870 9856 If the machine is in the <link to="MachineState_Saved"/> state ,9857 it will continue its execution the point where the state has9858 beensaved.9871 If the machine is in the <link to="MachineState_Saved"/> state or the 9872 <link to="MachineState_AbortedSaved"/> state it will continue its 9873 execution from the point where the state was saved. 9859 9874 9860 9875 If the machine <link to="IMachine::teleporterEnabled"/> property is … … 10117 10132 10118 10133 <result name="VBOX_E_INVALID_VM_STATE"> 10119 Virtual machine i nSaved state or currently changing state.10134 Virtual machine is in the Saved or AbortedSaved state or currently changing state. 10120 10135 </result> 10121 10136 <result name="VBOX_E_FILE_ERROR"> … … 10150 10165 shared folders and stops sharing it. 10151 10166 <result name="VBOX_E_INVALID_VM_STATE"> 10152 Virtual machine i nSaved state or currently changing state.10167 Virtual machine is in the Saved or AbortedSaved state or currently changing state. 10153 10168 </result> 10154 10169 <result name="VBOX_E_FILE_ERROR"> … … 16377 16392 because when restoring it, the VM will be running. 16378 16393 16379 If the machine was in <link to="MachineState_Saved">saved</link> saved,16380 the snapshot receives a copy of the execution state file16381 (<link to="IMachine::stateFilePath"/>).16394 If the machine was in the <link to="MachineState_Saved">Saved</link> or 16395 <link to="MachineState_AbortedSaved">AbortedSaved</link> state, the snapshot 16396 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>). 16382 16397 16383 16398 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/> -
trunk/src/VBox/Main/src-all/Global.cpp
r89868 r91363 590 590 case MachineState_Teleported: return "Teleported"; 591 591 case MachineState_Aborted: return "Aborted"; 592 case MachineState_AbortedSaved: return "Aborted-Saved"; 592 593 case MachineState_Running: return "Running"; 593 594 case MachineState_Paused: return "Paused"; -
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: -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r91326 r91363 8096 8096 && mData->mMachineState != MachineState_Teleported 8097 8097 && mData->mMachineState != MachineState_Saved 8098 && mData->mMachineState != MachineState_AbortedSaved 8098 8099 && mData->mMachineState != MachineState_PoweredOff 8099 8100 ) … … 8128 8129 && mData->mMachineState != MachineState_Teleported 8129 8130 && mData->mMachineState != MachineState_Saved 8131 && mData->mMachineState != MachineState_AbortedSaved 8130 8132 && mData->mMachineState != MachineState_PoweredOff 8131 8133 && !Global::IsOnline(mData->mMachineState) … … 8636 8638 */ 8637 8639 8638 /* set the machine state to Aborted or Saved when appropriate */ 8639 if (config.fAborted) 8640 /* set the machine state to either Aborted-Saved, Aborted, or Saved if appropriate */ 8641 if (config.fAborted && !mSSData->strStateFilePath.isEmpty()) 8642 { 8643 /* no need to use i_setMachineState() during init() */ 8644 mData->mMachineState = MachineState_AbortedSaved; 8645 } 8646 else if (config.fAborted) 8640 8647 { 8641 8648 mSSData->strStateFilePath.setNull(); … … 10001 10008 10002 10009 if ( mData->mMachineState == MachineState_Saved 10010 || mData->mMachineState == MachineState_AbortedSaved 10003 10011 || mData->mMachineState == MachineState_Restoring 10004 10012 // when doing certain snapshot operations we may or may not have … … 10027 10035 10028 10036 config.timeLastStateChange = mData->mLastStateChange; 10029 config.fAborted = (mData->mMachineState == MachineState_Aborted );10037 config.fAborted = (mData->mMachineState == MachineState_Aborted || mData->mMachineState == MachineState_AbortedSaved); 10030 10038 /// @todo Live Migration: config.fTeleported = (mData->mMachineState == MachineState_Teleported); 10031 10039 … … 10544 10552 mData->pMachineConfigFile->timeLastStateChange = mData->mLastStateChange; 10545 10553 10546 mData->pMachineConfigFile->fAborted = (mData->mMachineState == MachineState_Aborted); 10554 mData->pMachineConfigFile->fAborted = (mData->mMachineState == MachineState_Aborted 10555 || mData->mMachineState == MachineState_AbortedSaved); 10547 10556 /// @todo live migration mData->pMachineConfigFile->fTeleported = (mData->mMachineState == MachineState_Teleported); 10548 10557 } … … 12664 12673 Log1WarningThisFunc(("ABNORMAL client termination! (wasBusy=%d)\n", Global::IsOnlineOrTransient(lastState))); 12665 12674 12666 /* reset the state to Aborted */ 12667 if (mData->mMachineState != MachineState_Aborted) 12675 /* 12676 * Move the VM to the 'Aborted' machine state unless we are restoring a 12677 * VM that was in the 'Saved' machine state. In that case, if the VM 12678 * fails before reaching either the 'Restoring' machine state or the 12679 * 'Running' machine state then we set the machine state to 12680 * 'AbortedSaved' in order to preserve the saved state file so that the 12681 * VM can be restored in the future. 12682 */ 12683 if (mData->mMachineState == MachineState_Saved || mData->mMachineState == MachineState_Restoring) 12684 i_setMachineState(MachineState_AbortedSaved); 12685 else if (mData->mMachineState != MachineState_Aborted) 12668 12686 i_setMachineState(MachineState_Aborted); 12669 12687 } … … 13090 13108 if (FAILED(rc)) return rc; 13091 13109 13092 if (mData->mMachineState != MachineState_Saved) 13110 if ( mData->mMachineState != MachineState_Saved 13111 && mData->mMachineState != MachineState_AbortedSaved) 13093 13112 return setError(VBOX_E_INVALID_VM_STATE, 13094 tr("Cannot d elete the machine state as the machine is not in the saved state (machine state: %s)"),13113 tr("Cannot discard the saved state as the machine is not in the Saved or Aborted-Saved state (machine state: %s)"), 13095 13114 Global::stringifyMachineState(mData->mMachineState)); 13096 13115 … … 14615 14634 { 14616 14635 LogFlowThisFuncEnter(); 14617 LogFlowThisFunc(("aMachineState=%s\n", Global::stringifyMachineState(aMachineState) ));14618 14636 14619 14637 AutoCaller autoCaller(this); … … 14636 14654 /* detect some state transitions */ 14637 14655 14638 if ( ( oldMachineState == MachineState_Saved 14639 && aMachineState == MachineState_Restoring) 14656 if ( ( ( oldMachineState == MachineState_Saved 14657 || oldMachineState == MachineState_AbortedSaved 14658 ) 14659 && aMachineState == MachineState_Restoring 14660 ) 14640 14661 || ( ( oldMachineState == MachineState_PoweredOff 14641 14662 || oldMachineState == MachineState_Teleported … … 14672 14693 || aMachineState == MachineState_Teleported 14673 14694 || aMachineState == MachineState_Aborted 14695 || aMachineState == MachineState_AbortedSaved 14674 14696 ) 14675 14697 ) … … 14685 14707 if (oldMachineState == MachineState_Restoring) 14686 14708 { 14687 if (aMachineState != MachineState_Saved )14709 if (aMachineState != MachineState_Saved && aMachineState != MachineState_AbortedSaved) 14688 14710 { 14689 14711 /* 14690 14712 * delete the saved state file once the machine has finished 14691 14713 * restoring from it (note that Console sets the state from 14692 * Restoring to Saved if the VM couldn't restore successfully,14714 * Restoring to AbortedSaved if the VM couldn't restore successfully, 14693 14715 * to give the user an ability to fix an error and retry -- 14694 14716 * we keep the saved state file in this case) … … 14699 14721 else if ( oldMachineState == MachineState_Saved 14700 14722 && ( aMachineState == MachineState_PoweredOff 14701 || aMachineState == MachineState_Aborted14702 14723 || aMachineState == MachineState_Teleported 14703 14724 ) 14704 14725 ) 14705 14726 { 14706 /* 14707 * delete the saved state after SessionMachine::ForgetSavedState() is called 14708 * or if the VM process (owning a direct VM session) crashed while the 14709 * VM was Saved 14710 */ 14711 14712 /// @todo (dmik) 14713 // Not sure that deleting the saved state file just because of the 14714 // client death before it attempted to restore the VM is a good 14715 // thing. But when it crashes we need to go to the Aborted state 14716 // which cannot have the saved state file associated... The only 14717 // way to fix this is to make the Aborted condition not a VM state 14718 // but a bool flag: i.e., when a crash occurs, set it to true and 14719 // change the state to PoweredOff or Saved depending on the 14720 // saved state presence. 14721 14727 /* delete the saved state after SessionMachine::ForgetSavedState() is called */ 14722 14728 deleteSavedState = true; 14723 14729 mData->mCurrentStateModified = TRUE; 14724 14730 stsFlags |= SaveSTS_CurStateModified; 14725 14731 } 14732 /* failure to reach the restoring state should always go to MachineState_AbortedSaved */ 14733 Assert(!(oldMachineState == MachineState_Saved && aMachineState == MachineState_Aborted)); 14726 14734 14727 14735 if ( aMachineState == MachineState_Starting … … 14765 14773 || aMachineState == MachineState_Teleported 14766 14774 || aMachineState == MachineState_Aborted 14775 || aMachineState == MachineState_AbortedSaved 14767 14776 || aMachineState == MachineState_Saved)) 14768 14777 { -
trunk/src/VBox/Main/src-server/MachineImplMoveVM.cpp
r91326 r91363 245 245 return hrc; 246 246 247 if (machineState == MachineState_Saved )247 if (machineState == MachineState_Saved || machineState == MachineState_AbortedSaved) 248 248 { 249 249 m_pMachine->COMGETTER(StateFilePath)(bstr_stateFilePath.asOutParam()); -
trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
r91326 r91363 1770 1770 i_composeSavedStateFilename(task.m_strStateFilePath); 1771 1771 } 1772 else if (task.m_machineStateBackup == MachineState_Saved )1772 else if (task.m_machineStateBackup == MachineState_Saved || task.m_machineStateBackup == MachineState_AbortedSaved) 1773 1773 // taking an offline snapshot from machine in "saved" state: use existing state file 1774 1774 task.m_strStateFilePath = mSSData->strStateFilePath; … … 2305 2305 /* Delete the saved state file if the machine was Saved prior to this 2306 2306 * operation */ 2307 if (task.m_machineStateBackup == MachineState_Saved )2307 if (task.m_machineStateBackup == MachineState_Saved || task.m_machineStateBackup == MachineState_AbortedSaved) 2308 2308 { 2309 2309 Assert(!mSSData->strStateFilePath.isEmpty()); … … 2679 2679 && mData->mMachineState != MachineState_Teleported 2680 2680 && mData->mMachineState != MachineState_Aborted 2681 && mData->mMachineState != MachineState_AbortedSaved 2681 2682 && mData->mMachineState != MachineState_Running 2682 2683 && mData->mMachineState != MachineState_Paused) -
trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py
r91055 r91363 85 85 if eState == vboxcon.MachineState_Teleported: return 'Teleported'; 86 86 if eState == vboxcon.MachineState_Aborted: return 'Aborted'; 87 if eState == vboxcon.MachineState_AbortedSaved: return 'Aborted-Saved'; 87 88 if eState == vboxcon.MachineState_Running: return 'Running'; 88 89 if eState == vboxcon.MachineState_Paused: return 'Paused';
Note:
See TracChangeset
for help on using the changeset viewer.