Index: /trunk/src/VBox/Main/include/ConsoleImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 54797)
+++ /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 54798)
@@ -704,5 +704,5 @@
                        MachineState_T aMachineState,
                        HRESULT *phrc);
-    int i_configMediumProperties(PCFGMNODE pCur, IMedium *pMedium, bool *pfHostIP);
+    int i_configMediumProperties(PCFGMNODE pCur, IMedium *pMedium, bool *pfHostIP, bool *pfEncrypted);
     static DECLCALLBACK(int) i_reconfigureMediumAttachment(Console *pThis,
                                                            PUVM pUVM,
@@ -993,4 +993,6 @@
     /** Map of secret keys used for disk encryption. */
     SecretKeyMap         m_mapSecretKeys;
+    /** Number of disks configured for encryption. */
+    unsigned             m_cDisksEncrypted;
 
     /** Pointer to the key consumer -> provider (that's us) callbacks. */
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 54797)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 54798)
@@ -3388,5 +3388,24 @@
         m_mapSecretKeys.insert(std::make_pair(aId, pKey));
         hrc = i_configureEncryptionForDisk(aId);
-        if (FAILED(hrc))
+        if (SUCCEEDED(hrc))
+        {
+            if (   m_mapSecretKeys.size() == m_cDisksEncrypted
+                && mMachineState == MachineState_Paused)
+            {
+                /* get the VM handle. */
+                SafeVMPtr ptrVM(this);
+                if (!ptrVM.isOk())
+                    return ptrVM.rc();
+
+                alock.release();
+                int vrc = VMR3Resume(ptrVM.rawUVM(), VMRESUMEREASON_RECONFIG);
+
+                hrc = RT_SUCCESS(vrc) ? S_OK :
+                    setError(VBOX_E_VM_ERROR,
+                             tr("Could not resume the machine execution (%Rrc)"),
+                             vrc);
+            }
+        }
+        else
             m_mapSecretKeys.erase(aId);
     }
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 54797)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 54798)
@@ -4258,5 +4258,6 @@
                 /* Pass all custom parameters. */
                 bool fHostIP = true;
-                hrc = i_configMediumProperties(pCfg, pMedium, &fHostIP); H();
+                bool fEncrypted = false;
+                hrc = i_configMediumProperties(pCfg, pMedium, &fHostIP, &fEncrypted); H();
 
                 /* Create an inverted list of parents. */
@@ -4286,5 +4287,5 @@
 
                     /* Configure medium properties. */
-                    hrc = i_configMediumProperties(pCur, pMedium, &fHostIP); H();
+                    hrc = i_configMediumProperties(pCur, pMedium, &fHostIP, &fEncrypted); H();
 
                     /* next */
@@ -4297,4 +4298,7 @@
                 if (!fHostIP)
                     InsertConfigInteger(pCfg, "HostIPStack", 0);
+
+                if (fEncrypted)
+                    m_cDisksEncrypted++;
             }
         }
@@ -4314,9 +4318,10 @@
  *
  * @returns VBox status code.
- * @param   pCur       The current CFGM node.
- * @param   pMedium    The medium object to configure.
- * @param   pfHostIP   Where to return the value of the \"HostIPStack\" property if found.
+ * @param   pCur        The current CFGM node.
+ * @param   pMedium     The medium object to configure.
+ * @param   pfHostIP    Where to return the value of the \"HostIPStack\" property if found.
+ * @param   pfEncrypted Where to return whether the medium is encrypted.
  */
-int Console::i_configMediumProperties(PCFGMNODE pCur, IMedium *pMedium, bool *pfHostIP)
+int Console::i_configMediumProperties(PCFGMNODE pCur, IMedium *pMedium, bool *pfHostIP, bool *pfEncrypted)
 {
     /* Pass all custom parameters. */
@@ -4365,4 +4370,8 @@
                         *pfHostIP = false;
                 }
+
+                if (   name.compare("CRYPT/KeyId") == 0
+                    && pfEncrypted)
+                    *pfEncrypted = true;
             }
         }
