VirtualBox

Changeset 24874 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Nov 23, 2009 3:37:58 PM (15 years ago)
Author:
vboxsync
Message:

Main,VMM,VBoxManage: Added a parameter to IConsole::Teleport for specifying a max downtime and made PGM compare this against a rough estimate of the time it would take to deal with the rest of the pages.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImplTeleporter.cpp

    r24770 r24874  
    9292    Utf8Str             mstrHostname;
    9393    uint32_t            muPort;
     94    uint32_t            mcMsMaxDowntime;
    9495    MachineState_T      menmOldMachineState;
    9596    bool                mfSuspendedByUs;
     
    99100        : TeleporterState(pConsole, pVM, pProgress, true /*fIsSource*/)
    100101        , muPort(UINT32_MAX)
     102        , mcMsMaxDowntime(250)
    101103        , menmOldMachineState(enmOldMachineState)
    102104        , mfSuspendedByUs(false)
     
    640642
    641643    void *pvUser = static_cast<void *>(static_cast<TeleporterState *>(pState));
    642     vrc = VMR3Teleport(pState->mpVM, &g_teleporterTcpOps, pvUser, teleporterProgressCallback, pvUser, &pState->mfSuspendedByUs);
     644    vrc = VMR3Teleport(pState->mpVM, pState->mcMsMaxDowntime,
     645                       &g_teleporterTcpOps, pvUser,
     646                       teleporterProgressCallback, pvUser,
     647                       &pState->mfSuspendedByUs);
    643648    if (RT_FAILURE(vrc))
    644649        return setError(E_FAIL, tr("VMR3Teleport -> %Rrc"), vrc);
     
    854859 * @returns COM status code.
    855860 *
    856  * @param   aHostname   The name of the target host.
    857  * @param   aPort       The TCP port number.
    858  * @param   aPassword   The password.
    859  * @param   aProgress   Where to return the progress object.
     861 * @param   aHostname       The name of the target host.
     862 * @param   aPort           The TCP port number.
     863 * @param   aPassword       The password.
     864 * @param   aMaxDowntime    Max allowed "downtime" in milliseconds.
     865 * @param   aProgress       Where to return the progress object.
    860866 */
    861867STDMETHODIMP
    862 Console::Teleport(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, IProgress **aProgress)
     868Console::Teleport(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, ULONG aMaxDowntime, IProgress **aProgress)
    863869{
    864870    /*
     
    870876    CheckComArgNotNull(aHostname);
    871877    CheckComArgExprMsg(aPort, aPort > 0 && aPort <= 65535, ("is %u", aPort));
     878    CheckComArgExprMsg(aMaxDowntime, aMaxDowntime > 0, ("is %u", aMaxDowntime));
    872879
    873880    AutoCaller autoCaller(this);
     
    903910
    904911    TeleporterStateSrc *pState = new TeleporterStateSrc(this, mpVM, ptrProgress, mMachineState);
    905     pState->mstrPassword = aPassword;
    906     pState->mstrHostname = aHostname;
    907     pState->muPort       = aPort;
     912    pState->mstrPassword    = aPassword;
     913    pState->mstrHostname    = aHostname;
     914    pState->muPort          = aPort;
     915    pState->mcMsMaxDowntime = aMaxDowntime;
    908916
    909917    void *pvUser = static_cast<void *>(static_cast<TeleporterState *>(pState));
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r24865 r24874  
    64426442  <interface
    64436443     name="IConsole" extends="$unknown"
    6444      uuid="55dd56a5-1d1d-4d81-b742-b082b9571be6"
     6444     uuid="6375231a-c17c-464b-92cb-ae9e128d71c3"
    64456445     wsmap="managed"
    64466446     >
     
    71477147      <param name="password" type="wstring" dir="in">
    71487148        <desc>The password.</desc>
     7149      </param>
     7150      <param name="maxDowntime" type="unsigned long" dir="in">
     7151        <desc>
     7152          The maximum allowed downtime given as milliseconds.  0 is not a valid
     7153          value.  Recommended value: 250 ms.
     7154
     7155          The higher the value is, the greater the chance for a successful
     7156          teleportation.  A small value may easily result in the teleportation
     7157          process taking hours and eventually fail.
     7158
     7159          <note>
     7160            The current implementation treats this a guideline, not as an
     7161            absolute rule.
     7162          </note>
     7163        </desc>
    71497164      </param>
    71507165      <param name="progress" type="IProgress" dir="return">
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r24703 r24874  
    147147    STDMETHOD(DeleteSnapshot)(IN_BSTR aId, IProgress **aProgress);
    148148    STDMETHOD(RestoreSnapshot)(ISnapshot *aSnapshot, IProgress **aProgress);
    149     STDMETHOD(Teleport)(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, IProgress **aProgress);
     149    STDMETHOD(Teleport)(IN_BSTR aHostname, ULONG aPort, IN_BSTR aPassword, ULONG aMaxDowntime, IProgress **aProgress);
    150150    STDMETHOD(RegisterCallback) (IConsoleCallback *aCallback);
    151151    STDMETHOD(UnregisterCallback)(IConsoleCallback *aCallback);
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