Index: /trunk/src/VBox/Main/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 29362)
+++ /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 29363)
@@ -3878,5 +3878,5 @@
  * @note Locks this object for writing.
  */
-HRESULT Console::onVRDPServerChange()
+HRESULT Console::onVRDPServerChange(BOOL aRestart)
 {
     AutoCaller autoCaller(this);
@@ -3899,29 +3899,32 @@
         ComAssertComRCRetRC(rc);
 
-        /* VRDP server may call this Console object back from other threads (VRDP INPUT or OUTPUT). */
-        alock.leave();
-
-        if (vrdpEnabled)
-        {
-            // If there was no VRDP server started the 'stop' will do nothing.
-            // However if a server was started and this notification was called,
-            // we have to restart the server.
-            mConsoleVRDPServer->Stop();
-
-            if (RT_FAILURE(mConsoleVRDPServer->Launch()))
+        if (aRestart)
+        {
+            /* VRDP server may call this Console object back from other threads (VRDP INPUT or OUTPUT). */
+            alock.leave();
+
+            if (vrdpEnabled)
             {
-                rc = E_FAIL;
+                // If there was no VRDP server started the 'stop' will do nothing.
+                // However if a server was started and this notification was called,
+                // we have to restart the server.
+                mConsoleVRDPServer->Stop();
+
+                if (RT_FAILURE(mConsoleVRDPServer->Launch()))
+                {
+                    rc = E_FAIL;
+                }
+                else
+                {
+                    mConsoleVRDPServer->EnableConnections();
+                }
             }
             else
             {
-                mConsoleVRDPServer->EnableConnections();
+                mConsoleVRDPServer->Stop();
             }
-        }
-        else
-        {
-            mConsoleVRDPServer->Stop();
-        }
-
-        alock.enter();
+
+            alock.enter();
+        }
     }
 
Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 29362)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 29363)
@@ -8929,5 +8929,5 @@
 
         if (flModifications & IsModified_VRDPServer)
-            that->onVRDPServerChange();
+            that->onVRDPServerChange(/* aRestart */ TRUE);
         if (flModifications & IsModified_USB)
             that->onUSBControllerChange();
@@ -10565,5 +10565,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onVRDPServerChange()
+HRESULT SessionMachine::onVRDPServerChange(BOOL aRestart)
 {
     LogFlowThisFunc(("\n"));
@@ -10582,5 +10582,5 @@
         return S_OK;
 
-    return directControl->OnVRDPServerChange();
+    return directControl->OnVRDPServerChange(aRestart);
 }
 
Index: /trunk/src/VBox/Main/SessionImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/SessionImpl.cpp	(revision 29362)
+++ /trunk/src/VBox/Main/SessionImpl.cpp	(revision 29363)
@@ -582,5 +582,5 @@
 }
 
-STDMETHODIMP Session::OnVRDPServerChange()
+STDMETHODIMP Session::OnVRDPServerChange(BOOL aRestart)
 {
     LogFlowThisFunc(("\n"));
@@ -593,5 +593,5 @@
     AssertReturn(mType == SessionType_Direct, VBOX_E_INVALID_OBJECT_STATE);
 
-    return mConsole->onVRDPServerChange();
+    return mConsole->onVRDPServerChange(aRestart);
 }
 
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 29362)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 29363)
@@ -13148,5 +13148,5 @@
   <interface
      name="IInternalSessionControl" extends="$unknown"
-     uuid="cc8d63a0-568e-45dd-9bf6-6354049ece1e"
+     uuid="ab161f72-e4b3-44e6-a919-2256474bda66"
      internal="yes"
      wsmap="suppress"
@@ -13341,4 +13341,7 @@
 
       </desc>
+      <param name="restart" type="boolean" dir="in">
+        <desc>Flag whether the server must be restarted</desc>
+      </param>
     </method>
 
Index: /trunk/src/VBox/Main/include/ConsoleImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 29362)
+++ /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 29363)
@@ -175,5 +175,5 @@
     HRESULT onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce);
     HRESULT onCPUChange(ULONG aCPU, BOOL aRemove);
-    HRESULT onVRDPServerChange();
+    HRESULT onVRDPServerChange(BOOL aRestart);
     HRESULT onUSBControllerChange();
     HRESULT onSharedFolderChange(BOOL aGlobal);
Index: /trunk/src/VBox/Main/include/MachineImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MachineImpl.h	(revision 29362)
+++ /trunk/src/VBox/Main/include/MachineImpl.h	(revision 29363)
@@ -605,5 +605,5 @@
     virtual HRESULT onSerialPortChange(ISerialPort * /* serialPort */) { return S_OK; }
     virtual HRESULT onParallelPortChange(IParallelPort * /* parallelPort */) { return S_OK; }
-    virtual HRESULT onVRDPServerChange() { return S_OK; }
+    virtual HRESULT onVRDPServerChange(BOOL /* aRestart */) { return S_OK; }
     virtual HRESULT onUSBControllerChange() { return S_OK; }
     virtual HRESULT onStorageControllerChange() { return S_OK; }
@@ -943,5 +943,5 @@
     HRESULT onParallelPortChange(IParallelPort *parallelPort);
     HRESULT onCPUChange(ULONG aCPU, BOOL aRemove);
-    HRESULT onVRDPServerChange();
+    HRESULT onVRDPServerChange(BOOL aRestart);
     HRESULT onUSBControllerChange();
     HRESULT onUSBDeviceAttach(IUSBDevice *aDevice,
Index: /trunk/src/VBox/Main/include/SessionImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/SessionImpl.h	(revision 29362)
+++ /trunk/src/VBox/Main/include/SessionImpl.h	(revision 29363)
@@ -93,5 +93,5 @@
     STDMETHOD(OnMediumChange)(IMediumAttachment *aMediumAttachment, BOOL aForce);
     STDMETHOD(OnCPUChange)(ULONG aCPU, BOOL aRemove);
-    STDMETHOD(OnVRDPServerChange)();
+    STDMETHOD(OnVRDPServerChange)(BOOL aRestart);
     STDMETHOD(OnUSBControllerChange)();
     STDMETHOD(OnSharedFolderChange)(BOOL aGlobal);
