Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 30957)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 30958)
@@ -5321,8 +5321,4 @@
     if (SUCCEEDED(rc))
     {
-#ifdef VBOX_WITH_RESOURCE_USAGE_API
-        registerMetrics(mParent->performanceCollector(), this, pid);
-#endif /* VBOX_WITH_RESOURCE_USAGE_API */
-
         /*
          *  Set the session state to Spawning to protect against subsequent
@@ -9949,4 +9945,16 @@
         mData->mSession.mProgress->notifyComplete((HRESULT)iResult);
         mData->mSession.mProgress.setNull();
+
+        if (SUCCEEDED((HRESULT)iResult))
+        {
+#ifdef VBOX_WITH_RESOURCE_USAGE_API
+            /* The VM has been powered up successfully, so it makes sense
+             * now to offer the performance metrics for a running machine
+             * object. Doing it earlier wouldn't be safe. */
+            registerMetrics(mParent->performanceCollector(), mPeer,
+                            mData->mSession.mPid);
+#endif /* VBOX_WITH_RESOURCE_USAGE_API */
+
+        }
     }
     return S_OK;
