def save_state_with_reason(self, reason, progress, snapshot, state_file_path, pause_vm):
        """Internal method for triggering a VM save state with a specified reason
        code. The reason code can be interpreted by device/drivers and thus it
        might behave slightly differently than a normal VM save state.
        
        This call is fully synchronous, and the caller is expected to have set
        the machine state appropriately (and has to set the follow-up machine
        state if this call failed).
        
        
        :py:func:`IMachine.save_state` 

        in reason of type :class:`Reason`
            Specify the best matching reason code please.

        in progress of type :class:`IProgress`
            Progress object to track the operation completion.

        in snapshot of type :class:`ISnapshot`
            Snapshot object for which this save state operation is executed.

        in state_file_path of type str
            File path the VM process must save the execution state to.

        in pause_vm of type bool
            The VM should be paused before saving state. It is automatically
            unpaused on error in the "vanilla save state" case.

        return left_paused of type bool
            Returns if the VM was left in paused state, which is necessary
            in many situations (snapshots, teleportation).

        raises :class:`VBoxErrorInvalidVmState`
            Virtual machine state is not one of the expected values.
        
        raises :class:`VBoxErrorFileError`
            Failed to create directory for saved state file.
        
        """
        if not isinstance(reason, Reason):
            raise TypeError("reason can only be an instance of type Reason")
        if not isinstance(progress, IProgress):
            raise TypeError("progress can only be an instance of type IProgress")
        if not isinstance(snapshot, ISnapshot):
            raise TypeError("snapshot can only be an instance of type ISnapshot")
        if not isinstance(state_file_path, basestring):
            raise TypeError("state_file_path can only be an instance of type basestring")
        if not isinstance(pause_vm, bool):
            raise TypeError("pause_vm can only be an instance of type bool")
        left_paused = self._call("saveStateWithReason",
                     in_p=[reason, progress, snapshot, state_file_path, pause_vm])
        return left_paused
def save_state_with_reason ( self , reason , progress , snapshot , state_file_path , pause_vm ) : if not isinstance ( reason , Reason ) : raise TypeError ( "reason can only be an instance of type Reason" ) if not isinstance ( progress , IProgress ) : raise TypeError ( "progress can only be an instance of type IProgress" ) if not isinstance ( snapshot , ISnapshot ) : raise TypeError ( "snapshot can only be an instance of type ISnapshot" ) if not isinstance ( state_file_path , basestring ) : raise TypeError ( "state_file_path can only be an instance of type basestring" ) if not isinstance ( pause_vm , bool ) : raise TypeError ( "pause_vm can only be an instance of type bool" ) left_paused = self . _call ( "saveStateWithReason" , in_p = [ reason , progress , snapshot , state_file_path , pause_vm ] ) return left_paused
Internal method for triggering a VM save state with a specified reason
        code. The reason code can be interpreted by device/drivers and thus it
        might behave slightly differently than a normal VM save state.
        
        This call is fully synchronous, and the caller is expected to have set
        the machine state appropriately (and has to set the follow-up machine
        state if this call failed).
        
        
        :py:func:`IMachine.save_state` 

        in reason of type :class:`Reason`
            Specify the best matching reason code please.

        in progress of type :class:`IProgress`
            Progress object to track the operation completion.

        in snapshot of type :class:`ISnapshot`
            Snapshot object for which this save state operation is executed.

        in state_file_path of type str
            File path the VM process must save the execution state to.

        in pause_vm of type bool
            The VM should be paused before saving state. It is automatically
            unpaused on error in the "vanilla save state" case.

        return left_paused of type bool
            Returns if the VM was left in paused state, which is necessary
            in many situations (snapshots, teleportation).

        raises :class:`VBoxErrorInvalidVmState`
            Virtual machine state is not one of the expected values.
        
        raises :class:`VBoxErrorFileError`
            Failed to create directory for saved state file.