Index: /trunk/src/VBox/Main/VirtualBoxImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/VirtualBoxImpl.cpp	(revision 30937)
+++ /trunk/src/VBox/Main/VirtualBoxImpl.cpp	(revision 30938)
@@ -1310,5 +1310,8 @@
 
     ComObjPtr<Machine> machine;
-    HRESULT rc = findMachine(Guid(aId), true /* setError */, &machine);
+    HRESULT rc = findMachine(Guid(aId),
+                             true /* fPermitInaccessible */,
+                             true /* setError */,
+                             &machine);
 
     /* the below will set *aMachine to NULL if machine is null */
@@ -1381,5 +1384,8 @@
     // find machine from the given ID
     ComObjPtr<Machine> pMachine;
-    HRESULT rc = findMachine(id, true /* setError */, &pMachine);
+    HRESULT rc = findMachine(id,
+                             true /* fPermitInaccessible */,
+                             true /* setError */,
+                             &pMachine);
     if (FAILED(rc)) return rc;
 
@@ -1949,5 +1955,8 @@
     ComObjPtr<Machine> machine;
 
-    HRESULT rc = findMachine(id, true /* setError */, &machine);
+    HRESULT rc = findMachine(id,
+                             false /* fPermitInaccessible */,
+                             true /* setError */,
+                             &machine);
     if (FAILED(rc)) return rc;
 
@@ -2005,5 +2014,8 @@
     ComObjPtr<Machine> machine;
 
-    HRESULT rc = findMachine(id, true /* setError */, &machine);
+    HRESULT rc = findMachine(id,
+                             false /* fPermitInaccessible */,
+                             true /* setError */,
+                             &machine);
     if (FAILED(rc)) return rc;
 
@@ -2071,5 +2083,8 @@
     ComObjPtr<Machine> machine;
 
-    HRESULT rc = findMachine(id, true /* setError */, &machine);
+    HRESULT rc = findMachine(id,
+                             false /* fPermitInaccessible */,
+                             true /* setError */,
+                             &machine);
     if (FAILED(rc)) return rc;
 
@@ -2842,21 +2857,16 @@
 
 /**
- *  Searches for a Machine object with the given ID in the collection
+ *  Searches for a machine object with the given ID in the collection
  *  of registered machines.
  *
- *  @param id
- *      ID of the machine
- *  @param doSetError
- *      if TRUE, the appropriate error info is set in case when the machine
- *      is not found
- *  @param machine
- *      where to store the found machine object (can be NULL)
- *
- *  @return
- *      S_OK when found or VBOX_E_OBJECT_NOT_FOUND when not found
- *
- *  @note Locks this object for reading.
+ * @param aId Machine UUID to look for.
+ * @param aPermitInaccessible If true, inaccessible machines will be found;
+ *                  if false, this will fail if the given machine is inaccessible.
+ * @param aSetError If true, set errorinfo if the machine is not found.
+ * @param aMachine Returned machine, if found.
+ * @return
  */
 HRESULT VirtualBox::findMachine(const Guid &aId,
+                                bool fPermitInaccessible,
                                 bool aSetError,
                                 ComObjPtr<Machine> *aMachine /* = NULL */)
@@ -2875,8 +2885,12 @@
         {
             ComObjPtr<Machine> pMachine2 = *it;
-            AutoCaller machCaller(pMachine2);
-            /* skip inaccessible machines */
-            if (FAILED(machCaller.rc()))
-                continue;
+
+            if (!fPermitInaccessible)
+            {
+                // skip inaccessible machines
+                AutoCaller machCaller(pMachine2);
+                if (FAILED(machCaller.rc()))
+                    continue;
+            }
 
             if (pMachine2->getId() == aId)
@@ -3555,5 +3569,8 @@
     {
         ComObjPtr<Machine> pMachine;
-        rc = findMachine(aMachine->getId(), false /* aDoSetError */, &pMachine);
+        rc = findMachine(aMachine->getId(),
+                         true /* fPermitInaccessible */,
+                         false /* aDoSetError */,
+                         &pMachine);
         if (SUCCEEDED(rc))
         {
Index: /trunk/src/VBox/Main/include/VirtualBoxImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/VirtualBoxImpl.h	(revision 30937)
+++ /trunk/src/VBox/Main/include/VirtualBoxImpl.h	(revision 30938)
@@ -227,5 +227,7 @@
     }
 
-    HRESULT findMachine (const Guid &aId, bool aSetError,
+    HRESULT findMachine (const Guid &aId,
+                         bool fPermitInaccessible,
+                         bool aSetError,
                          ComObjPtr<Machine> *machine = NULL);
 
