Index: /trunk/src/VBox/Main/DHCPServerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/DHCPServerImpl.cpp	(revision 30376)
+++ /trunk/src/VBox/Main/DHCPServerImpl.cpp	(revision 30377)
@@ -150,9 +150,10 @@
     if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
-    /* VirtualBox::saveSettings() needs a write lock */
-    AutoMultiWriteLock2 alock(mVirtualBox, this COMMA_LOCKVAL_SRC_POS);
-
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     m.enabled = aEnabled;
 
+    // save the global settings; for that we should hold only the VirtualBox lock
+    alock.release();
+    AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
     HRESULT rc = mVirtualBox->saveSettings();
 
@@ -218,7 +219,5 @@
     if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
-    /* VirtualBox::saveSettings() needs a write lock */
-    AutoMultiWriteLock2 alock(mVirtualBox, this COMMA_LOCKVAL_SRC_POS);
-
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     m.IPAddress = aIPAddress;
     m.networkMask = aNetworkMask;
@@ -226,4 +225,7 @@
     m.upperIP = aUpperIP;
 
+    // save the global settings; for that we should hold only the VirtualBox lock
+    alock.release();
+    AutoWriteLock vboxLock(mVirtualBox COMMA_LOCKVAL_SRC_POS);
     return mVirtualBox->saveSettings();
 }
Index: /trunk/src/VBox/Main/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/HostImpl.cpp	(revision 30376)
+++ /trunk/src/VBox/Main/HostImpl.cpp	(revision 30377)
@@ -1143,5 +1143,5 @@
     }
 
-    /* save the global settings */
+    // save the global settings; for that we should hold only the VirtualBox lock
     alock.release();
     AutoWriteLock vboxLock(m->pParent COMMA_LOCKVAL_SRC_POS);
@@ -1199,5 +1199,5 @@
     }
 
-    /* save the global settings */
+    // save the global settings; for that we should hold only the VirtualBox lock
     alock.release();
     AutoWriteLock vboxLock(m->pParent COMMA_LOCKVAL_SRC_POS);
@@ -1764,4 +1764,5 @@
 
         // save the global settings... yeah, on every single filter property change
+        // for that we should hold only the VirtualBox lock
         alock.release();
         AutoWriteLock vboxLock(m->pParent COMMA_LOCKVAL_SRC_POS);
Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 30376)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 30377)
@@ -3163,4 +3163,5 @@
     if (fNeedsSaveSettings)
     {
+        // save the global settings; for that we should hold only the VirtualBox lock
         mediumLock.release();
         treeLock.leave();
@@ -3257,4 +3258,5 @@
         if (fNeedsGlobalSaveSettings)
         {
+            // save the global settings; for that we should hold only the VirtualBox lock
             alock.release();
             AutoWriteLock vboxlock(this COMMA_LOCKVAL_SRC_POS);
@@ -3656,4 +3658,5 @@
         if (fNeedsGlobalSaveSettings)
         {
+            // save the global settings; for that we should hold only the VirtualBox lock
             alock.release();
             AutoWriteLock vboxlock(mParent COMMA_LOCKVAL_SRC_POS);
@@ -3691,4 +3694,5 @@
     if (SUCCEEDED(rc) && fNeedsGlobalSaveSettings)
     {
+        // save the global settings; for that we should hold only the VirtualBox lock
         AutoWriteLock vlock(mParent COMMA_LOCKVAL_SRC_POS);
         rc = mParent->saveSettings();
@@ -10799,6 +10803,5 @@
     AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
 
-    /* saveSettings() needs mParent lock */
-    AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS);
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     HRESULT rc = S_OK;
Index: /trunk/src/VBox/Main/MediumImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MediumImpl.cpp	(revision 30376)
+++ /trunk/src/VBox/Main/MediumImpl.cpp	(revision 30377)
@@ -1443,9 +1443,7 @@
     m->type = aType;
 
+    // save the global settings; for that we should hold only the VirtualBox lock
     mlock.release();
-
-    // saveSettings needs vbox lock
     AutoWriteLock alock(m->pVirtualBox COMMA_LOCKVAL_SRC_POS);
-
     HRESULT rc = m->pVirtualBox->saveSettings();
 
@@ -1572,9 +1570,7 @@
         m->autoReset = !!aAutoReset;
 
+        // save the global settings; for that we should hold only the VirtualBox lock
         mlock.release();
-
-        // saveSettings needs vbox lock
         AutoWriteLock alock(m->pVirtualBox COMMA_LOCKVAL_SRC_POS);
-
         return m->pVirtualBox->saveSettings();
     }
@@ -2014,7 +2010,6 @@
         it->second = aValue;
 
+    // save the global settings; for that we should hold only the VirtualBox lock
     mlock.release();
-
-    // saveSettings needs vbox lock
     AutoWriteLock alock(m->pVirtualBox COMMA_LOCKVAL_SRC_POS);
     HRESULT rc = m->pVirtualBox->saveSettings();
@@ -2179,5 +2174,5 @@
 
     bool fNeedsSaveSettings = false;
-    ComObjPtr <Progress> pProgress;
+    ComObjPtr<Progress> pProgress;
 
     HRESULT rc = deleteStorage(&pProgress,
@@ -5210,9 +5205,7 @@
                                task.mVDOperationIfaces);
             if (RT_FAILURE(vrc))
-            {
                 throw setError(E_FAIL,
                             tr("Could not create the hard disk storage unit '%s'%s"),
                             location.raw(), vdError(vrc).raw());
-            }
 
             size = VDGetFileSize(hdd, 0);
@@ -5441,4 +5434,5 @@
         if (fNeedsSaveSettings)
         {
+            // save the global settings; for that we should hold only the VirtualBox lock
             mediaLock.release();
             AutoWriteLock vboxlock(m->pVirtualBox COMMA_LOCKVAL_SRC_POS);
@@ -5727,4 +5721,5 @@
     {
         // in asynchronous mode, save settings now
+        // for that we should hold only the VirtualBox lock
         AutoWriteLock vboxlock(m->pVirtualBox COMMA_LOCKVAL_SRC_POS);
         m->pVirtualBox->saveSettings();
Index: /trunk/src/VBox/Main/SnapshotImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/SnapshotImpl.cpp	(revision 30376)
+++ /trunk/src/VBox/Main/SnapshotImpl.cpp	(revision 30377)
@@ -1530,5 +1530,6 @@
     mSnapshotData.mSnapshot.setNull();
 
-    // save VirtualBox.xml (media registry most probably changed with diff image)
+    // save VirtualBox.xml (media registry most probably changed with diff image);
+    // for that we should hold only the VirtualBox lock
     machineLock.release();
     AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);
Index: /trunk/src/VBox/Main/VirtualBoxImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/VirtualBoxImpl.cpp	(revision 30376)
+++ /trunk/src/VBox/Main/VirtualBoxImpl.cpp	(revision 30377)
@@ -3531,5 +3531,7 @@
  *  places internally when settings need saving.
  *
- *  @note Caller must have locked the VirtualBox object for writing!
+ *  @note Caller must have locked the VirtualBox object for writing and must not hold any
+ *    other locks since this locks all kinds of member objects and trees temporarily,
+ *    which could cause conflicts.
  */
 HRESULT VirtualBox::saveSettings()
@@ -4792,7 +4794,5 @@
     rc = FindDHCPServerByNetworkName(name, existing.asOutParam());
     if (SUCCEEDED(rc))
-    {
         return E_INVALIDARG;
-    }
 
     rc = S_OK;
@@ -4836,6 +4836,4 @@
     AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
 
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
     AutoCaller dhcpServerCaller(aDHCPServer);
     AssertComRCReturn(dhcpServerCaller.rc(), dhcpServerCaller.rc());
