Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 45281)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 45282)
@@ -588,5 +588,6 @@
     message(mainWindowShown(),
             MessageType_Error,
-            tr("Failed to remove the virtual machine <b>%1</b>.").arg(machine.GetName()),
+            tr("Failed to remove the virtual machine <b>%1</b>.")
+               .arg(machine.GetName()),
             !machine.isOk() ? formatErrorInfo(machine) : formatErrorInfo(res));
 }
@@ -596,6 +597,21 @@
     message(mainWindowShown(),
             MessageType_Error,
-            tr("Failed to remove the virtual machine <b>%1</b>.").arg(machine.GetName()),
+            tr("Failed to remove the virtual machine <b>%1</b>.")
+               .arg(machine.GetName()),
             formatErrorInfo(progress.GetErrorInfo()));
+}
+
+bool UIMessageCenter::remindAboutInaccessibleMedia()
+{
+    return messageOkCancel(mainWindowShown(), MessageType_Warning,
+                           tr("<p>One or more virtual hard disks, CD/DVD or "
+                              "floppy media are not currently accessible. As a result, you will "
+                              "not be able to operate virtual machines that use these media until "
+                              "they become accessible later.</p>"
+                              "<p>Press <b>Check</b> to open the Virtual Media Manager window and "
+                              "see what media are inaccessible, or press <b>Ignore</b> to "
+                              "ignore this message.</p>"),
+                           "remindAboutInaccessibleMedia",
+                           tr("Check", "inaccessible media message box"));
 }
 
@@ -612,4 +628,36 @@
 }
 
+bool UIMessageCenter::confirmVMReset(const QString &strNames)
+{
+    return messageOkCancel(mainWindowShown(), MessageType_Question,
+                           tr("<p>Do you really want to reset the following virtual machines?</p>"
+                              "<p><b>%1</b></p><p>This will cause any unsaved data "
+                              "in applications running inside it to be lost.</p>")
+                              .arg(strNames),
+                           "confirmVMReset" /* pcszAutoConfirmId */,
+                           tr("Reset", "machine"));
+}
+
+bool UIMessageCenter::confirmVMACPIShutdown(const QString &strNames)
+{
+    return messageOkCancel(mainWindowShown(), MessageType_Question,
+                           tr("<p>Do you really want to send an ACPI shutdown signal "
+                              "to the following virtual machines?</p><p><b>%1</b></p>")
+                              .arg(strNames),
+                           "confirmVMACPIShutdown" /* pcszAutoConfirmId */,
+                           tr("ACPI Shutdown", "machine"));
+}
+
+bool UIMessageCenter::confirmVMPowerOff(const QString &strNames)
+{
+    return messageOkCancel(mainWindowShown(), MessageType_Question,
+                           tr("<p>Do you really want to power off the following virtual machines?</p>"
+                              "<p><b>%1</b></p><p>This will cause any unsaved data in applications "
+                              "running inside it to be lost.</p>")
+                              .arg(strNames),
+                           "confirmVMPowerOff" /* pcszAutoConfirmId */,
+                           tr("Power Off", "machine"));
+}
+
 void UIMessageCenter::cannotDiscardSavedState(const CConsole &console)
 {
@@ -618,57 +666,18 @@
     /* Show the message: */
     message(mainWindowShown(), MessageType_Error,
-            tr("Failed to discard the saved state of the virtual machine <b>%1</b>.").arg(console.GetMachine().GetName()),
+            tr("Failed to discard the saved state of the virtual machine <b>%1</b>.")
+               .arg(console.GetMachine().GetName()),
             formatErrorInfo(res));
 }
 
-bool UIMessageCenter::remindAboutInaccessibleMedia()
-{
-    int rc = message(&vboxGlobal().selectorWnd(), MessageType_Warning,
-        tr("<p>One or more virtual hard disks, CD/DVD or "
-           "floppy media are not currently accessible. As a result, you will "
-           "not be able to operate virtual machines that use these media until "
-           "they become accessible later.</p>"
-           "<p>Press <b>Check</b> to open the Virtual Media Manager window and "
-           "see what media are inaccessible, or press <b>Ignore</b> to "
-           "ignore this message.</p>"),
-        "remindAboutInaccessibleMedia",
-        QIMessageBox::Ok | QIMessageBox::Default,
-        QIMessageBox::Ignore | QIMessageBox::Escape,
-        0,
-        tr("Check", "inaccessible media message box"));
-
-    return rc == QIMessageBox::Ok; /* implies !AutoConfirmed */
-}
-
-bool UIMessageCenter::confirmVMReset(const QString &strNames)
-{
-    return messageOkCancel(mainMachineWindowShown(), MessageType_Question,
-        tr("<p>Do you really want to reset the following virtual machines?</p>"
-           "<p><b>%1</b></p><p>This will cause any unsaved data "
-           "in applications running inside it to be lost.</p>")
-           .arg(strNames),
-        "confirmVMReset" /* pcszAutoConfirmId */,
-        tr("Reset", "machine"));
-}
-
-bool UIMessageCenter::confirmVMACPIShutdown(const QString &strNames)
-{
-    return messageOkCancel(mainMachineWindowShown(), MessageType_Question,
-        tr("<p>Do you really want to send an ACPI shutdown signal "
-           "to the following virtual machines?</p><p><b>%1</b></p>")
-           .arg(strNames),
-        "confirmVMACPIShutdown" /* pcszAutoConfirmId */,
-        tr("ACPI Shutdown", "machine"));
-}
-
-bool UIMessageCenter::confirmVMPowerOff(const QString &strNames)
-{
-    return messageOkCancel(mainMachineWindowShown(), MessageType_Question,
-        tr("<p>Do you really want to power off the following virtual machines?</p>"
-           "<p><b>%1</b></p><p>This will cause any unsaved data in applications "
-           "running inside it to be lost.</p>")
-           .arg(strNames),
-        "confirmVMPowerOff" /* pcszAutoConfirmId */,
-        tr("Power Off", "machine"));
+void UIMessageCenter::cannotStopMachine(const CConsole &console)
+{
+    /* Preserve error-info: */
+    COMResult res(console);
+    /* Show the message: */
+    message(mainWindowShown(), MessageType_Error,
+            tr("Failed to stop the virtual machine <b>%1</b>.")
+               .arg(console.GetMachine().GetName()),
+            formatErrorInfo(res));
 }
 
@@ -1671,15 +1680,4 @@
         formatErrorInfo(progress.GetErrorInfo())
     );
-}
-
-void UIMessageCenter::cannotStopMachine(const CConsole &console)
-{
-    /* preserve the current error info before calling the object again */
-    COMResult res(console);
-
-    message(mainWindowShown(), MessageType_Error,
-        tr("Failed to stop the virtual machine <b>%1</b>.")
-            .arg(console.GetMachine().GetName()),
-        formatErrorInfo(res));
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 45281)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 45282)
@@ -219,10 +219,11 @@
     void cannotRemoveMachine(const CMachine &machine);
     void cannotRemoveMachine(const CMachine &machine, const CProgress &progress);
+    bool remindAboutInaccessibleMedia();
     bool confirmDiscardSavedState(const QString &strNames);
-    void cannotDiscardSavedState(const CConsole &console);
-    bool remindAboutInaccessibleMedia();
     bool confirmVMReset(const QString &strNames);
     bool confirmVMACPIShutdown(const QString &strNames);
     bool confirmVMPowerOff(const QString &strNames);
+    void cannotDiscardSavedState(const CConsole &console);
+    void cannotStopMachine(const CConsole &console);
 
     /* API: Snapshot warnings: */
@@ -309,5 +310,4 @@
     void cannotTakeSnapshot(const CConsole &console);
     void cannotTakeSnapshot(const CProgress &progress);
-    void cannotStopMachine(const CConsole &console);
     void cannotStopMachine(const CProgress &progress);
     void cannotSendACPIToMachine();
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp	(revision 45281)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp	(revision 45282)
@@ -692,4 +692,6 @@
         /* Power Off: */
         console.PowerDown();
+        if (!console.isOk())
+            msgCenter().cannotStopMachine(console);
 
         /* Unlock machine finally: */
