VirtualBox

Changeset 23600 in vbox


Ignore:
Timestamp:
Oct 7, 2009 5:49:26 PM (15 years ago)
Author:
vboxsync
Message:

Main: three new Machine settings (not enabled).

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/settings.h

    r23334 r23600  
    554554    com::Guid               uuidCurrentSnapshot;
    555555    com::Utf8Str            strSnapshotFolder;
     556    bool                    fLiveMigrationTarget;
     557    uint32_t                uLiveMigrationPort;
     558    com::Utf8Str            strLiveMigrationPassword;
    556559
    557560    bool                    fCurrentStateModified;      // optional, default is true
  • trunk/src/VBox/Main/MachineImpl.cpp

    r23599 r23600  
    50325032        mData->mLastStateChange = mData->m_pMachineConfigFile->timeLastStateChange;
    50335033
    5034 /** @todo LiveMigration: Load LiveMigration properties here. */
     5034        /* Live migration */
     5035        mUserData->mLiveMigrationTarget = mData->m_pMachineConfigFile->fLiveMigrationTarget;
     5036        mUserData->mLiveMigrationPort = mData->m_pMachineConfigFile->uLiveMigrationPort;
     5037        mUserData->mLiveMigrationPassword = mData->m_pMachineConfigFile->strLiveMigrationPassword;
     5038
    50355039        /*
    50365040         *  note: all mUserData members must be assigned prior this point because
     
    60226026        mData->m_pMachineConfigFile->timeLastStateChange = mData->mLastStateChange;
    60236027        mData->m_pMachineConfigFile->fAborted = (mData->mMachineState == MachineState_Aborted);
    6024 /** @todo LiveMigration: Save LiveMigration properties here. */
     6028
     6029        mData->m_pMachineConfigFile->fLiveMigrationTarget = !!mUserData->mLiveMigrationTarget;
     6030        mData->m_pMachineConfigFile->uLiveMigrationPort = mUserData->mLiveMigrationPort;
     6031        mData->m_pMachineConfigFile->strLiveMigrationPassword = mUserData->mLiveMigrationPassword;
    60256032
    60266033        rc = saveHardware(mData->m_pMachineConfigFile->hardwareMachine);
  • trunk/src/VBox/Main/xml/Settings.cpp

    r23492 r23600  
    21922192            // constructor has called RTTimeNow(&timeLastStateChange) before
    21932193
     2194        if (!elmMachine.getAttributeValue("liveMigrationTarget", fLiveMigrationTarget))
     2195            fLiveMigrationTarget = false;
     2196        if (!elmMachine.getAttributeValue("liveMigrationPort", uLiveMigrationPort))
     2197            uLiveMigrationPort = 0;
     2198        if (!elmMachine.getAttributeValue("liveMigrationPassword", strLiveMigrationPassword))
     2199            strLiveMigrationPassword = "";
     2200
    21942201        // parse Hardware before the other elements because other things depend on it
    21952202        const xml::ElementNode *pelmHardware;
     
    22552262    : ConfigFileBase(pstrFilename),
    22562263      fNameSync(true),
     2264      fLiveMigrationTarget(false),
     2265      uLiveMigrationPort(0),
    22572266      fCurrentStateModified(true),
    22582267      fAborted(false)
     
    28872896        if (fAborted)
    28882897            pelmMachine->setAttribute("aborted", fAborted);
     2898#ifdef VBOX_WITH_LIVE_MIGRATION /** @todo LiveMigration: Checkout how the file format versioning is done. */
     2899        if (fLiveMigrationTarget)
     2900            pelmMachine->setAttribute("liveMigrationTarget", true);
     2901        if (uLiveMigrationPort)
     2902            pelmMachine->setAttribute("liveMigrationPort", uLiveMigrationPort);
     2903        if (!strLiveMigrationPassword.isEmpty())
     2904            pelmMachine->setAttribute("liveMigrationPassword", strLiveMigrationPassword);
     2905#endif
    28892906
    28902907        writeExtraData(*pelmMachine, mapExtraDataItems);
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