Index: /trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h	(revision 84647)
+++ /trunk/src/VBox/Main/include/GuestCtrlImplPrivate.h	(revision 84648)
@@ -604,4 +604,103 @@
 };
 
+/**
+ * Class for keeping guest error information.
+ */
+class GuestErrorInfo
+{
+public:
+
+    /**
+     * Enumeration for specifying the guest error type.
+     */
+    enum Type
+    {
+        /** Guest error is anonymous. Avoid this. */
+        Type_Anonymous = 0,
+        /** Guest error is from a guest session. */
+        Type_Session,
+        /** Guest error is from a guest process. */
+        Type_Process,
+        /** Guest error is from a guest file object. */
+        Type_File,
+        /** Guest error is from a guest directory object. */
+        Type_Directory,
+        /** Guest error is from a the built-in toolbox "vbox_cat" command. */
+        Type_ToolCat,
+        /** Guest error is from a the built-in toolbox "vbox_ls" command. */
+        Type_ToolLs,
+        /** Guest error is from a the built-in toolbox "vbox_rm" command. */
+        Type_ToolRm,
+        /** Guest error is from a the built-in toolbox "vbox_mkdir" command. */
+        Type_ToolMkDir,
+        /** Guest error is from a the built-in toolbox "vbox_mktemp" command. */
+        Type_ToolMkTemp,
+        /** Guest error is from a the built-in toolbox "vbox_stat" command. */
+        Type_ToolStat,
+        /** The usual 32-bit hack. */
+        Type_32BIT_HACK = 0x7fffffff
+    };
+
+    /**
+     * Initialization constructor.
+     *
+     * @param   eType           Error type to use.
+     * @param   rc              IPRT-style rc to use.
+     * @param   pcszWhat        Subject to use.
+     */
+    GuestErrorInfo(GuestErrorInfo::Type eType, int rc, const char *pcszWhat)
+    {
+        int rc2 = setV(eType, rc, pcszWhat);
+        if (RT_FAILURE(rc2))
+            throw rc2;
+    }
+
+    /**
+     * Returns the (IPRT-style) rc of this error.
+     *
+     * @returns VBox status code.
+     */
+    int getRc(void) const { return mRc; }
+
+    /**
+     * Returns the type of this error.
+     *
+     * @returns Error type.
+     */
+    Type getType(void) const { return mType; }
+
+    /**
+     * Returns the subject of this error.
+     *
+     * @returns Subject as a string.
+     */
+    Utf8Str getWhat(void) const { return mWhat; }
+
+    /**
+     * Sets the error information using a variable arguments list (va_list).
+     *
+     * @returns VBox status code.
+     * @param   eType           Error type to use.
+     * @param   rc              IPRT-style rc to use.
+     * @param   pcszWhat        Subject to use.
+     */
+    int setV(GuestErrorInfo::Type eType, int rc, const char *pcszWhat)
+    {
+        mType = eType;
+        mRc   = rc;
+        mWhat = pcszWhat;
+
+        return VINF_SUCCESS;
+    }
+
+protected:
+
+    /** Error type. */
+    Type    mType;
+    /** IPRT-style error code. */
+    int     mRc;
+    /** Subject string related to this error. */
+    Utf8Str mWhat;
+};
 
 /**
@@ -1169,7 +1268,12 @@
     int waitForEvent(GuestWaitEvent *pEvent, uint32_t uTimeoutMS, VBoxEventType_T *pType, IEvent **ppEvent);
 
+#ifndef VBOX_GUESTCTRL_TEST_CASE
+    HRESULT setErrorExternal(VirtualBoxBase *pInterface, const Utf8Str &strAction, const GuestErrorInfo &guestErrorInfo);
+#endif
+
 public:
 
     static FsObjType_T fileModeToFsObjType(RTFMODE fMode);
+    static Utf8Str getErrorAsString(const GuestErrorInfo &guestErrorInfo);
 
 protected:
Index: /trunk/src/VBox/Main/include/GuestDirectoryImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestDirectoryImpl.h	(revision 84647)
+++ /trunk/src/VBox/Main/include/GuestDirectoryImpl.h	(revision 84648)
@@ -66,6 +66,5 @@
     /** @name Public static internal methods.
      * @{ */
-    static Utf8Str i_guestErrorToString(int guestRc);
-    static HRESULT i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc);
+    static Utf8Str i_guestErrorToString(int rcGuest, const char *pcszWhat);
     /** @}  */
 
Index: /trunk/src/VBox/Main/include/GuestFileImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestFileImpl.h	(revision 84647)
+++ /trunk/src/VBox/Main/include/GuestFileImpl.h	(revision 84648)
@@ -61,5 +61,4 @@
     int             i_closeFile(int *pGuestRc);
     EventSource    *i_getEventSource(void) { return mEventSource; }
-    static Utf8Str  i_guestErrorToString(int guestRc);
     int             i_onFileNotify(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);
     int             i_onGuestDisconnected(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCbData);
@@ -70,5 +69,4 @@
                                  void* pvData, size_t cbData, size_t* pcbRead);
     int             i_seekAt(int64_t iOffset, GUEST_FILE_SEEKTYPE eSeekType, uint32_t uTimeoutMS, uint64_t *puOffset);
-    static HRESULT  i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc);
     int             i_setFileStatus(FileStatus_T fileStatus, int fileRc);
     int             i_waitForOffsetChange(GuestWaitEvent *pEvent, uint32_t uTimeoutMS, uint64_t *puOffset);
@@ -78,4 +76,9 @@
     int             i_writeData(uint32_t uTimeoutMS, const void *pvData, uint32_t cbData, uint32_t *pcbWritten);
     int             i_writeDataAt(uint64_t uOffset, uint32_t uTimeoutMS, const void *pvData, uint32_t cbData, uint32_t *pcbWritten);
+    /** @}  */
+
+    /** @name Static helper methods.
+     * @{ */
+    static Utf8Str  i_guestErrorToString(int guestRc, const char *pcszWhat);
     /** @}  */
 
Index: /trunk/src/VBox/Main/include/GuestProcessImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestProcessImpl.h	(revision 84647)
+++ /trunk/src/VBox/Main/include/GuestProcessImpl.h	(revision 84648)
@@ -77,7 +77,6 @@
     /** @name Static internal methods.
      * @{ */
-    static Utf8Str i_guestErrorToString(int guestRc);
+    static Utf8Str i_guestErrorToString(int rcGuest, const char *pcszWhat);
     static bool i_isGuestError(int guestRc);
-    static HRESULT i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc);
     static ProcessWaitResult_T i_waitFlagsToResultEx(uint32_t fWaitFlags, ProcessStatus_T oldStatus, ProcessStatus_T newStatus, uint32_t uProcFlags, uint32_t uProtocol);
 #if 0 /* unused */
@@ -271,4 +270,9 @@
     /** @}  */
 
+    /** Wrapped @name Static guest error conversion methods.
+     * @{ */
+    static Utf8Str guestErrorToString(const char *pszTool, const GuestErrorInfo& guestErrorInfo);
+    /** @}  */
+
 protected:
 
Index: /trunk/src/VBox/Main/include/GuestSessionImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestSessionImpl.h	(revision 84647)
+++ /trunk/src/VBox/Main/include/GuestSessionImpl.h	(revision 84648)
@@ -309,8 +309,6 @@
     Utf8Str                 i_getName(void);
     ULONG                   i_getId(void) { return mData.mSession.mID; }
-    static Utf8Str          i_guestErrorToString(int guestRc);
     bool                    i_isStarted(void) const;
     HRESULT                 i_isStartedExternal(void);
-    static bool             i_isTerminated(GuestSessionStatus_T enmStatus);
     bool                    i_isTerminated(void) const;
     int                     i_onRemove(void);
@@ -319,5 +317,4 @@
     int                     i_startSession(int *pGuestRc);
     int                     i_startSessionAsync(void);
-    static int              i_startSessionThreadTask(GuestSessionTaskInternalStart *pTask);
     Guest                  *i_getParent(void) { return mParent; }
     uint32_t                i_getProtocolVersion(void) { return mData.mProtocolVersion; }
@@ -335,5 +332,4 @@
     int                     i_sendMessage(uint32_t uFunction, uint32_t uParms, PVBOXHGCMSVCPARM paParms,
                                           uint64_t fDst = VBOX_GUESTCTRL_DST_SESSION);
-    static HRESULT          i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc);
     int                     i_setSessionStatus(GuestSessionStatus_T sessionStatus, int sessionRc);
     int                     i_signalWaiters(GuestSessionWaitResult_T enmWaitResult, int rc /*= VINF_SUCCESS */);
@@ -343,4 +339,13 @@
     int                     i_waitForStatusChange(GuestWaitEvent *pEvent, uint32_t fWaitFlags, uint32_t uTimeoutMS,
                                                   GuestSessionStatus_T *pSessionStatus, int *pGuestRc);
+    /** @}  */
+
+public:
+
+    /** @name Static helper methods.
+     * @{ */
+    static Utf8Str          i_guestErrorToString(int guestRc);
+    static bool             i_isTerminated(GuestSessionStatus_T enmStatus);
+    static int              i_startSessionThreadTask(GuestSessionTaskInternalStart *pTask);
     /** @}  */
 
Index: /trunk/src/VBox/Main/include/GuestSessionImplTasks.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestSessionImplTasks.h	(revision 84647)
+++ /trunk/src/VBox/Main/include/GuestSessionImplTasks.h	(revision 84648)
@@ -204,9 +204,11 @@
     /** @name File handling primitives.
      * @{ */
-    int fileCopyFromGuestInner(ComObjPtr<GuestFile> &srcFile, PRTFILE phDstFile, FileCopyFlag_T fFileCopyFlags,
-                               uint64_t offCopy, uint64_t cbSize);
+    int fileCopyFromGuestInner(const Utf8Str &strSrcFile, ComObjPtr<GuestFile> &srcFile,
+                               const Utf8Str &strDstFile, PRTFILE phDstFile,
+                               FileCopyFlag_T fFileCopyFlags, uint64_t offCopy, uint64_t cbSize);
     int fileCopyFromGuest(const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T fFileCopyFlags);
-    int fileCopyToGuestInner(RTVFSFILE hSrcFile, ComObjPtr<GuestFile> &dstFile, FileCopyFlag_T fFileCopyFlags,
-                             uint64_t offCopy, uint64_t cbSize);
+    int fileCopyToGuestInner(const Utf8Str &strSrcFile, RTVFSFILE hSrcFile,
+                             const Utf8Str &strDstFile, ComObjPtr<GuestFile> &dstFile,
+                             FileCopyFlag_T fFileCopyFlags, uint64_t offCopy, uint64_t cbSize);
 
     int fileCopyToGuest(const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T fFileCopyFlags);
@@ -221,5 +223,5 @@
     int setProgressSuccess(void);
     HRESULT setProgressErrorMsg(HRESULT hr, const Utf8Str &strMsg);
-    HRESULT setProgressErrorMsg(HRESULT hrc, int vrc, const char *pszFormat, ...);
+    HRESULT setProgressErrorMsg(HRESULT hr, const Utf8Str &strMsg, const GuestErrorInfo &guestErrorInfo);
 
     inline void setTaskDesc(const Utf8Str &strTaskDesc) throw()
Index: /trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp	(revision 84647)
+++ /trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp	(revision 84648)
@@ -1302,4 +1302,77 @@
 }
 
+#ifndef VBOX_GUESTCTRL_TEST_CASE
+/**
+ * Returns a user-friendly error message from a given GuestErrorInfo object.
+ *
+ * @returns Error message string.
+ * @param   guestErrorInfo      Guest error info to return error message for.
+ */
+/* static */ Utf8Str GuestBase::getErrorAsString(const GuestErrorInfo& guestErrorInfo)
+{
+    AssertMsg(RT_FAILURE(guestErrorInfo.getRc()), ("Guest rc does not indicate a failure\n"));
+
+    Utf8Str strErr;
+
+#define CASE_TOOL_ERROR(a_eType, a_strTool) \
+    case a_eType: \
+    { \
+        strErr = GuestProcessTool::guestErrorToString(a_strTool, guestErrorInfo); \
+        break; \
+    }
+
+    switch (guestErrorInfo.getType())
+    {
+        case GuestErrorInfo::Type_Session:
+            strErr = GuestSession::i_guestErrorToString(guestErrorInfo.getRc());
+            break;
+
+        case GuestErrorInfo::Type_Process:
+            strErr = GuestProcess::i_guestErrorToString(guestErrorInfo.getRc(), guestErrorInfo.getWhat().c_str());
+            break;
+
+        case GuestErrorInfo::Type_File:
+            strErr = GuestFile::i_guestErrorToString(guestErrorInfo.getRc(), guestErrorInfo.getWhat().c_str());
+            break;
+
+        case GuestErrorInfo::Type_Directory:
+            strErr = GuestDirectory::i_guestErrorToString(guestErrorInfo.getRc(), guestErrorInfo.getWhat().c_str());
+            break;
+
+        CASE_TOOL_ERROR(GuestErrorInfo::Type_ToolCat,    VBOXSERVICE_TOOL_CAT);
+        CASE_TOOL_ERROR(GuestErrorInfo::Type_ToolLs,     VBOXSERVICE_TOOL_LS);
+        CASE_TOOL_ERROR(GuestErrorInfo::Type_ToolMkDir,  VBOXSERVICE_TOOL_MKDIR);
+        CASE_TOOL_ERROR(GuestErrorInfo::Type_ToolMkTemp, VBOXSERVICE_TOOL_MKTEMP);
+        CASE_TOOL_ERROR(GuestErrorInfo::Type_ToolRm,     VBOXSERVICE_TOOL_RM);
+        CASE_TOOL_ERROR(GuestErrorInfo::Type_ToolStat,   VBOXSERVICE_TOOL_STAT);
+
+        default:
+            AssertMsgFailed(("Type not implemented (type=%RU32, rc=%Rrc)\n", guestErrorInfo.getType(), guestErrorInfo.getRc()));
+            strErr = Utf8StrFmt("Unknown / Not implemented -- Please file a bug report (type=%RU32, rc=%Rrc)\n",
+                                guestErrorInfo.getType(), guestErrorInfo.getRc());
+            break;
+    }
+
+    return strErr;
+}
+
+/**
+ * Sets a guest error as error info, needed for API clients.
+ *
+ * @returns HRESULT COM error.
+ * @param   pInterface          Interface to set error for.
+ * @param   strAction           What action was involved causing this error.
+ * @param   guestErrorInfo      Guest error info to use.
+ */
+/* static */ HRESULT GuestBase::setErrorExternal(VirtualBoxBase *pInterface,
+                                                 const Utf8Str &strAction, const GuestErrorInfo &guestErrorInfo)
+{
+    AssertPtrReturn(pInterface, E_POINTER);
+    return pInterface->setErrorBoth(VBOX_E_IPRT_ERROR,
+                                    guestErrorInfo.getRc(),
+                                    "%s", Utf8StrFmt("%s: %s", strAction.c_str(), GuestBase::getErrorAsString(guestErrorInfo).c_str()).c_str());
+}
+#endif /* VBOX_GUESTCTRL_TEST_CASE */
+
 /**
  * Converts RTFMODE to FsObjType_T.
Index: /trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp	(revision 84647)
+++ /trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp	(revision 84648)
@@ -223,26 +223,38 @@
 }
 
+/**
+ * Converts a given guest directory error to a string.
+ *
+ * @returns Error string.
+ * @param   rcGuest             Guest file error to return string for.
+ * @param   pcszWhat            Hint of what was involved when the error occurred.
+ */
 /* static */
-Utf8Str GuestDirectory::i_guestErrorToString(int rcGuest)
-{
-    Utf8Str strError;
+Utf8Str GuestDirectory::i_guestErrorToString(int rcGuest, const char *pcszWhat)
+{
+    AssertPtrReturn(pcszWhat, "");
+
+    Utf8Str strErr;
+
+#define CASE_MSG(a_iRc, a_strFormatString, ...) \
+    case a_iRc: strErr = Utf8StrFmt(a_strFormatString, ##__VA_ARGS__); break;
 
     /** @todo pData->u32Flags: int vs. uint32 -- IPRT errors are *negative* !!! */
     switch (rcGuest)
     {
-        case VERR_CANT_CREATE:
-            strError += Utf8StrFmt("Access denied");
+        CASE_MSG(VERR_CANT_CREATE  , tr("Access to guest directory \"%s\" is denied"), pcszWhat);
+        CASE_MSG(VERR_DIR_NOT_EMPTY, tr("Guest directory \"%s\" is not empty"), pcszWhat);
+        default:
+        {
+            char szDefine[80];
+            RTErrQueryDefine(rcGuest, szDefine, sizeof(szDefine), false /*fFailIfUnknown*/);
+            strErr = Utf8StrFmt("Error %s for guest directory \"%s\" occurred\n", szDefine, pcszWhat);
             break;
-
-        case VERR_DIR_NOT_EMPTY:
-            strError += Utf8StrFmt("Not empty");
-            break;
-
-        default:
-            strError += Utf8StrFmt("%Rrc", rcGuest);
-            break;
-    }
-
-    return strError;
+        }
+    }
+
+#undef CASE_MSG
+
+    return strErr;
 }
 
@@ -384,13 +396,4 @@
 }
 
-/* static */
-HRESULT GuestDirectory::i_setErrorExternal(VirtualBoxBase *pInterface, int rcGuest)
-{
-    AssertPtr(pInterface);
-    AssertMsg(RT_FAILURE(rcGuest), ("Guest rc does not indicate a failure when setting error\n"));
-
-    return pInterface->setError(VBOX_E_IPRT_ERROR, GuestDirectory::i_guestErrorToString(rcGuest).c_str());
-}
-
 // implementation of public methods
 /////////////////////////////////////////////////////////////////////////////
@@ -411,5 +414,6 @@
         {
             case VERR_GSTCTL_GUEST_ERROR:
-                hr = GuestDirectory::i_setErrorExternal(this, rcGuest);
+                hr = setErrorExternal(this, tr("Closing guest directory failed"),
+                                      GuestErrorInfo(GuestErrorInfo::Type_Directory, rcGuest, mData.mOpenInfo.mPath.c_str()));
                 break;
 
@@ -421,5 +425,5 @@
             default:
                 hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc,
-                                  tr("Terminating open guest directory \"%s\" failed: %Rrc"), mData.mOpenInfo.mPath.c_str(), vrc);
+                                  tr("Closing guest directory \"%s\" failed: %Rrc"), mData.mOpenInfo.mPath.c_str(), vrc);
                 break;
         }
@@ -451,14 +455,15 @@
         {
             case VERR_GSTCTL_GUEST_ERROR:
-                hr = GuestDirectory::i_setErrorExternal(this, rcGuest);
+                hr = setErrorExternal(this, tr("Reading guest directory failed"),
+                                      GuestErrorInfo(GuestErrorInfo::Type_ToolLs, rcGuest, mData.mOpenInfo.mPath.c_str()));
                 break;
 
             case VERR_GSTCTL_PROCESS_EXIT_CODE:
-                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading directory \"%s\" failed: %Rrc"),
+                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading guest directory \"%s\" failed: %Rrc"),
                                   mData.mOpenInfo.mPath.c_str(), mData.mProcessTool.getRc());
                 break;
 
             case VERR_PATH_NOT_FOUND:
-                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading directory \"%s\" failed: Path not found"),
+                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading guest directory \"%s\" failed: Path not found"),
                                   mData.mOpenInfo.mPath.c_str());
                 break;
@@ -466,10 +471,10 @@
             case VERR_NO_MORE_FILES:
                 /* See SDK reference. */
-                hr = setErrorBoth(VBOX_E_OBJECT_NOT_FOUND, vrc, tr("Reading directory \"%s\" failed: No more entries"),
+                hr = setErrorBoth(VBOX_E_OBJECT_NOT_FOUND, vrc, tr("Reading guest directory \"%s\" failed: No more entries"),
                                   mData.mOpenInfo.mPath.c_str());
                 break;
 
             default:
-                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading directory \"%s\" returned error: %Rrc\n"),
+                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading guest directory \"%s\" returned error: %Rrc\n"),
                                   mData.mOpenInfo.mPath.c_str(), vrc);
                 break;
Index: /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp	(revision 84647)
+++ /trunk/src/VBox/Main/src-client/GuestFileImpl.cpp	(revision 84648)
@@ -404,29 +404,40 @@
 
 /**
- * @todo r=bird: This is an absolutely cryptic way of reporting errors.  You may convert
- *               this to a const char * returning function for explaining rcGuest and
- *               use that as part of a _proper_ error message.  This alone extremely
- *               user unfriendly. E.g. which file is not found? One of the source files,
- *               a destination file, what are you referring to?!?
+ * Converts a given guest file error to a string.
  *
- *               I've addressed one of these that annoyed me, you can do the rest of them.
+ * @returns Error string.
+ * @param   rcGuest             Guest file error to return string for.
+ * @param   pcszWhat            Hint of what was involved when the error occurred.
  */
-/* static */ Utf8Str GuestFile::i_guestErrorToString(int rcGuest)
-{
+/* static */
+Utf8Str GuestFile::i_guestErrorToString(int rcGuest, const char *pcszWhat)
+{
+    AssertPtrReturn(pcszWhat, "");
+
+    Utf8Str strErr;
+
+#define CASE_MSG(a_iRc, a_strFormatString, ...) \
+    case a_iRc: strErr = Utf8StrFmt(a_strFormatString, ##__VA_ARGS__); break;
+
     /** @todo pData->u32Flags: int vs. uint32 -- IPRT errors are *negative* !!! */
     switch (rcGuest)
     {
-        case VERR_ACCESS_DENIED:        return tr("Access denied");
-        case VERR_ALREADY_EXISTS:       return tr("File already exists");
-        case VERR_FILE_NOT_FOUND:       return tr("File not found");
-        case VERR_NET_HOST_NOT_FOUND:   return tr("Host name not found");
-        case VERR_SHARING_VIOLATION:    return tr("Sharing violation");
+        CASE_MSG(VERR_ACCESS_DENIED     , tr("Access to guest file \"%s\" denied"), pcszWhat);
+        CASE_MSG(VERR_ALREADY_EXISTS    , tr("Guest file \"%s\" already exists"), pcszWhat);
+        CASE_MSG(VERR_FILE_NOT_FOUND    , tr("Guest file \"%s\" not found"), pcszWhat);
+        CASE_MSG(VERR_NET_HOST_NOT_FOUND, tr("Host name \"%s\", not found"), pcszWhat);
+        CASE_MSG(VERR_SHARING_VIOLATION , tr("Sharing violation for guest file \"%s\""), pcszWhat);
         default:
         {
             char szDefine[80];
             RTErrQueryDefine(rcGuest, szDefine, sizeof(szDefine), false /*fFailIfUnknown*/);
-            return &szDefine[0];
-        }
-    }
+            strErr = Utf8StrFmt(tr("Error %s for guest file \"%s\" occurred\n"), szDefine, pcszWhat);
+            break;
+        }
+    }
+
+#undef CASE_MSG
+
+    return strErr;
 }
 
@@ -1013,13 +1024,4 @@
 }
 
-/* static */
-HRESULT GuestFile::i_setErrorExternal(VirtualBoxBase *pInterface, int rcGuest)
-{
-    AssertPtr(pInterface);
-    AssertMsg(RT_FAILURE(rcGuest), ("Guest rc does not indicate a failure when setting error\n"));
-
-    return pInterface->setError(VBOX_E_IPRT_ERROR, GuestFile::i_guestErrorToString(rcGuest).c_str());
-}
-
 int GuestFile::i_setFileStatus(FileStatus_T fileStatus, int fileRc)
 {
@@ -1052,5 +1054,5 @@
             hr = errorInfo->initEx(VBOX_E_IPRT_ERROR, fileRc,
                                    COM_IIDOF(IGuestFile), getComponentName(),
-                                   i_guestErrorToString(fileRc));
+                                   i_guestErrorToString(fileRc, mData.mOpenInfo.mFilename.c_str()));
             ComAssertComRC(hr);
         }
@@ -1388,6 +1390,8 @@
     {
         if (vrc == VERR_GSTCTL_GUEST_ERROR)
-            return GuestFile::i_setErrorExternal(this, rcGuest);
-        return setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Closing guest file failed with %Rrc\n"), vrc);
+            return setErrorExternal(this, tr("Closing guest file failed"),
+                                    GuestErrorInfo(GuestErrorInfo::Type_File, rcGuest, mData.mOpenInfo.mFilename.c_str()));
+        return setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Closing guest file \"%s\" failed with %Rrc\n"),
+                            mData.mOpenInfo.mFilename.c_str(), vrc);
     }
 
@@ -1418,5 +1422,7 @@
                 hr = ptrFsObjInfo.queryInterfaceTo(aObjInfo.asOutParam());
             else
-                hr = setErrorVrc(vrc);
+                hr = setErrorVrc(vrc,
+                                 tr("Initialization of guest file object for \"%s\" failed: %Rrc"),
+                                 mData.mOpenInfo.mFilename.c_str(), vrc);
         }
     }
@@ -1424,7 +1430,9 @@
     {
         if (GuestProcess::i_isGuestError(vrc))
-            hr = GuestProcess::i_setErrorExternal(this, rcGuest);
+            hr = setErrorExternal(this, tr("Querying guest file information failed"),
+                                  GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, mData.mOpenInfo.mFilename.c_str()));
         else
-            hr = setErrorVrc(vrc, tr("Querying file information failed: %Rrc"), vrc);
+            hr = setErrorVrc(vrc,
+                             tr("Querying guest file information for \"%s\" failed: %Rrc"), mData.mOpenInfo.mFilename.c_str(), vrc);
     }
 
@@ -1452,7 +1460,8 @@
     {
         if (GuestProcess::i_isGuestError(vrc))
-            hr = GuestProcess::i_setErrorExternal(this, rcGuest);
+            hr = setErrorExternal(this, tr("Querying guest file size failed"),
+                                  GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, mData.mOpenInfo.mFilename.c_str()));
         else
-            hr = setErrorVrc(vrc, tr("Querying file size failed: %Rrc"), vrc);
+            hr = setErrorVrc(vrc, tr("Querying guest file size for \"%s\" failed: %Rrc"), mData.mOpenInfo.mFilename.c_str(), vrc);
     }
 
@@ -1506,5 +1515,5 @@
 
     if (aToRead == 0)
-        return setError(E_INVALIDARG, tr("The size to read is zero"));
+        return setError(E_INVALIDARG, tr("The size to read for guest file \"%s\" is zero"), mData.mOpenInfo.mFilename.c_str());
 
     LogFlowThisFuncEnter();
@@ -1561,5 +1570,6 @@
 
         default:
-            return setError(E_INVALIDARG, tr("Invalid seek type specified"));
+            return setError(E_INVALIDARG, tr("Invalid seek type for guest file \"%s\" specified"),
+                            mData.mOpenInfo.mFilename.c_str());
     }
 
@@ -1593,5 +1603,6 @@
      */
     if (aSize < 0)
-        return setError(E_INVALIDARG, tr("The size (%RI64) cannot be a negative value"), aSize);
+        return setError(E_INVALIDARG, tr("The size (%RI64) for guest file \"%s\" cannot be a negative value"),
+                        aSize, mData.mOpenInfo.mFilename.c_str());
 
     /*
@@ -1655,5 +1666,5 @@
         hrc = S_OK;
     else
-        hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Setting the file size of '%s' to %RU64 (%#RX64) bytes failed: %Rrc"),
+        hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Setting the guest file size of \"%s\" to %RU64 (%#RX64) bytes failed: %Rrc"),
                            mData.mOpenInfo.mFilename.c_str(), aSize, aSize, vrc);
     LogFlowFuncLeaveRC(vrc);
@@ -1667,5 +1678,5 @@
 
     if (aData.size() == 0)
-        return setError(E_INVALIDARG, tr("No data to write specified"));
+        return setError(E_INVALIDARG, tr("No data to write specified"), mData.mOpenInfo.mFilename.c_str());
 
     LogFlowThisFuncEnter();
@@ -1677,5 +1688,5 @@
     int vrc = i_writeData(aTimeoutMS, pvData, cbData, (uint32_t*)aWritten);
     if (RT_FAILURE(vrc))
-        hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Writing %zubytes to file \"%s\" failed: %Rrc"),
+        hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Writing %zubytes to guest file \"%s\" failed: %Rrc"),
                           aData.size(), mData.mOpenInfo.mFilename.c_str(), vrc);
 
@@ -1690,5 +1701,5 @@
 
     if (aData.size() == 0)
-        return setError(E_INVALIDARG, tr("No data to write at specified"));
+        return setError(E_INVALIDARG, tr("No data to write at for guest file \"%s\" specified"), mData.mOpenInfo.mFilename.c_str());
 
     LogFlowThisFuncEnter();
Index: /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp	(revision 84647)
+++ /trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp	(revision 84648)
@@ -487,60 +487,47 @@
 }
 
+/**
+ * Converts a given guest process error to a string.
+ *
+ * @returns Error as a string.
+ * @param   rcGuest             Guest process error to return string for.
+ * @param   pcszWhat            Hint of what was involved when the error occurred.
+ */
 /* static */
-Utf8Str GuestProcess::i_guestErrorToString(int rcGuest)
-{
-    Utf8Str strError;
+Utf8Str GuestProcess::i_guestErrorToString(int rcGuest, const char *pcszWhat)
+{
+    AssertPtrReturn(pcszWhat, "");
+
+    Utf8Str strErr;
+
+#define CASE_MSG(a_iRc, a_strFormatString, ...) \
+    case a_iRc: strErr = Utf8StrFmt(a_strFormatString, ##__VA_ARGS__); break;
 
     /** @todo pData->u32Flags: int vs. uint32 -- IPRT errors are *negative* !!! */
     switch (rcGuest)
     {
-        case VERR_FILE_NOT_FOUND: /* This is the most likely error. */
-            RT_FALL_THROUGH();
-        case VERR_PATH_NOT_FOUND:
-            strError += Utf8StrFmt(tr("No such file or directory on guest"));
-            break;
-
-        case VERR_INVALID_VM_HANDLE:
-            strError += Utf8StrFmt(tr("VMM device is not available (is the VM running?)"));
-            break;
-
-        case VERR_HGCM_SERVICE_NOT_FOUND:
-            strError += Utf8StrFmt(tr("The guest execution service is not available"));
-            break;
-
-        case VERR_BAD_EXE_FORMAT:
-            strError += Utf8StrFmt(tr("The specified file is not an executable format on guest"));
-            break;
-
-        case VERR_AUTHENTICATION_FAILURE:
-            strError += Utf8StrFmt(tr("The specified user was not able to logon on guest"));
-            break;
-
-        case VERR_INVALID_NAME:
-            strError += Utf8StrFmt(tr("The specified file is an invalid name"));
-            break;
-
-        case VERR_TIMEOUT:
-            strError += Utf8StrFmt(tr("The guest did not respond within time"));
-            break;
-
-        case VERR_CANCELLED:
-            strError += Utf8StrFmt(tr("The execution operation was canceled"));
-            break;
-
-        case VERR_GSTCTL_MAX_CID_OBJECTS_REACHED:
-            strError += Utf8StrFmt(tr("Maximum number of concurrent guest processes has been reached"));
-            break;
-
-        case VERR_NOT_FOUND:
-            strError += Utf8StrFmt(tr("The guest execution service is not ready (yet)"));
-            break;
-
+        CASE_MSG(VERR_FILE_NOT_FOUND,                 tr("No such file or directory \"%s\" on guest"), pcszWhat); /* This is the most likely error. */
+        CASE_MSG(VERR_PATH_NOT_FOUND,                 tr("No such file or directory \"%s\" on guest"), pcszWhat);
+        CASE_MSG(VERR_INVALID_VM_HANDLE,              tr("VMM device is not available (is the VM running?)"));
+        CASE_MSG(VERR_HGCM_SERVICE_NOT_FOUND,         tr("The guest execution service is not available"));
+        CASE_MSG(VERR_BAD_EXE_FORMAT,                 tr("The file \"%s\" is not an executable format on guest"), pcszWhat);
+        CASE_MSG(VERR_AUTHENTICATION_FAILURE,         tr("The user \"%s\" was not able to logon on guest"), pcszWhat);
+        CASE_MSG(VERR_INVALID_NAME,                   tr("The file \"%s\" is an invalid name"), pcszWhat);
+        CASE_MSG(VERR_TIMEOUT,                        tr("The guest did not respond within time"));
+        CASE_MSG(VERR_CANCELLED,                      tr("The execution operation for \"%s\" was canceled"), pcszWhat);
+        CASE_MSG(VERR_GSTCTL_MAX_CID_OBJECTS_REACHED, tr("Maximum number of concurrent guest processes has been reached"));
+        CASE_MSG(VERR_NOT_FOUND,                      tr("The guest execution service is not ready (yet)"));
         default:
-            strError += Utf8StrFmt("%Rrc", rcGuest);
-            break;
-    }
-
-    return strError;
+        {
+            char szDefine[80];
+            RTErrQueryDefine(rcGuest, szDefine, sizeof(szDefine), false /*fFailIfUnknown*/);
+            strErr = Utf8StrFmt(tr("Error %s for guest process \"%s\" occurred\n"), szDefine, pcszWhat);
+            break;
+        }
+    }
+
+#undef CASE_MSG
+
+    return strErr;
 }
 
@@ -974,5 +961,5 @@
             hr = errorInfo->initEx(VBOX_E_IPRT_ERROR, mData.mLastError,
                                    COM_IIDOF(IGuestProcess), getComponentName(),
-                                   i_guestErrorToString(mData.mLastError));
+                                   i_guestErrorToString(mData.mLastError, mData.mProcess.mExecutable.c_str()));
             ComAssertComRC(hr);
         }
@@ -1003,13 +990,4 @@
 
     return rc;
-}
-
-/* static */
-HRESULT GuestProcess::i_setErrorExternal(VirtualBoxBase *pInterface, int rcGuest)
-{
-    AssertPtr(pInterface);
-    AssertMsg(RT_FAILURE(rcGuest), ("Guest rc does not indicate a failure when setting error\n"));
-
-    return pInterface->setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, GuestProcess::i_guestErrorToString(rcGuest).c_str());
 }
 
@@ -1809,9 +1787,10 @@
         {
             case VERR_GSTCTL_GUEST_ERROR:
-                hr = GuestProcess::i_setErrorExternal(this, rcGuest);
+                hr = setErrorExternal(this, "Reading from guest process failed",
+                                      GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str()));
                 break;
 
             default:
-                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading from process \"%s\" (PID %RU32) failed: %Rrc"),
+                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Reading from guest process \"%s\" (PID %RU32) failed: %Rrc"),
                                   mData.mProcess.mExecutable.c_str(), mData.mPID, vrc);
                 break;
@@ -1841,15 +1820,16 @@
         {
            case VERR_GSTCTL_GUEST_ERROR:
-                hr = GuestProcess::i_setErrorExternal(this, rcGuest);
+                hr = setErrorExternal(this, "Terminating guest process failed",
+                                      GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str()));
                 break;
 
             case VERR_NOT_SUPPORTED:
                 hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc,
-                                  tr("Terminating process \"%s\" (PID %RU32) not supported by installed Guest Additions"),
+                                  tr("Terminating guest process \"%s\" (PID %RU32) not supported by installed Guest Additions"),
                                   mData.mProcess.mExecutable.c_str(), mData.mPID);
                 break;
 
             default:
-                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Terminating process \"%s\" (PID %RU32) failed: %Rrc"),
+                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Terminating guest process \"%s\" (PID %RU32) failed: %Rrc"),
                                   mData.mProcess.mExecutable.c_str(), mData.mPID, vrc);
                 break;
@@ -1899,5 +1879,6 @@
         {
             case VERR_GSTCTL_GUEST_ERROR:
-                hr = GuestProcess::i_setErrorExternal(this, rcGuest);
+                hr = setErrorExternal(this, "Waiting for guest process failed",
+                                      GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str()));
                 break;
 
@@ -1907,5 +1888,5 @@
 
             default:
-                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Waiting for process \"%s\" (PID %RU32) failed: %Rrc"),
+                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Waiting for guest process \"%s\" (PID %RU32) failed: %Rrc"),
                                   mData.mProcess.mExecutable.c_str(), mData.mPID, vrc);
                 break;
@@ -1952,9 +1933,10 @@
         {
             case VERR_GSTCTL_GUEST_ERROR:
-                hr = GuestProcess::i_setErrorExternal(this, rcGuest);
+                hr = setErrorExternal(this, "Writing to guest process failed",
+                                      GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, mData.mProcess.mExecutable.c_str()));
                 break;
 
             default:
-                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Writing to process \"%s\" (PID %RU32) failed: %Rrc"),
+                hr = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Writing to guest process \"%s\" (PID %RU32) failed: %Rrc"),
                                   mData.mProcess.mExecutable.c_str(), mData.mPID, vrc);
                 break;
@@ -2569,4 +2551,13 @@
         }
     }
+    else if (!RTStrICmp(pszTool, VBOXSERVICE_TOOL_LS))
+    {
+        switch (iExitCode)
+        {
+            /** @todo Handle access denied? */
+            case RTEXITCODE_FAILURE: return VERR_PATH_NOT_FOUND;
+            default:                 break;
+        }
+    }
     else if (!RTStrICmp(pszTool, VBOXSERVICE_TOOL_STAT))
     {
@@ -2600,5 +2591,6 @@
         switch (iExitCode)
         {
-            case RTEXITCODE_FAILURE: return VERR_ACCESS_DENIED;
+            case RTEXITCODE_FAILURE: return VERR_FILE_NOT_FOUND;
+            /** @todo RTPathRmCmd does not yet distinguish between not found and access denied yet. */
             default:                 break;
         }
@@ -2612,2 +2604,66 @@
 }
 
+/* static */
+Utf8Str GuestProcessTool::guestErrorToString(const char *pszTool, const GuestErrorInfo& guestErrorInfo)
+{
+    Utf8Str strErr;
+
+    /** @todo pData->u32Flags: int vs. uint32 -- IPRT errors are *negative* !!! */
+    switch (guestErrorInfo.getRc())
+    {
+        case VERR_ACCESS_DENIED:
+            strErr = Utf8StrFmt(Guest::tr("Access to \"%s\" denied"), guestErrorInfo.getWhat().c_str());
+            break;
+
+        case VERR_FILE_NOT_FOUND: /* This is the most likely error. */
+            RT_FALL_THROUGH();
+        case VERR_PATH_NOT_FOUND:
+            strErr = Utf8StrFmt(Guest::tr("No such file or directory \"%s\""), guestErrorInfo.getWhat().c_str());
+            break;
+
+        case VERR_INVALID_VM_HANDLE:
+            strErr = Utf8StrFmt(Guest::tr("VMM device is not available (is the VM running?)"));
+            break;
+
+        case VERR_HGCM_SERVICE_NOT_FOUND:
+            strErr = Utf8StrFmt(Guest::tr("The guest execution service is not available"));
+            break;
+
+        case VERR_BAD_EXE_FORMAT:
+            strErr = Utf8StrFmt(Guest::tr("The file \"%s\" is not an executable format"),
+                                guestErrorInfo.getWhat().c_str());
+            break;
+
+        case VERR_AUTHENTICATION_FAILURE:
+            strErr = Utf8StrFmt(Guest::tr("The user \"%s\" was not able to logon"), guestErrorInfo.getWhat().c_str());
+            break;
+
+        case VERR_INVALID_NAME:
+            strErr = Utf8StrFmt(Guest::tr("The file \"%s\" is an invalid name"), guestErrorInfo.getWhat().c_str());
+            break;
+
+        case VERR_TIMEOUT:
+            strErr = Utf8StrFmt(Guest::tr("The guest did not respond within time"));
+            break;
+
+        case VERR_CANCELLED:
+            strErr = Utf8StrFmt(Guest::tr("The execution operation was canceled"));
+            break;
+
+        case VERR_GSTCTL_MAX_CID_OBJECTS_REACHED:
+            strErr = Utf8StrFmt(Guest::tr("Maximum number of concurrent guest processes has been reached"));
+            break;
+
+        case VERR_NOT_FOUND:
+            strErr = Utf8StrFmt(Guest::tr("The guest execution service is not ready (yet)"));
+            break;
+
+        default:
+            strErr = Utf8StrFmt(Guest::tr("Unhandled error %Rrc for \"%s\" occurred for tool \"%s\" on guest -- please file a bug report"),
+                                guestErrorInfo.getRc(), guestErrorInfo.getWhat(), pszTool);
+            break;
+    }
+
+    return strErr;
+}
+
Index: /trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 84647)
+++ /trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp	(revision 84648)
@@ -2639,13 +2639,4 @@
 }
 
-/* static */
-HRESULT GuestSession::i_setErrorExternal(VirtualBoxBase *pInterface, int rcGuest)
-{
-    AssertPtr(pInterface);
-    AssertMsg(RT_FAILURE(rcGuest), ("Guest rc does not indicate a failure when setting error\n"));
-
-    return pInterface->setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, GuestSession::i_guestErrorToString(rcGuest).c_str());
-}
-
 /* Does not do locking; caller is responsible for that! */
 int GuestSession::i_setSessionStatus(GuestSessionStatus_T sessionStatus, int sessionRc)
@@ -3073,6 +3064,8 @@
     {
         if (vrc == VERR_GSTCTL_GUEST_ERROR)
-            return GuestSession::i_setErrorExternal(this, rcGuest);
-        return setError(VBOX_E_IPRT_ERROR, tr("Closing guest session failed with %Rrc"), vrc);
+            return setErrorExternal(this, tr("Closing guest session failed"),
+                                    GuestErrorInfo(GuestErrorInfo::Type_Session, rcGuest, mData.mSession.mName.c_str()));
+        return setError(VBOX_E_IPRT_ERROR, tr("Closing guest session \"%s\" failed with %Rrc"),
+                        mData.mSession.mName.c_str(), vrc);
     }
 
@@ -3173,8 +3166,8 @@
         {
             if (GuestProcess::i_isGuestError(vrc))
-                return setError(E_FAIL, tr("Unable to query type for source '%s': %s"), (*itSource).c_str(),
-                                           GuestProcess::i_guestErrorToString(rcGuest).c_str());
+                return setErrorExternal(this, tr("Querying type for guest source failed"),
+                                        GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, (*itSource).c_str()));
             else
-                return setError(E_FAIL, tr("Unable to query type for source '%s' (%Rrc)"), (*itSource).c_str(), vrc);
+                return setError(E_FAIL, tr("Querying type for guest source \"%s\" failed: %Rrc"), (*itSource).c_str(), vrc);
         }
 
@@ -3396,6 +3389,6 @@
     {
         if (GuestProcess::i_isGuestError(vrc))
-            hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest,
-                               tr("Directory creation failed: %s"), GuestDirectory::i_guestErrorToString(rcGuest).c_str());
+            hrc = setErrorExternal(this, tr("Guest directory creation failed"),
+                                   GuestErrorInfo(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str()));
         else
         {
@@ -3403,13 +3396,13 @@
             {
                 case VERR_INVALID_PARAMETER:
-                    hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Directory creation failed: Invalid parameters given"));
+                    hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Guest directory creation failed: Invalid parameters given"));
                     break;
 
                 case VERR_BROKEN_PIPE:
-                    hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Directory creation failed: Unexpectedly aborted"));
+                    hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Guest directory creation failed: Unexpectedly aborted"));
                     break;
 
                 default:
-                    hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Directory creation failed: %Rrc"), vrc);
+                    hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Guest directory creation failed: %Rrc"), vrc);
                     break;
             }
@@ -3443,9 +3436,10 @@
         {
             case VERR_GSTCTL_GUEST_ERROR:
-                hrc = GuestProcess::i_setErrorExternal(this, rcGuest);
+                hrc = setErrorExternal(this, tr("Temporary guest directory creation failed"),
+                                       GuestErrorInfo(GuestErrorInfo::Type_ToolMkTemp, rcGuest, aPath.c_str()));
                 break;
 
             default:
-               hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Temporary directory creation \"%s\" with template \"%s\" failed: %Rrc"),
+               hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Temporary guest directory creation \"%s\" with template \"%s\" failed: %Rrc"),
                                   aPath.c_str(), aTemplateName.c_str(), vrc);
                break;
@@ -3485,6 +3479,6 @@
                         break;
                     default:
-                        hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Querying directory existence \"%s\" failed: %s"),
-                                           aPath.c_str(), GuestProcess::i_guestErrorToString(rcGuest).c_str());
+                        hrc = setErrorExternal(this, "Querying directory existence failed",
+                                               GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str()));
                         break;
                 }
@@ -3549,14 +3543,15 @@
         {
             case VERR_INVALID_PARAMETER:
-               hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Opening directory \"%s\" failed; invalid parameters given"),
+               hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Opening guest directory \"%s\" failed; invalid parameters given"),
                                   aPath.c_str());
                break;
 
             case VERR_GSTCTL_GUEST_ERROR:
-                hrc = GuestDirectory::i_setErrorExternal(this, rcGuest);
+                hrc = setErrorExternal(this, tr("Opening guest directory failed"),
+                                       GuestErrorInfo(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str()));
                 break;
 
             default:
-               hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Opening directory \"%s\" failed: %Rrc"), aPath.c_str(), vrc);
+               hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Opening guest directory \"%s\" failed: %Rrc"), aPath.c_str(), vrc);
                break;
         }
@@ -3592,5 +3587,6 @@
 
             case VERR_GSTCTL_GUEST_ERROR:
-                hrc = GuestDirectory::i_setErrorExternal(this, rcGuest);
+                hrc = setErrorExternal(this, tr("Removing guest directory failed"),
+                                       GuestErrorInfo(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str()));
                 break;
 
@@ -3671,5 +3667,6 @@
 
             case VERR_GSTCTL_GUEST_ERROR:
-                hrc = GuestFile::i_setErrorExternal(this, rcGuest);
+                hrc = setErrorExternal(this, tr("Recursively removing guest directory failed"),
+                                       GuestErrorInfo(GuestErrorInfo::Type_Directory, rcGuest, aPath.c_str()));
                 break;
 
@@ -3815,5 +3812,6 @@
 
                 default:
-                    hrc = GuestProcess::i_setErrorExternal(this, rcGuest);
+                    hrc = setErrorExternal(this, tr("Querying guest file existence failed"),
+                                           GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str()));
                     break;
             }
@@ -3826,5 +3824,5 @@
 
         default:
-            hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Querying file information for \"%s\" failed: %Rrc"),
+            hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Querying guest file information for \"%s\" failed: %Rrc"),
                                aPath.c_str(), vrc);
             break;
@@ -3932,5 +3930,6 @@
 
             case VERR_GSTCTL_GUEST_ERROR:
-                hrc = GuestFile::i_setErrorExternal(this, rcGuest);
+                hrc = setErrorExternal(this, tr("Opening guest file failed"),
+                                       GuestErrorInfo(GuestErrorInfo::Type_File, rcGuest, aPath.c_str()));
                 break;
 
@@ -3962,7 +3961,9 @@
     {
         if (GuestProcess::i_isGuestError(vrc))
-            hrc = GuestProcess::i_setErrorExternal(this, rcGuest);
+            hrc = setErrorExternal(this, tr("Querying guest file size failed"),
+                                   GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str()));
         else
-            hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Querying file size failed: %Rrc"), vrc);
+            hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Querying guest file size of \"%s\" failed: %Rrc"),
+                               vrc, aPath.c_str());
     }
 
@@ -4002,8 +4003,9 @@
             }
             else
-                hrc = GuestProcess::i_setErrorExternal(this, rcGuest);
+                hrc = setErrorExternal(this, tr("Querying guest file existence information failed"),
+                                       GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str()));
         }
         else
-            hrc = setErrorVrc(vrc, tr("Querying file information for \"%s\" failed: %Rrc"), aPath.c_str(), vrc);
+            hrc = setErrorVrc(vrc, tr("Querying guest file existence information for \"%s\" failed: %Rrc"), aPath.c_str(), vrc);
     }
 
@@ -4040,7 +4042,8 @@
     {
         if (GuestProcess::i_isGuestError(vrc))
-            hrc = GuestProcess::i_setErrorExternal(this, rcGuest);
+            hrc = setErrorExternal(this, tr("Querying guest file information failed"),
+                                   GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, aPath.c_str()));
         else
-            hrc = setErrorVrc(vrc, tr("Querying file information for \"%s\" failed: %Rrc"), aPath.c_str(), vrc);
+            hrc = setErrorVrc(vrc, tr("Querying guest file information for \"%s\" failed: %Rrc"), aPath.c_str(), vrc);
     }
 
@@ -4064,7 +4067,8 @@
     {
         if (GuestProcess::i_isGuestError(vrc))
-            hrc = GuestProcess::i_setErrorExternal(this, rcGuest);
+            hrc = setErrorExternal(this, tr("Removing guest file failed"),
+                                   GuestErrorInfo(GuestErrorInfo::Type_ToolRm, rcGuest, aPath.c_str()));
         else
-            hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Removing file \"%s\" failed: %Rrc"), aPath.c_str(), vrc);
+            hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Removing guest file \"%s\" failed: %Rrc"), aPath.c_str(), vrc);
     }
 
@@ -4118,13 +4122,14 @@
             case VERR_NOT_SUPPORTED:
                 hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc,
-                                   tr("Handling renaming guest directories not supported by installed Guest Additions"));
+                                   tr("Handling renaming guest paths not supported by installed Guest Additions"));
                 break;
 
             case VERR_GSTCTL_GUEST_ERROR:
-                hrc = setErrorBoth(VBOX_E_IPRT_ERROR, rcGuest, tr("Renaming guest directory failed: %Rrc"), rcGuest);
+                hrc = setErrorExternal(this, tr("Renaming guest path failed"),
+                                       GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, aSource.c_str()));
                 break;
 
             default:
-                hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Renaming guest directory \"%s\" failed: %Rrc"),
+                hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrc, tr("Renaming guest path \"%s\" failed: %Rrc"),
                                    aSource.c_str(), vrc);
                 break;
@@ -4356,5 +4361,6 @@
         {
             case VERR_GSTCTL_GUEST_ERROR:
-                hrc = GuestSession::i_setErrorExternal(this, rcGuest);
+                hrc = setErrorExternal(this, tr("Waiting for guest process failed"),
+                                       GuestErrorInfo(GuestErrorInfo::Type_Session, rcGuest, mData.mSession.mName.c_str()));
                 break;
 
Index: /trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp	(revision 84647)
+++ /trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp	(revision 84648)
@@ -193,8 +193,14 @@
 }
 
+/**
+ * Sets the task's progress object to an error using a string message.
+ *
+ * @returns Returns \a hr for covenience.
+ * @param   hr                  Progress operation result to set.
+ * @param   strMsg              Message to set.
+ */
 HRESULT GuestSessionTask::setProgressErrorMsg(HRESULT hr, const Utf8Str &strMsg)
 {
-    LogFlowFunc(("hr=%Rhrc, strMsg=%s\n",
-                 hr, strMsg.c_str()));
+    LogFlowFunc(("hr=%Rhrc, strMsg=%s\n", hr, strMsg.c_str()));
 
     if (mProgress.isNull()) /* Progress is optional. */
@@ -218,28 +224,15 @@
 }
 
-HRESULT GuestSessionTask::setProgressErrorMsg(HRESULT hrc, int vrc, const char *pszFormat, ...)
-{
-    LogFlowFunc(("hrc=%Rhrc, vrc=%Rrc, pszFormat=%s\n", hrc, vrc, pszFormat));
-
-    /* The progress object is optional. */
-    if (!mProgress.isNull())
-    {
-        BOOL fCanceled;
-        BOOL fCompleted;
-        if (   SUCCEEDED(mProgress->COMGETTER(Canceled(&fCanceled)))
-            && !fCanceled
-            && SUCCEEDED(mProgress->COMGETTER(Completed(&fCompleted)))
-            && !fCompleted)
-        {
-            va_list va;
-            va_start(va, pszFormat);
-            HRESULT hrc2 = mProgress->i_notifyCompleteBothV(hrc, vrc, COM_IIDOF(IGuestSession),
-                                                            GuestSession::getStaticComponentName(), pszFormat, va);
-            va_end(va);
-            if (FAILED(hrc2))
-                hrc = hrc2;
-        }
-    }
-    return hrc;
+/**
+ * Sets the task's progress object to an error using a string message and a guest error info object.
+ *
+ * @returns Returns \a hr for covenience.
+ * @param   hr                  Progress operation result to set.
+ * @param   strMsg              Message to set.
+ * @param   guestErrorInfo      Guest error info to use.
+ */
+HRESULT GuestSessionTask::setProgressErrorMsg(HRESULT hr, const Utf8Str &strMsg, const GuestErrorInfo &guestErrorInfo)
+{
+    return setProgressErrorMsg(hr, strMsg + Utf8Str(": ") + GuestBase::getErrorAsString(guestErrorInfo));
 }
 
@@ -353,5 +346,7 @@
  *
  * @return VBox status code.
+ * @param  strSrcFile         Full path of source file on the host to copy.
  * @param  srcFile            Guest file (source) to copy to the host. Must be in opened and ready state already.
+ * @param  strDstFile         Full destination path and file name (guest style) to copy file to.
  * @param  phDstFile          Pointer to host file handle (destination) to copy to. Must be in opened and ready state already.
  * @param  fFileCopyFlags     File copy flags.
@@ -359,6 +354,7 @@
  * @param  cbSize             Size (in bytes) to copy from the source file.
  */
-int GuestSessionTask::fileCopyFromGuestInner(ComObjPtr<GuestFile> &srcFile, PRTFILE phDstFile, FileCopyFlag_T fFileCopyFlags,
-                                            uint64_t offCopy, uint64_t cbSize)
+int GuestSessionTask::fileCopyFromGuestInner(const Utf8Str &strSrcFile, ComObjPtr<GuestFile> &srcFile,
+                                             const Utf8Str &strDstFile, PRTFILE phDstFile,
+                                             FileCopyFlag_T fFileCopyFlags, uint64_t offCopy, uint64_t cbSize)
 {
     RT_NOREF(fFileCopyFlags);
@@ -379,5 +375,6 @@
         {
             setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                Utf8StrFmt(GuestSession::tr("Seeking to offset %RU64 failed: %Rrc"), offCopy, rc));
+                                Utf8StrFmt(GuestSession::tr("Seeking to offset %RU64 of guest file \"%s\" failed: %Rrc"),
+                                           offCopy, strSrcFile.c_str(), rc));
             return rc;
         }
@@ -393,5 +390,6 @@
         {
             setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                Utf8StrFmt(GuestSession::tr("Reading %RU32 bytes @ %RU64 from guest failed: %Rrc"), cbChunk, cbWrittenTotal, rc));
+                                Utf8StrFmt(GuestSession::tr("Reading %RU32 bytes @ %RU64 from guest \"%s\" failed: %Rrc"),
+                                           cbChunk, cbWrittenTotal, strSrcFile.c_str(), rc));
             break;
         }
@@ -401,5 +399,6 @@
         {
             setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                Utf8StrFmt(GuestSession::tr("Writing %RU32 bytes to file on host failed: %Rrc"), cbRead, rc));
+                                Utf8StrFmt(GuestSession::tr("Writing %RU32 bytes to host file \"%s\" failed: %Rrc"),
+                                           cbRead, strDstFile.c_str(), rc));
             break;
         }
@@ -439,5 +438,6 @@
          * to the destination -> access denied. */
         setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                            Utf8StrFmt(GuestSession::tr("Writing guest file to host failed: Access denied")));
+                            Utf8StrFmt(GuestSession::tr("Writing guest file \"%s\" to host file \"%s\" failed: Access denied"),
+                                       strSrcFile.c_str(), strDstFile.c_str()));
         rc = VERR_ACCESS_DENIED;
     }
@@ -446,6 +446,6 @@
         /* If we did not copy all let the user know. */
         setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                            Utf8StrFmt(GuestSession::tr("Copying guest file to host to failed (%RU64/%RU64 bytes transfered)"),
-                                       cbWrittenTotal, cbSize));
+                            Utf8StrFmt(GuestSession::tr("Copying guest file \"%s\" to host file \"%s\" failed (%RU64/%RU64 bytes transfered)"),
+                                       strSrcFile.c_str(), strDstFile.c_str(), cbWrittenTotal, cbSize));
         rc = VERR_INTERRUPTED;
     }
@@ -463,10 +463,10 @@
  * @param  fFileCopyFlags       File copy flags.
  */
-int GuestSessionTask::fileCopyFromGuest(const Utf8Str &strSource, const Utf8Str &strDest, FileCopyFlag_T fFileCopyFlags)
-{
-    LogFlowThisFunc(("strSource=%s, strDest=%s, enmFileCopyFlags=0x%x\n", strSource.c_str(), strDest.c_str(), fFileCopyFlags));
+int GuestSessionTask::fileCopyFromGuest(const Utf8Str &strSrc, const Utf8Str &strDest, FileCopyFlag_T fFileCopyFlags)
+{
+    LogFlowThisFunc(("strSource=%s, strDest=%s, enmFileCopyFlags=0x%x\n", strSrc.c_str(), strDest.c_str(), fFileCopyFlags));
 
     GuestFileOpenInfo srcOpenInfo;
-    srcOpenInfo.mFilename     = strSource;
+    srcOpenInfo.mFilename     = strSrc;
     srcOpenInfo.mOpenAction   = FileOpenAction_OpenExisting;
     srcOpenInfo.mAccessMode   = FileAccessMode_ReadOnly;
@@ -477,40 +477,34 @@
     GuestFsObjData srcObjData;
     int rcGuest = VERR_IPE_UNINITIALIZED_STATUS;
-    int rc = mSession->i_fsQueryInfo(strSource, TRUE /* fFollowSymlinks */, srcObjData, &rcGuest);
+    int rc = mSession->i_fsQueryInfo(strSrc, TRUE /* fFollowSymlinks */, srcObjData, &rcGuest);
     if (RT_FAILURE(rc))
     {
-        switch (rc)
-        {
-            case VERR_GSTCTL_GUEST_ERROR:
-                setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestFile::i_guestErrorToString(rcGuest));
+        if (rc == VERR_GSTCTL_GUEST_ERROR)
+            setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestSession::tr("Guest file lookup failed"),
+                                GuestErrorInfo(GuestErrorInfo::Type_ToolStat, rcGuest, strSrc.c_str()));
+        else
+            setProgressErrorMsg(VBOX_E_IPRT_ERROR,
+                                Utf8StrFmt(GuestSession::tr("Guest file lookup for \"%s\" failed: %Rrc"), strSrc.c_str(), rc));
+    }
+    else
+    {
+        switch (srcObjData.mType)
+        {
+            case FsObjType_File:
+                break;
+
+            case FsObjType_Symlink:
+                if (!(fFileCopyFlags & FileCopyFlag_FollowLinks))
+                {
+                    setProgressErrorMsg(VBOX_E_IPRT_ERROR,
+                                        Utf8StrFmt(GuestSession::tr("Guest file \"%s\" is a symbolic link"),
+                                                   strSrc.c_str()));
+                    rc = VERR_IS_A_SYMLINK;
+                }
                 break;
 
             default:
                 setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr("Source file lookup for \"%s\" failed: %Rrc"),
-                                               strSource.c_str(), rc));
-                break;
-        }
-    }
-    else
-    {
-        switch (srcObjData.mType)
-        {
-            case FsObjType_File:
-                break;
-
-            case FsObjType_Symlink:
-                if (!(fFileCopyFlags & FileCopyFlag_FollowLinks))
-                {
-                    setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                        Utf8StrFmt(GuestSession::tr("Source file \"%s\" is a symbolic link"),
-                                                   strSource.c_str(), rc));
-                    rc = VERR_IS_A_SYMLINK;
-                }
-                break;
-
-            default:
-                setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr("Source element \"%s\" is not a file"), strSource.c_str()));
+                                    Utf8StrFmt(GuestSession::tr("Guest object \"%s\" is not a file"), strSrc.c_str()));
                 rc = VERR_NOT_A_FILE;
                 break;
@@ -524,16 +518,10 @@
     if (RT_FAILURE(rc))
     {
-        switch (rc)
-        {
-            case VERR_GSTCTL_GUEST_ERROR:
-                setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestFile::i_guestErrorToString(rcGuest));
-                break;
-
-            default:
-                setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr("Source file \"%s\" could not be opened: %Rrc"),
-                                               strSource.c_str(), rc));
-                break;
-        }
+        if (rc == VERR_GSTCTL_GUEST_ERROR)
+            setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestSession::tr("Guest file could not be opened"),
+                                GuestErrorInfo(GuestErrorInfo::Type_File, rcGuest, strSrc.c_str()));
+        else
+            setProgressErrorMsg(VBOX_E_IPRT_ERROR,
+                                Utf8StrFmt(GuestSession::tr("Guest file \"%s\" could not be opened: %Rrc"), strSrc.c_str(), rc));
     }
 
@@ -555,5 +543,5 @@
             {
                 setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr("Destination file \"%s\" already exists"), strDest.c_str()));
+                                    Utf8StrFmt(GuestSession::tr("Host file \"%s\" already exists"), strDest.c_str()));
                 rc = VERR_ALREADY_EXISTS;
             }
@@ -566,5 +554,5 @@
                 {
                     setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                        Utf8StrFmt(GuestSession::tr("Destination file \"%s\" has same or newer modification date"),
+                                        Utf8StrFmt(GuestSession::tr("Host file \"%s\" has same or newer modification date"),
                                                    strDest.c_str()));
                     fSkip = true;
@@ -576,5 +564,5 @@
             if (rc != VERR_FILE_NOT_FOUND) /* Destination file does not exist (yet)? */
                 setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr("Destination file lookup for \"%s\" failed: %Rrc"),
+                                    Utf8StrFmt(GuestSession::tr("Host file lookup for \"%s\" failed: %Rrc"),
                                                strDest.c_str(), rc));
         }
@@ -595,6 +583,5 @@
             {
                 setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr("Destination file \"%s\" already exists"),
-                                               strDest.c_str(), rc));
+                                    Utf8StrFmt(GuestSession::tr("Host file \"%s\" already exists"), strDest.c_str()));
                 rc = VERR_ALREADY_EXISTS;
             }
@@ -612,5 +599,5 @@
                 RTPathAppend(szDstPath, sizeof(szDstPath), "/"); /* IPRT can handle / on all hosts. */
 
-            RTPathAppend(szDstPath, sizeof(szDstPath), RTPathFilenameEx(strSource.c_str(), mfPathStyle));
+            RTPathAppend(szDstPath, sizeof(szDstPath), RTPathFilenameEx(strSrc.c_str(), mfPathStyle));
 
             pszDstFile = RTStrDup(szDstPath);
@@ -621,6 +608,6 @@
             {
                 setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr("Destination file \"%s\" is a symbolic link"),
-                                               strDest.c_str(), rc));
+                                    Utf8StrFmt(GuestSession::tr("Host file \"%s\" is a symbolic link"),
+                                               strDest.c_str()));
                 rc = VERR_IS_A_SYMLINK;
             }
@@ -652,7 +639,9 @@
             if (RT_SUCCESS(rc))
             {
-                LogFlowThisFunc(("Copying '%s' to '%s' (%RI64 bytes) ...\n", strSource.c_str(), pszDstFile, srcObjData.mObjectSize));
-
-                rc = fileCopyFromGuestInner(srcFile, &hDstFile, fFileCopyFlags, 0 /* Offset, unused */, (uint64_t)srcObjData.mObjectSize);
+                LogFlowThisFunc(("Copying '%s' to '%s' (%RI64 bytes) ...\n",
+                                 strSrc.c_str(), pszDstFile, srcObjData.mObjectSize));
+
+                rc = fileCopyFromGuestInner(strSrc, srcFile, pszDstFile, &hDstFile, fFileCopyFlags,
+                                            0 /* Offset, unused */, (uint64_t)srcObjData.mObjectSize);
 
                 int rc2 = RTFileClose(hDstFile);
@@ -661,5 +650,5 @@
             else
                 setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr("Opening/creating destination file \"%s\" failed: %Rrc"),
+                                    Utf8StrFmt(GuestSession::tr("Opening/creating host file \"%s\" failed: %Rrc"),
                                                pszDstFile, rc));
         }
@@ -679,12 +668,15 @@
  *
  * @return VBox status code.
+ * @param  strSrcFile         Full path of source file on the host to copy.
  * @param  hVfsFile           The VFS file handle to read from.
- * @param  dstFile            Guest file (destination) to copy to the guest. Must be in opened and ready state already.
+ * @param  strDstFile         Full destination path and file name (guest style) to copy file to.
+ * @param  fileDst            Guest file (destination) to copy to the guest. Must be in opened and ready state already.
  * @param  fFileCopyFlags     File copy flags.
  * @param  offCopy            Offset (in bytes) where to start copying the source file.
  * @param  cbSize             Size (in bytes) to copy from the source file.
  */
-int GuestSessionTask::fileCopyToGuestInner(RTVFSFILE hVfsFile, ComObjPtr<GuestFile> &dstFile, FileCopyFlag_T fFileCopyFlags,
-                                           uint64_t offCopy, uint64_t cbSize)
+int GuestSessionTask::fileCopyToGuestInner(const Utf8Str &strSrcFile, RTVFSFILE hVfsFile,
+                                           const Utf8Str &strDstFile, ComObjPtr<GuestFile> &fileDst,
+                                           FileCopyFlag_T fFileCopyFlags, uint64_t offCopy, uint64_t cbSize)
 {
     RT_NOREF(fFileCopyFlags);
@@ -705,5 +697,6 @@
         {
             setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                Utf8StrFmt(GuestSession::tr("Seeking to offset %RU64 failed: %Rrc"), offCopy, rc));
+                                Utf8StrFmt(GuestSession::tr("Seeking to offset %RU64 of host file \"%s\" failed: %Rrc"),
+                                           offCopy, strSrcFile.c_str(), rc));
             return rc;
         }
@@ -719,13 +712,15 @@
         {
             setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                Utf8StrFmt(GuestSession::tr("Reading %RU32 bytes @ %RU64 from host failed: %Rrc"), cbChunk, cbWrittenTotal, rc));
+                                Utf8StrFmt(GuestSession::tr("Reading %RU32 bytes @ %RU64 from host file \"%s\" failed: %Rrc"),
+                                           cbChunk, cbWrittenTotal, strSrcFile.c_str(), rc));
             break;
         }
 
-        rc = dstFile->i_writeData(uTimeoutMs, byBuf, (uint32_t)cbRead, NULL /* No partial writes */);
+        rc = fileDst->i_writeData(uTimeoutMs, byBuf, (uint32_t)cbRead, NULL /* No partial writes */);
         if (RT_FAILURE(rc))
         {
             setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                Utf8StrFmt(GuestSession::tr("Writing %zu bytes to file on guest failed: %Rrc"), cbRead, rc));
+                                Utf8StrFmt(GuestSession::tr("Writing %zu bytes to guest file \"%s\" failed: %Rrc"),
+                                           cbRead, strDstFile.c_str(), rc));
             break;
         }
@@ -761,5 +756,6 @@
          * to the destination -> access denied. */
         setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                            Utf8StrFmt(GuestSession::tr("Writing to destination file failed: Access denied")));
+                            Utf8StrFmt(GuestSession::tr("Writing to guest file \"%s\" failed: Access denied"),
+                                       strDstFile.c_str()));
         rc = VERR_ACCESS_DENIED;
     }
@@ -768,6 +764,6 @@
         /* If we did not copy all let the user know. */
         setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                            Utf8StrFmt(GuestSession::tr("Copying to destination failed (%RU64/%RU64 bytes transfered)"),
-                                       cbWrittenTotal, cbSize));
+                            Utf8StrFmt(GuestSession::tr("Copying to guest file \"%s\" failed (%RU64/%RU64 bytes transfered)"),
+                                       strDstFile.c_str(), cbWrittenTotal, cbSize));
         rc = VERR_INTERRUPTED;
     }
@@ -805,7 +801,10 @@
     if (RT_FAILURE(rc))
     {
-        setProgressErrorMsg(VBOX_E_IPRT_ERROR, rc == VERR_GSTCTL_GUEST_ERROR ? rcGuest : rc,
-                            GuestSession::tr("Destination file \"%s\" could not be opened: %Rrc"),
-                            strDstFinal.c_str(), rc == VERR_GSTCTL_GUEST_ERROR ? rcGuest : rc);
+        if (rc == VERR_GSTCTL_GUEST_ERROR)
+            setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestSession::tr("Guest file could not be opened"),
+                                GuestErrorInfo(GuestErrorInfo::Type_File, rcGuest, strSrc.c_str()));
+        else
+            setProgressErrorMsg(VBOX_E_IPRT_ERROR,
+                                Utf8StrFmt(GuestSession::tr("Guest file \"%s\" could not be opened: %Rrc"), strSrc.c_str(), rc));
         return rc;
     }
@@ -824,5 +823,5 @@
         {
             setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                Utf8StrFmt(GuestSession::tr("Source path lookup for \"%s\" failed: %Rrc"),
+                                Utf8StrFmt(GuestSession::tr("Host path lookup for file \"%s\" failed: %Rrc"),
                                            strSrc.c_str(), rc));
         }
@@ -843,5 +842,5 @@
                         if (RTTimeSpecCompare(&dstModificationTimeTS, &srcObjInfo.ModificationTime) <= 0)
                         {
-                            LogRel2(("Guest Control: Destination file \"%s\" has same or newer modification date, skipping",
+                            LogRel2(("Guest Control: Guest file \"%s\" has same or newer modification date, skipping",
                                      strDstFinal.c_str()));
                             fSkip = true;
@@ -875,5 +874,5 @@
             {
                 setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                    Utf8StrFmt(GuestSession::tr("Source file lookup for \"%s\" failed: %Rrc"),
+                                    Utf8StrFmt(GuestSession::tr("Host file lookup for \"%s\" failed: %Rrc"),
                                                szSrcReal, rc));
             }
@@ -897,5 +896,6 @@
                              szSrcReal, strDstFinal.c_str(), srcObjInfo.cbObject));
 
-            rc = fileCopyToGuestInner(hSrcFile, dstFile, fFileCopyFlags, 0 /* Offset, unused */, srcObjInfo.cbObject);
+            rc = fileCopyToGuestInner(szSrcReal, hSrcFile, strDstFinal, dstFile,
+                                      fFileCopyFlags, 0 /* Offset, unused */, srcObjInfo.cbObject);
 
             int rc2 = RTVfsFileRelease(hSrcFile);
@@ -904,5 +904,5 @@
         else
             setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                Utf8StrFmt(GuestSession::tr("Opening source file \"%s\" failed: %Rrc"),
+                                Utf8StrFmt(GuestSession::tr("Opening host file \"%s\" failed: %Rrc"),
                                            szSrcReal, rc));
     }
@@ -1531,5 +1531,5 @@
         if (strErrorInfo.isEmpty())
             strErrorInfo = Utf8StrFmt(GuestSession::tr("Failed with %Rrc"), vrc);
-        setProgressErrorMsg(VBOX_E_IPRT_ERROR, vrc, "%s", strErrorInfo.c_str());
+        setProgressErrorMsg(VBOX_E_IPRT_ERROR, strErrorInfo);
     }
 
@@ -2030,5 +2030,5 @@
 
 int GuestSessionTaskUpdateAdditions::copyFileToGuest(GuestSession *pSession, RTVFS hVfsIso,
-                                                     Utf8Str const &strFileSource, const Utf8Str &strFileDest,
+                                                     Utf8Str const &strFileSrc, const Utf8Str &strFileDst,
                                                      bool fOptional)
 {
@@ -2037,5 +2037,5 @@
 
     RTVFSFILE hVfsFile = NIL_RTVFSFILE;
-    int rc = RTVfsFileOpen(hVfsIso, strFileSource.c_str(),
+    int rc = RTVfsFileOpen(hVfsIso, strFileSrc.c_str(),
                            RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE, & hVfsFile);
     if (RT_SUCCESS(rc))
@@ -2046,8 +2046,8 @@
         {
             LogRel(("Copying Guest Additions installer file \"%s\" to \"%s\" on guest ...\n",
-                    strFileSource.c_str(), strFileDest.c_str()));
+                    strFileSrc.c_str(), strFileDst.c_str()));
 
             GuestFileOpenInfo dstOpenInfo;
-            dstOpenInfo.mFilename    = strFileDest;
+            dstOpenInfo.mFilename    = strFileDst;
             dstOpenInfo.mOpenAction  = FileOpenAction_CreateOrReplace;
             dstOpenInfo.mAccessMode  = FileAccessMode_WriteOnly;
@@ -2062,11 +2062,11 @@
                 {
                     case VERR_GSTCTL_GUEST_ERROR:
-                        setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestFile::i_guestErrorToString(rcGuest));
+                        setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestFile::i_guestErrorToString(rcGuest, strFileDst.c_str()));
                         break;
 
                     default:
                         setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                            Utf8StrFmt(GuestSession::tr("Destination file \"%s\" could not be opened: %Rrc"),
-                                                       strFileDest.c_str(), rc));
+                                            Utf8StrFmt(GuestSession::tr("Guest file \"%s\" could not be opened: %Rrc"),
+                                                       strFileDst.c_str(), rc));
                         break;
                 }
@@ -2074,5 +2074,6 @@
             else
             {
-                rc = fileCopyToGuestInner(hVfsFile, dstFile, FileCopyFlag_None, 0 /*cbOffset*/, cbSrcSize);
+                rc = fileCopyToGuestInner(strFileSrc, hVfsFile, strFileDst, dstFile,
+                                          FileCopyFlag_None, 0 /*cbOffset*/, cbSrcSize);
 
                 int rc2 = dstFile->i_closeFile(&rcGuest);
@@ -2124,5 +2125,6 @@
 
             case VERR_GSTCTL_GUEST_ERROR:
-                setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(rcGuest));
+                setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestSession::tr("Running update file on guest failed"),
+                                    GuestErrorInfo(GuestErrorInfo::Type_Process, rcGuest, procInfo.mExecutable.c_str()));
                 break;
 
@@ -2388,10 +2390,11 @@
                         {
                             case VERR_GSTCTL_GUEST_ERROR:
-                                hr = setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestProcess::i_guestErrorToString(rcGuest));
+                                hr = setProgressErrorMsg(VBOX_E_IPRT_ERROR, GuestSession::tr("Creating installation directory on guest failed"),
+                                                         GuestErrorInfo(GuestErrorInfo::Type_Directory, rcGuest, strUpdateDir.c_str()));
                                 break;
 
                             default:
                                 hr = setProgressErrorMsg(VBOX_E_IPRT_ERROR,
-                                                         Utf8StrFmt(GuestSession::tr("Error creating installation directory \"%s\" on the guest: %Rrc"),
+                                                         Utf8StrFmt(GuestSession::tr("Creating installation directory \"%s\" on guest failed: %Rrc"),
                                                                     strUpdateDir.c_str(), rc));
                                 break;
