VirtualBox

Ignore:
Timestamp:
Nov 25, 2009 2:01:57 PM (15 years ago)
Author:
vboxsync
Message:

Main: do not reset diff images for immutable disks if the machine has snapshots

File:
1 edited

Legend:

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

    r24949 r24954  
    47274727
    47284728    /* the network cards will undergo a quick consistency check */
    4729     for (ULONG slot = 0; slot < SchemaDefs::NetworkAdapterCount; slot ++)
     4729    for (ULONG slot = 0;
     4730         slot < SchemaDefs::NetworkAdapterCount;
     4731         ++slot)
    47304732    {
    47314733        ComPtr<INetworkAdapter> adapter;
     
    48514853    task->mTeleporterEnabled = fTeleporterEnabled;
    48524854
    4853     /* Reset differencing hard disks for which autoReset is true */
    4854     {
     4855    ULONG cSnapshots;
     4856    rc = mMachine->COMGETTER(SnapshotCount)(&cSnapshots);
     4857    CheckComRCReturnRC(rc);
     4858
     4859    /* Reset differencing hard disks for which autoReset is true,
     4860     * but only if the machine does not have any snapshots (otherwise
     4861     * the behavior of differencing images would get very confusing)
     4862     */
     4863    if (0 == cSnapshots)
     4864    {
     4865        LogFlowThisFunc(("Machine has no snapshots, looking for immutable images to reset\n"));
     4866
    48554867        com::SafeIfaceArray<IMediumAttachment> atts;
    48564868        rc = mMachine->COMGETTER(MediumAttachments)(ComSafeArrayAsOutParam(atts));
    48574869        CheckComRCReturnRC(rc);
    48584870
    4859         for (size_t i = 0; i < atts.size(); ++ i)
     4871        for (size_t i = 0;
     4872             i < atts.size();
     4873             ++i)
    48604874        {
    48614875            DeviceType_T devType;
     
    48884902        }
    48894903    }
     4904    else
     4905        LogFlowThisFunc(("Machine has %d snapshots, skipping immutable images reset\n", cSnapshots));
    48904906
    48914907    rc = consoleInitReleaseLog(mMachine);
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