Index: /trunk/src/VBox/Main/include/NetworkAdapterImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/NetworkAdapterImpl.h	(revision 42824)
+++ /trunk/src/VBox/Main/include/NetworkAdapterImpl.h	(revision 42825)
@@ -90,5 +90,5 @@
     // public initializer/uninitializer for internal purposes only
     HRESULT init(Machine *aParent, ULONG aSlot);
-    HRESULT init(Machine *aParent, NetworkAdapter *aThat);
+    HRESULT init(Machine *aParent, NetworkAdapter *aThat, bool aReshare = false);
     HRESULT initCopy(Machine *aParent, NetworkAdapter *aThat);
     void uninit();
@@ -148,4 +148,6 @@
     void applyDefaults(GuestOSType *aOsType);
 
+    ComObjPtr<NetworkAdapter> getPeer();
+
 private:
 
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 42824)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 42825)
@@ -9101,4 +9101,6 @@
                 Utf8Str newConfigBaseDir(newConfigDir);
                 newConfigDir.append(newGroupPlusName);
+                /* consistency: use \ if appropriate on the platform */
+                RTPathChangeToDosSlashes(newConfigDir.mutableRaw(), false);
                 /* new dir and old dir cannot be equal here because of 'if'
                  * above and because name != newName */
@@ -11017,9 +11019,55 @@
     mBandwidthControl->commit();
 
-    /* Keep the original network adapter count until this point, so that
-     * discarding a chipset type change will not lose settings. */
-    mNetworkAdapters.resize(Global::getMaxNetworkAdapters(mHWData->mChipsetType));
-    for (ULONG slot = 0; slot < mNetworkAdapters.size(); slot++)
-        mNetworkAdapters[slot]->commit();
+    /* Since mNetworkAdapters is a list which might have been changed (resized)
+     * without using the Backupable<> template we need to handle the copying
+     * of the list entries manually, including the creation of peers for the
+     * new objects. */
+    bool commitNetworkAdapters = false;
+    size_t newSize = Global::getMaxNetworkAdapters(mHWData->mChipsetType);
+    if (mPeer)
+    {
+        /* commit everything, even the ones which will go away */
+        for (size_t slot = 0; slot < mNetworkAdapters.size(); slot++)
+            mNetworkAdapters[slot]->commit();
+        /* copy over the new entries, creating a peer and uninit the original */
+        mPeer->mNetworkAdapters.resize(RT_MAX(newSize, mPeer->mNetworkAdapters.size()));
+        for (size_t slot = 0; slot < newSize; slot++)
+        {
+            /* look if this adapter has a peer device */
+            ComObjPtr<NetworkAdapter> peer = mNetworkAdapters[slot]->getPeer();
+            if (!peer)
+            {
+                /* no peer means the adapter is a newly created one;
+                 * create a peer owning data this data share it with */
+                peer.createObject();
+                peer->init(mPeer, mNetworkAdapters[slot], true /* aReshare */);
+            }
+            mPeer->mNetworkAdapters[slot] = peer;
+        }
+        /* uninit any no longer needed network adapters */
+        for (size_t slot = newSize; slot < mNetworkAdapters.size(); slot++)
+            mNetworkAdapters[slot]->uninit();
+        for (size_t slot = newSize; slot < mPeer->mNetworkAdapters.size(); slot++)
+        {
+            if (mPeer->mNetworkAdapters[slot])
+                mPeer->mNetworkAdapters[slot]->uninit();
+        }
+        /* Keep the original network adapter count until this point, so that
+         * discarding a chipset type change will not lose settings. */
+        mNetworkAdapters.resize(newSize);
+        mPeer->mNetworkAdapters.resize(newSize);
+    }
+    else
+    {
+        /* we have no peer (our parent is the newly created machine);
+         * just commit changes to the network adapters */
+        commitNetworkAdapters = true;
+    }
+    if (commitNetworkAdapters)
+    {
+        for (size_t slot = 0; slot < mNetworkAdapters.size(); slot++)
+            mNetworkAdapters[slot]->commit();
+    }
+
     for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); slot++)
         mSerialPorts[slot]->commit();
@@ -11035,6 +11083,4 @@
         if (mPeer)
         {
-            AutoWriteLock peerlock(mPeer COMMA_LOCKVAL_SRC_POS);
-
             /* Commit all changes to new controllers (this will reshare data with
              * peers for those who have peers) */
Index: /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp	(revision 42824)
+++ /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp	(revision 42825)
@@ -108,4 +108,9 @@
  *  the object passed as an argument.
  *
+ *  @param  aReshare
+ *      When false, the original object will remain a data owner.
+ *      Otherwise, data ownership will be transferred from the original
+ *      object to this one.
+ *
  *  @note This object must be destroyed before the original object
  *  it shares data with is destroyed.
@@ -113,7 +118,7 @@
  *  @note Locks @a aThat object for reading.
  */
-HRESULT NetworkAdapter::init(Machine *aParent, NetworkAdapter *aThat)
-{
-    LogFlowThisFunc(("aParent=%p, aThat=%p\n", aParent, aThat));
+HRESULT NetworkAdapter::init(Machine *aParent, NetworkAdapter *aThat, bool aReshare /* = false */)
+{
+    LogFlowThisFunc(("aParent=%p, aThat=%p, aReshare=%RTbool\n", aParent, aThat, aReshare));
 
     ComAssertRet(aParent && aThat, E_INVALIDARG);
@@ -124,13 +129,25 @@
 
     unconst(mParent) = aParent;
-    unconst(mPeer) = aThat;
     unconst(mNATEngine).createObject();
     mNATEngine->init(aParent, this, aThat->mNATEngine);
 
+    /* sanity */
     AutoCaller thatCaller(aThat);
     AssertComRCReturnRC(thatCaller.rc());
 
-    AutoReadLock thatLock(aThat COMMA_LOCKVAL_SRC_POS);
-    mData.share(aThat->mData);
+    if (aReshare)
+    {
+        AutoWriteLock thatLock(aThat COMMA_LOCKVAL_SRC_POS);
+
+        unconst(aThat->mPeer) = this;
+        mData.attach(aThat->mData);
+    }
+    else
+    {
+        unconst(mPeer) = aThat;
+
+        AutoReadLock thatLock(aThat COMMA_LOCKVAL_SRC_POS);
+        mData.share(aThat->mData);
+    }
 
     /* Confirm a successful initialization */
@@ -1372,4 +1389,10 @@
 }
 
+ComObjPtr<NetworkAdapter> NetworkAdapter::getPeer()
+{
+    return mPeer;
+}
+
+
 // private methods
 ////////////////////////////////////////////////////////////////////////////////
