VirtualBox

Changeset 100200 in vbox for trunk


Ignore:
Timestamp:
Jun 16, 2023 3:07:52 PM (18 months ago)
Author:
vboxsync
Message:

Main/Snapshot: Attempting to take a live snapshot, i.e. calling
IMachine::takeSnapshot() with 'pause=false', of a non-running VM should
fail and provide an appropriate error message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/SnapshotImpl.cpp

    r99739 r100200  
    16281628    if (Global::IsTransient(mData->mMachineState))
    16291629        return setError(VBOX_E_INVALID_VM_STATE,
    1630                         tr("Cannot take a snapshot of the machine while it is changing the state (machine state: %s)"),
     1630                        tr("Cannot take a snapshot of the virtual machine while it is changing state (machine state: %s)"),
    16311631                        Global::stringifyMachineState(mData->mMachineState));
     1632
     1633    if (!fPause && mData->mMachineState != MachineState_Running)
     1634        return setError(VBOX_E_INVALID_VM_STATE,
     1635                        tr("Cannot take a live snapshot of a virtual machine unless it is running."));
    16321636
    16331637    HRESULT hrc = i_checkStateDependency(MutableOrSavedOrRunningStateDep);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette