VirtualBox

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


Ignore:
Timestamp:
Oct 15, 2009 12:10:55 PM (15 years ago)
Author:
vboxsync
Message:

Main/Settings: bump settings version to 1.9 if any of the live migration bits are set to non-default values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r23750 r23795  
    12091209          fNestedPaging(false),
    12101210          fVPID(false),
     1211          fSyntheticCpu(false),
    12111212          fPAE(false),
    1212           fSyntheticCpu(false),
    12131213          cCPUs(1),
    12141214          ulMemorySizeMB((uint32_t)-1),
     
    14741474                pelmCPUChild->getAttributeValue("enabled", hw.fPAE);
    14751475            if ((pelmCPUChild = pelmHwChild->findChildElement("SyntheticCpu")))
    1476                 pelmCPUChild->getAttributeValue("enabled", hw.fSyntheticCpu);           
     1476                pelmCPUChild->getAttributeValue("enabled", hw.fSyntheticCpu);
    14771477        }
    14781478        else if (pelmHwChild->nameEquals("Memory"))
     
    28722872        m->sv = SettingsVersion_v1_9;
    28732873    }
     2874
     2875#ifdef VBOX_WITH_LIVE_MIGRATION
     2876    if (    m->sv < SettingsVersion_v1_9
     2877        &&  (   fLiveMigrationTarget
     2878             || uLiveMigrationPort
     2879             || !strLiveMigrationPassword.isEmpty()
     2880            )
     2881       )
     2882        m->sv = SettingsVersion_v1_9;
     2883#endif
    28742884}
    28752885
     
    29122922            pelmMachine->setAttribute("aborted", fAborted);
    29132923#ifdef VBOX_WITH_LIVE_MIGRATION /** @todo LiveMigration: Checkout how the file format versioning is done. */
    2914         if (fLiveMigrationTarget)
    2915             pelmMachine->setAttribute("liveMigrationTarget", true);
    2916         if (uLiveMigrationPort)
    2917             pelmMachine->setAttribute("liveMigrationPort", uLiveMigrationPort);
    2918         if (!strLiveMigrationPassword.isEmpty())
    2919             pelmMachine->setAttribute("liveMigrationPassword", strLiveMigrationPassword);
     2924        if (m->sv >= SettingsVersion_v1_9)
     2925        {
     2926            if (fLiveMigrationTarget)
     2927                pelmMachine->setAttribute("liveMigrationTarget", true);
     2928            if (uLiveMigrationPort)
     2929                pelmMachine->setAttribute("liveMigrationPort", uLiveMigrationPort);
     2930            if (!strLiveMigrationPassword.isEmpty())
     2931                pelmMachine->setAttribute("liveMigrationPassword", strLiveMigrationPassword);
     2932        }
    29202933#endif
    29212934
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