Index: /trunk/src/VBox/Main/include/MachineImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MachineImpl.h	(revision 38995)
+++ /trunk/src/VBox/Main/include/MachineImpl.h	(revision 38996)
@@ -162,4 +162,5 @@
         settings::MachineConfigFile *pMachineConfigFile;
         uint32_t            flModifications;
+        bool                m_fAllowStateModification;
 
         BOOL                mAccessible;
@@ -648,6 +649,10 @@
     ChipsetType_T getChipsetType() const { return mHWData->mChipsetType; }
 
-    void setModified(uint32_t fl);
-    void setModifiedLock(uint32_t fl);
+    void setModified(uint32_t fl, bool fAllowStateModification = true);
+    void setModifiedLock(uint32_t fl, bool fAllowStateModification = true);
+
+    bool isStateModificationAllowed() const { return mData->m_fAllowStateModification; }
+    void allowStateModification()           { mData->m_fAllowStateModification = true; }
+    void disallowStateModification()        { mData->m_fAllowStateModification = false; }
 
     // callback handlers
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 38995)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 38996)
@@ -106,22 +106,30 @@
 Machine::Data::Data()
 {
-    mRegistered = FALSE;
-    pMachineConfigFile = NULL;
-    flModifications = 0;
-    mAccessible = FALSE;
+    mRegistered                = FALSE;
+    pMachineConfigFile         = NULL;
+    /* Contains hints on what has changed when the user is using the VM (config
+     * changes, running the VM, ...). This is used to decide if a config needs
+     * to be written to disk. */
+    flModifications            = 0;
+    /* VM modification usually also trigger setting the current state to
+     * "Modified". Although this is not always the case. An e.g. is the VM
+     * initialization phase or when snapshot related data is changed. The
+     * actually behavior is controlled by the following flag. */
+    m_fAllowStateModification  = false;
+    mAccessible                = FALSE;
     /* mUuid is initialized in Machine::init() */
 
-    mMachineState = MachineState_PoweredOff;
+    mMachineState              = MachineState_PoweredOff;
     RTTimeNow(&mLastStateChange);
 
-    mMachineStateDeps = 0;
-    mMachineStateDepsSem = NIL_RTSEMEVENTMULTI;
+    mMachineStateDeps          = 0;
+    mMachineStateDepsSem       = NIL_RTSEMEVENTMULTI;
     mMachineStateChangePending = 0;
 
-    mCurrentStateModified = TRUE;
-    mGuestPropertiesModified = FALSE;
-
-    mSession.mPid = NIL_RTPROCESS;
-    mSession.mState = SessionState_Unlocked;
+    mCurrentStateModified      = TRUE;
+    mGuestPropertiesModified   = FALSE;
+
+    mSession.mPid              = NIL_RTPROCESS;
+    mSession.mState            = SessionState_Unlocked;
 }
 
@@ -327,4 +335,8 @@
         }
 
+        /* At this point the changing of the current state modification
+         * flag is allowed. */
+        allowStateModification();
+
         /* commit all changes made during the initialization */
         commit();
@@ -425,4 +437,8 @@
                 if (FAILED(rc)) throw rc;
 
+                /* At this point the changing of the current state modification
+                 * flag is allowed. */
+                allowStateModification();
+
                 commit();
             }
@@ -464,4 +480,5 @@
 }
 
+#include <iprt/cpp/autores.h>
 /**
  *  Initializes a new instance from a machine config that is already in memory
@@ -518,7 +535,13 @@
         mUserData->s.strName = strName;
 
-        /* commit all changes made during the initialization */
         if (SUCCEEDED(rc))
+        {
+            /* At this point the changing of the current state modification
+             * flag is allowed. */
+            allowStateModification();
+
+            /* commit all changes made during the initialization */
             commit();
+        }
     }
 
@@ -6334,8 +6357,9 @@
  * @param fl
  */
-void Machine::setModified(uint32_t fl)
+void Machine::setModified(uint32_t fl, bool fAllowStateModification /* = true */)
 {
     mData->flModifications |= fl;
-    mData->mCurrentStateModified = true;
+    if (fAllowStateModification && isStateModificationAllowed())
+        mData->mCurrentStateModified = true;
 }
 
@@ -6346,8 +6370,8 @@
  * @param   fModifications      The flag to add.
  */
-void Machine::setModifiedLock(uint32_t fModification)
+void Machine::setModifiedLock(uint32_t fModification, bool fAllowStateModification /* = true */)
 {
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    setModified(fModification);
+    setModified(fModification, fAllowStateModification);
 }
 
Index: /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp	(revision 38995)
+++ /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp	(revision 38996)
@@ -1225,6 +1225,8 @@
     bool fNeedsGlobalSaveSettings = false;
 
-    // flag the machine as dirty or change won't get saved
-    mPeer->setModified(Machine::IsModified_Snapshots);
+    /* Flag the machine as dirty or change won't get saved. We disable the
+     * modification of the current state flag, cause this snapshot data isn't
+     * related to the current state. */
+    mPeer->setModified(Machine::IsModified_Snapshots, false /* fAllowStateModification */);
     HRESULT rc = mPeer->saveSettings(&fNeedsGlobalSaveSettings,
                                      SaveS_Force);        // we know we need saving, no need to check
