Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp	(revision 91364)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp	(revision 91365)
@@ -1850,5 +1850,5 @@
 }
 
-int UICommon::openMediumSelectorDialog(QWidget *pParent, UIMediumDeviceType  enmMediumType, QUuid &outUuid,
+int UICommon::openMediumSelectorDialog(QWidget *pParent, UIMediumDeviceType  enmMediumType, QUuid &inOutUuid,
                                        const QString &strMachineFolder, const QString &strMachineName,
                                        const QString &strMachineGuestOSTypeId, bool fEnableCreate, const QUuid &uMachineID /* = QUuid() */)
@@ -1857,5 +1857,5 @@
 
     QWidget *pDialogParent = windowManager().realParentWindow(pParent);
-    QPointer<UIMediumSelector> pSelector = new UIMediumSelector(enmMediumType, strMachineName,
+    QPointer<UIMediumSelector> pSelector = new UIMediumSelector(inOutUuid, enmMediumType, strMachineName,
                                                                 strMachineFolder, strMachineGuestOSTypeId,
                                                                 uMachineOrGlobalId, pDialogParent);
@@ -1883,6 +1883,6 @@
         else
         {
-            outUuid = selectedMediumIds[0];
-            updateRecentlyUsedMediumListAndFolder(enmMediumType, medium(outUuid).location());
+            inOutUuid = selectedMediumIds[0];
+            updateRecentlyUsedMediumListAndFolder(enmMediumType, medium(inOutUuid).location());
         }
     }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h	(revision 91364)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h	(revision 91365)
@@ -407,12 +407,13 @@
           * @param  parent                   Passes the parent of the dialog,
           * @param  enmMediumType            Passes the medium type.
+          * @param  inOutUuid                Passes the currently selected medium id if there is one.
+          * @param  strMachineFolder         Passes the machine folder,
           * @param  strMachineName           Passes the name of the machine,
-          * @param  strMachineFolder         Passes the machine folder,
           * @param  strMachineGuestOSTypeId  Passes the type ID of machine's guest os,
           * @param  fEnableCreate            Passes whether to show/enable create action in the medium selector dialog,
           * @param  uMachineID               Passes the machine UUID,
           * returns the return code of the UIMediumSelector::ReturnCode as int. In case of a medium selection
-          *         UUID of the selected medium is stored in @param outUuid.*/
-        int openMediumSelectorDialog(QWidget *pParent, UIMediumDeviceType  enmMediumType, QUuid &outUuid,
+          *         UUID of the selected medium is stored in @param inOutUuid.*/
+        int openMediumSelectorDialog(QWidget *pParent, UIMediumDeviceType  enmMediumType, QUuid &inOutUuid,
                                      const QString &strMachineFolder, const QString &strMachineName,
                                      const QString &strMachineGuestOSTypeId, bool fEnableCreate, const QUuid &uMachineID = QUuid());
Index: /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp	(revision 91364)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.cpp	(revision 91365)
@@ -53,5 +53,5 @@
 
 
-UIMediumSelector::UIMediumSelector(UIMediumDeviceType enmMediumType, const QString &machineName,
+UIMediumSelector::UIMediumSelector(const QUuid &uCurrentMediumId, UIMediumDeviceType enmMediumType, const QString &machineName,
                                    const QString &machineSettingsFilePath, const QString &strMachineGuestOSTypeId,
                                    const QUuid &uMachineID, QWidget *pParent)
@@ -85,4 +85,5 @@
     configure();
     finalize();
+    selectMedium(uCurrentMediumId);
 }
 
@@ -554,5 +555,5 @@
 void UIMediumSelector::selectMedium(const QUuid &uMediumID)
 {
-    if (!m_pTreeWidget)
+    if (!m_pTreeWidget || uMediumID.isNull())
         return;
     UIMediumItem *pMediumItem = searchItem(0, uMediumID);
@@ -618,4 +619,7 @@
     if (m_pParent)
         UIDesktopWidgetWatchdog::centerWidget(this, m_pParent, false);
+
+    if (m_pTreeWidget)
+        m_pTreeWidget->setFocus();
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.h	(revision 91364)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumSelector.h	(revision 91365)
@@ -51,5 +51,5 @@
 public:
 
-    UIMediumSelector(UIMediumDeviceType enmMediumType, const QString &machineName,
+    UIMediumSelector(const QUuid &uCurrentMediumId, UIMediumDeviceType enmMediumType, const QString &machineName,
                      const QString &machineSettingsFilePath, const QString &strMachineGuestOSTypeId,
                      const QUuid &uMachineID, QWidget *pParent);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp	(revision 91364)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp	(revision 91365)
@@ -4003,5 +4003,8 @@
 
     QUuid uMediumId;
-    int iResult = uiCommon().openMediumSelectorDialog(this, m_pMediumIdHolder->type(), uMediumId,
+    if (m_pMediumIdHolder)
+        uMediumId = m_pMediumIdHolder->id();
+
+    int iResult = uiCommon().openMediumSelectorDialog(this, m_pMediumIdHolder->type(), uMediumId /* in/out parameter */,
                                                       strMachineFolder, m_strMachineName,
                                                       m_strMachineGuestOSTypeId,
