Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp	(revision 84584)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp	(revision 84585)
@@ -681,15 +681,23 @@
                  || !strcmp(a->argv[1], "shutdown")) /* With shutdown we mean gracefully powering off the VM by letting the guest OS do its thing. */
         {
-            ComPtr<IGuest> guest;
-            CHECK_ERROR_BREAK(console, COMGETTER(Guest)(guest.asOutParam()));
+            ComPtr<IGuest> pGuest;
+            CHECK_ERROR_BREAK(console, COMGETTER(Guest)(pGuest.asOutParam()));
+            if (!pGuest)
+            {
+                RTMsgError("Guest not running");
+                rc = E_FAIL;
+                break;
+            }
 
             const bool fReboot = !strcmp(a->argv[1], "reboot");
 
             com::SafeArray<GuestShutdownFlag_T> aShutdownFlags;
+            aShutdownFlags.resize(1);
+
             if (fReboot)
                 aShutdownFlags.push_back(GuestShutdownFlag_Reboot);
             else
                 aShutdownFlags.push_back(GuestShutdownFlag_PowerOff);
-            CHECK_ERROR(guest, Shutdown(ComSafeArrayAsInParam(aShutdownFlags)));
+            CHECK_ERROR(pGuest, Shutdown(ComSafeArrayAsInParam(aShutdownFlags)));
             if (FAILED(rc))
             {
Index: /trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp	(revision 84584)
+++ /trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp	(revision 84585)
@@ -513,4 +513,6 @@
         return setError(E_INVALIDARG, tr("Invalid combination of flags (%#x)"), fFlags);
 
+    Utf8Str strAction = (fFlags & GuestShutdownFlag_Reboot) ? tr("Rebooting") : tr("Shutting down");
+
     /*
      * Create an anonymous session. This is required to run shutting down / rebooting
@@ -518,5 +520,5 @@
      */
     GuestSessionStartupInfo startupInfo;
-    startupInfo.mName = "Shutting down guest";
+    startupInfo.mName = strAction + " guest";
 
     GuestCredentials guestCreds;
@@ -541,5 +543,5 @@
                     case VERR_NOT_SUPPORTED:
                         hrc = setErrorBoth(VBOX_E_NOT_SUPPORTED, vrc,
-                                           tr("Shutting down not supported by installed Guest Additions"), vrc);
+                                           tr("%s not supported by installed Guest Additions"), strAction.c_str());
                         break;
 
@@ -548,5 +550,5 @@
                         if (vrc == VERR_GSTCTL_GUEST_ERROR)
                             vrc = rcGuest;
-                        hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Could not shut down guest: %Rrc"), vrc);
+                        hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Error %s guest: %Rrc"), strAction.c_str(), vrc);
                         break;
                     }
