Index: /trunk/include/VBox/hgcmsvc.h
===================================================================
--- /trunk/include/VBox/hgcmsvc.h	(revision 75968)
+++ /trunk/include/VBox/hgcmsvc.h	(revision 75969)
@@ -73,7 +73,8 @@
  * 6.4->6.5 Bacause pfnGetVMMDevSessionId was added pfnLoadState got the version
  *          parameter (VBox 6.0).
+ * 6.5->7.1 Because pfnNotify was added.
  */
-#define VBOX_HGCM_SVC_VERSION_MAJOR (0x0006)
-#define VBOX_HGCM_SVC_VERSION_MINOR (0x0004)
+#define VBOX_HGCM_SVC_VERSION_MAJOR (0x0007)
+#define VBOX_HGCM_SVC_VERSION_MINOR (0x0001)
 #define VBOX_HGCM_SVC_VERSION ((VBOX_HGCM_SVC_VERSION_MAJOR << 16) + VBOX_HGCM_SVC_VERSION_MINOR)
 
@@ -448,4 +449,20 @@
 typedef FNHGCMSVCEXT *PFNHGCMSVCEXT;
 
+/**
+ * Notification event.
+ */
+typedef enum HGCMNOTIFYEVENT
+{
+    HGCMNOTIFYEVENT_INVALID = 0,
+    HGCMNOTIFYEVENT_POWER_ON,
+    HGCMNOTIFYEVENT_RESUME,
+    HGCMNOTIFYEVENT_SUSPEND,
+    HGCMNOTIFYEVENT_RESET,
+    HGCMNOTIFYEVENT_POWER_OFF,
+    HGCMNOTIFYEVENT_END,
+    HGCMNOTIFYEVENT_32BIT_HACK = 0x7fffffff
+} HGCMNOTIFYEVENT;
+
+
 /** The Service DLL entry points.
  *
@@ -453,7 +470,8 @@
  *  function and the DLL must fill in the VBOXHGCMSVCFNTABLE
  *  with function pointers.
+ *
+ *  @note The structure is used in separately compiled binaries so an explicit
+ *        packing is required.
  */
-
-/* The structure is used in separately compiled binaries so an explicit packing is required. */
 typedef struct VBOXHGCMSVCFNTABLE
 {
@@ -509,4 +527,7 @@
     /** Register a service extension callback. */
     DECLR3CALLBACKMEMBER(int, pfnRegisterExtension, (void *pvService, PFNHGCMSVCEXT pfnExtension, void *pvExtension));
+
+    /** Notification (VM state). */
+    DECLR3CALLBACKMEMBER(void, pfnNotify, (void *pvService, HGCMNOTIFYEVENT enmEvent));
 
     /** User/instance data pointer for the service. */
Index: /trunk/src/VBox/HostServices/DragAndDrop/service.cpp
===================================================================
--- /trunk/src/VBox/HostServices/DragAndDrop/service.cpp	(revision 75968)
+++ /trunk/src/VBox/HostServices/DragAndDrop/service.cpp	(revision 75969)
@@ -164,4 +164,5 @@
     pTable->pfnLoadState         = NULL;  /* construction done before restoring suffices */
     pTable->pfnRegisterExtension = svcRegisterExtension;
+    pTable->pfnNotify            = NULL;
 
     /* Drag'n drop mode is disabled by default. */
Index: /trunk/src/VBox/HostServices/GuestControl/service.cpp
===================================================================
--- /trunk/src/VBox/HostServices/GuestControl/service.cpp	(revision 75968)
+++ /trunk/src/VBox/HostServices/GuestControl/service.cpp	(revision 75969)
@@ -2440,4 +2440,5 @@
                 pTable->pfnLoadState            = GstCtrlService::svcLoadState;
                 pTable->pfnRegisterExtension    = GstCtrlService::svcRegisterExtension;
+                pTable->pfnNotify               = NULL;
 
                 /* Service specific initialization. */
Index: /trunk/src/VBox/HostServices/GuestProperties/service.cpp
===================================================================
--- /trunk/src/VBox/HostServices/GuestProperties/service.cpp	(revision 75968)
+++ /trunk/src/VBox/HostServices/GuestProperties/service.cpp	(revision 75969)
@@ -45,4 +45,5 @@
 #include <iprt/asm.h>
 #include <iprt/assert.h>
+#include <iprt/buildconfig.h>
 #include <iprt/cpp/autores.h>
 #include <iprt/cpp/utils.h>
@@ -54,4 +55,5 @@
 #include <iprt/time.h>
 #include <VBox/vmm/dbgf.h>
+#include <VBox/version.h>
 
 #include <string>
@@ -97,5 +99,6 @@
              uint32_t u32Flags)
         : mName(name), mValue(value), mTimestamp(u64Timestamp),
-          mFlags(u32Flags) {}
+          mFlags(u32Flags)
+    {}
 
     /** Does the property name match one of a set of patterns? */
@@ -195,4 +198,6 @@
      * values: {(mPrevTimestamp - mcTimestampAdjustments), ..., mPrevTimestamp} */
     uint64_t mcTimestampAdjustments;
+    /** For helping setting host version properties _after_ restoring VMs. */
+    bool m_fSetHostVersionProps;
 
     /**
@@ -311,4 +316,5 @@
         , mPrevTimestamp(0)
         , mcTimestampAdjustments(0)
+        , m_fSetHostVersionProps(false)
 #ifdef ASYNC_HOST_NOTIFY
         , mhThreadNotifyHost(NIL_RTTHREAD)
@@ -409,4 +415,7 @@
     }
 
+    void setHostVersionProps();
+    static DECLCALLBACK(void) svcNotify(void *pvService, HGCMNOTIFYEVENT enmEvent);
+
     int initialize();
 
@@ -419,4 +428,5 @@
     int getProperty(uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
     int setProperty(uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool isGuest);
+    int setPropertyInternal(const char *pcszName, const char *pcszValue, uint32_t fFlags, uint64_t nsTimestamp, bool fIsGuest);
     int delProperty(uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool isGuest);
     int enumProps(uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
@@ -749,9 +759,32 @@
 
     /*
+     * Hand it over to the internal setter method.
+     */
+    rc = setPropertyInternal(pcszName, pcszValue, fFlags, u64TimeNano, isGuest);
+
+    LogFlowThisFunc(("%s=%s, rc=%Rrc\n", pcszName, pcszValue, rc));
+    return rc;
+}
+
+/**
+ * Internal property setter.
+ *
+ * @returns VBox status code.
+ * @param   pcszName            The property name.
+ * @param   pcszValue           The new value.
+ * @param   fFlags              The flags.
+ * @param   nsTimestamp         The timestamp.
+ * @param   fIsGuest            Is it the guest calling.
+ * @throws  std::bad_alloc  if an out of memory condition occurs
+ * @thread  HGCM
+ */
+int Service::setPropertyInternal(const char *pcszName, const char *pcszValue, uint32_t fFlags, uint64_t nsTimestamp, bool fIsGuest)
+{
+    /*
      * If the property already exists, check its flags to see if we are allowed
      * to change it.
      */
     Property *pProp = getPropertyInternal(pcszName);
-    rc = checkPermission(pProp ? pProp->mFlags : GUEST_PROP_F_NILFLAG, isGuest);
+    int rc = checkPermission(pProp ? pProp->mFlags : GUEST_PROP_F_NILFLAG, fIsGuest);
     /*
      * Handle names which are read-only for the guest.
@@ -759,5 +792,5 @@
     if (rc == VINF_SUCCESS && checkHostReserved(pcszName))
     {
-        if (isGuest)
+        if (fIsGuest)
             rc = VERR_PERMISSION_DENIED;
         else
@@ -772,5 +805,5 @@
         {
             pProp->mValue = pcszValue;
-            pProp->mTimestamp = u64TimeNano;
+            pProp->mTimestamp = nsTimestamp;
             pProp->mFlags = fFlags;
         }
@@ -780,5 +813,5 @@
             {
                 /* Create a new string space record. */
-                pProp = new Property(pcszName, pcszValue, u64TimeNano, fFlags);
+                pProp = new Property(pcszName, pcszValue, nsTimestamp, fFlags);
                 AssertPtr(pProp);
 
@@ -804,7 +837,7 @@
          * Send a notification to the guest and host and return.
          */
-        // if (isGuest)  /* Notify the host even for properties that the host
+        // if (fIsGuest) /* Notify the host even for properties that the host
         //                * changed.  Less efficient, but ensures consistency. */
-        int rc2 = doNotifications(pcszName, u64TimeNano);
+        int rc2 = doNotifications(pcszName, nsTimestamp);
         if (RT_SUCCESS(rc))
             rc = rc2;
@@ -1564,4 +1597,50 @@
 }
 
+
+/**
+ * Sets the VBoxVer, VBoxVerExt and VBoxRev properties.
+ */
+void Service::setHostVersionProps()
+{
+    uint64_t nsTimestamp = getCurrentTimestamp();
+
+    /* Set the raw VBox version string as a guest property. Used for host/guest
+     * version comparison. */
+    setPropertyInternal("/VirtualBox/HostInfo/VBoxVer", VBOX_VERSION_STRING_RAW,
+                        GUEST_PROP_F_TRANSIENT | GUEST_PROP_F_RDONLYGUEST, nsTimestamp, false /*fIsGuest*/);
+
+    /* Set the full VBox version string as a guest property. Can contain vendor-specific
+     * information/branding and/or pre-release tags. */
+    setPropertyInternal("/VirtualBox/HostInfo/VBoxVerExt", VBOX_VERSION_STRING,
+                        GUEST_PROP_F_TRANSIENT | GUEST_PROP_F_RDONLYGUEST, nsTimestamp, false /*fIsGuest*/);
+
+    /* Set the VBox SVN revision as a guest property */
+    setPropertyInternal("/VirtualBox/HostInfo/VBoxRev", RTBldCfgRevisionStr(),
+                        GUEST_PROP_F_TRANSIENT | GUEST_PROP_F_RDONLYGUEST, nsTimestamp, false /*fIsGuest*/);
+}
+
+
+/**
+ * @interface_method_impl{VBOXHGCMSVCFNTABLE,pfnNotify}
+ */
+/*static*/ DECLCALLBACK(void) Service::svcNotify(void *pvService, HGCMNOTIFYEVENT enmEvent)
+{
+    SELF *pThis = reinterpret_cast<SELF *>(pvService);
+    AssertPtrReturnVoid(pThis);
+
+    /* Make sure the host version properties have been touched and are
+       up-to-date after a restore: */
+    if (   !pThis->m_fSetHostVersionProps
+        && (enmEvent == HGCMNOTIFYEVENT_RESUME || enmEvent == HGCMNOTIFYEVENT_POWER_ON))
+    {
+        pThis->setHostVersionProps();
+        pThis->m_fSetHostVersionProps = true;
+    }
+
+    /** @todo add suspend/resume property? */
+    /** @todo add reset counter? */
+}
+
+
 #ifdef ASYNC_HOST_NOTIFY
 
@@ -1602,4 +1681,26 @@
 int Service::initialize()
 {
+    /*
+     * Insert standard host properties.
+     */
+    try
+    {
+        /* The host version will but updated again on power on or resume
+           (after restore), however we need the properties now for restored
+           guest notification/wait calls. */
+        setHostVersionProps();
+
+        /* Sysprep execution by VBoxService (host is allowed to change these). */
+        uint64_t nsTimestamp = getCurrentTimestamp();
+        setPropertyInternal("/VirtualBox/HostGuest/SysprepExec", "", GUEST_PROP_F_TRANSIENT | GUEST_PROP_F_RDONLYGUEST,
+                            nsTimestamp, false /*fIsGuest*/);
+        setPropertyInternal("/VirtualBox/HostGuest/SysprepArgs", "", GUEST_PROP_F_TRANSIENT | GUEST_PROP_F_RDONLYGUEST,
+                            nsTimestamp, false /*fIsGuest*/);
+    }
+    catch (std::bad_alloc &)
+    {
+        return VERR_NO_MEMORY;
+    }
+
 #ifdef ASYNC_HOST_NOTIFY
     /* The host notification thread and queue. */
@@ -1728,4 +1829,5 @@
                 ptable->pfnLoadState          = NULL;  /* construction done before restoring suffices */
                 ptable->pfnRegisterExtension  = Service::svcRegisterExtension;
+                ptable->pfnNotify             = Service::svcNotify;
                 ptable->pvService             = pService;
 
Index: /trunk/src/VBox/HostServices/SharedClipboard/service.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedClipboard/service.cpp	(revision 75968)
+++ /trunk/src/VBox/HostServices/SharedClipboard/service.cpp	(revision 75969)
@@ -1035,4 +1035,5 @@
             ptable->pfnLoadState  = svcLoadState;
             ptable->pfnRegisterExtension  = svcRegisterExtension;
+            ptable->pfnNotify     = NULL;
             ptable->pvService     = NULL;
 
Index: /trunk/src/VBox/HostServices/SharedFolders/service.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedFolders/service.cpp	(revision 75968)
+++ /trunk/src/VBox/HostServices/SharedFolders/service.cpp	(revision 75969)
@@ -1747,4 +1747,5 @@
             ptable->pfnSaveState  = svcSaveState;
             ptable->pfnLoadState  = svcLoadState;
+            ptable->pfnNotify     = NULL;
             ptable->pvService     = NULL;
         }
Index: /trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp	(revision 75968)
+++ /trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp	(revision 75969)
@@ -1547,4 +1547,5 @@
             ptable->pfnSaveState  = svcSaveState;
             ptable->pfnLoadState  = svcLoadState;
+            ptable->pfnNotify     = NULL;
             ptable->pvService     = NULL;
 
Index: /trunk/src/VBox/Main/include/HGCM.h
===================================================================
--- /trunk/src/VBox/Main/include/HGCM.h	(revision 75968)
+++ /trunk/src/VBox/Main/include/HGCM.h	(revision 75969)
@@ -47,4 +47,5 @@
 
 int HGCMHostCall(const char *pszServiceName, uint32_t function, uint32_t cParms, VBOXHGCMSVCPARM aParms[]);
+int HGCMBroadcastEvent(HGCMNOTIFYEVENT enmEvent);
 
 #ifdef VBOX_WITH_CRHGSMI
Index: /trunk/src/VBox/Main/include/VMMDev.h
===================================================================
--- /trunk/src/VBox/Main/include/VMMDev.h	(revision 75968)
+++ /trunk/src/VBox/Main/include/VMMDev.h	(revision 75969)
@@ -78,9 +78,12 @@
 # endif
 #endif
-
     static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
     static DECLCALLBACK(int)    drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
     static DECLCALLBACK(void)   drvDestruct(PPDMDRVINS pDrvIns);
     static DECLCALLBACK(void)   drvReset(PPDMDRVINS pDrvIns);
+    static DECLCALLBACK(void)   drvPowerOn(PPDMDRVINS pDrvIns);
+    static DECLCALLBACK(void)   drvPowerOff(PPDMDRVINS pDrvIns);
+    static DECLCALLBACK(void)   drvSuspend(PPDMDRVINS pDrvIns);
+    static DECLCALLBACK(void)   drvResume(PPDMDRVINS pDrvIns);
 
     Console * const         mParent;
Index: /trunk/src/VBox/Main/src-client/HGCM.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/HGCM.cpp	(revision 75968)
+++ /trunk/src/VBox/Main/src-client/HGCM.cpp	(revision 75969)
@@ -176,4 +176,6 @@
 
         int HostCall(uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM *paParms);
+        static void BroadcastNotify(HGCMNOTIFYEVENT enmEvent);
+        void Notify(HGCMNOTIFYEVENT enmEvent);
 
 #ifdef VBOX_WITH_CRHGSMI
@@ -401,15 +403,16 @@
  */
 
-#define SVC_MSG_LOAD       (0)  /* Load the service library and call VBOX_HGCM_SVCLOAD_NAME entry point. */
-#define SVC_MSG_UNLOAD     (1)  /* call pfnUnload and unload the service library. */
-#define SVC_MSG_CONNECT    (2)  /* pfnConnect */
-#define SVC_MSG_DISCONNECT (3)  /* pfnDisconnect */
-#define SVC_MSG_GUESTCALL  (4)  /* pfnGuestCall */
-#define SVC_MSG_HOSTCALL   (5)  /* pfnHostCall */
-#define SVC_MSG_LOADSTATE  (6)  /* pfnLoadState. */
-#define SVC_MSG_SAVESTATE  (7)  /* pfnSaveState. */
-#define SVC_MSG_QUIT       (8)  /* Terminate the thread. */
-#define SVC_MSG_REGEXT     (9)  /* pfnRegisterExtension */
-#define SVC_MSG_UNREGEXT   (10) /* pfnRegisterExtension */
+#define SVC_MSG_LOAD       (0)  /**< Load the service library and call VBOX_HGCM_SVCLOAD_NAME entry point. */
+#define SVC_MSG_UNLOAD     (1)  /**< call pfnUnload and unload the service library. */
+#define SVC_MSG_CONNECT    (2)  /**< pfnConnect */
+#define SVC_MSG_DISCONNECT (3)  /**< pfnDisconnect */
+#define SVC_MSG_GUESTCALL  (4)  /**< pfnGuestCall */
+#define SVC_MSG_HOSTCALL   (5)  /**< pfnHostCall */
+#define SVC_MSG_LOADSTATE  (6)  /**< pfnLoadState. */
+#define SVC_MSG_SAVESTATE  (7)  /**< pfnSaveState. */
+#define SVC_MSG_QUIT       (8)  /**< Terminate the thread. */
+#define SVC_MSG_REGEXT     (9)  /**< pfnRegisterExtension */
+#define SVC_MSG_UNREGEXT   (10) /**< pfnRegisterExtension */
+#define SVC_MSG_NOTIFY     (11) /**< pfnNotify */
 #ifdef VBOX_WITH_CRHGSMI
 # define SVC_MSG_HOSTFASTCALLASYNC (21) /* pfnHostCall */
@@ -522,4 +525,11 @@
         /* Handle of the registered extension. */
         HGCMSVCEXTHANDLE handle;
+};
+
+class HGCMMsgNotify: public HGCMMsgCore
+{
+    public:
+        /** The event. */
+        HGCMNOTIFYEVENT enmEvent;
 };
 
@@ -555,4 +565,5 @@
         case SVC_MSG_REGEXT:      return new HGCMMsgSvcRegisterExtension();
         case SVC_MSG_UNREGEXT:    return new HGCMMsgSvcUnregisterExtension();
+        case SVC_MSG_NOTIFY:      return new HGCMMsgNotify();
         default:
             AssertReleaseMsgFailed(("Msg id = %08X\n", u32MsgId));
@@ -812,4 +823,13 @@
             } break;
 
+            case SVC_MSG_NOTIFY:
+            {
+                HGCMMsgNotify *pMsg = (HGCMMsgNotify *)pMsgCore;
+
+                LogFlowFunc(("SVC_MSG_NOTIFY enmEvent = %d\n", pMsg->enmEvent));
+
+                pSvc->m_fntable.pfnNotify(pSvc->m_fntable.pvService, pMsg->enmEvent);
+            } break;
+
             default:
             {
@@ -1794,4 +1814,38 @@
 }
 
+/** Posts a broadcast notification event to all interested services.
+ *
+ * @param   enmEvent    The notification event.
+ */
+/*static*/ void HGCMService::BroadcastNotify(HGCMNOTIFYEVENT enmEvent)
+{
+    for (HGCMService *pService = sm_pSvcListHead; pService != NULL; pService = pService->m_pSvcNext)
+    {
+        pService->Notify(enmEvent);
+    }
+}
+
+/** Posts a broadcast notification event to the service.
+ *
+ * @param   enmEvent    The notification event.
+ */
+void HGCMService::Notify(HGCMNOTIFYEVENT enmEvent)
+{
+    LogFlowFunc(("%s enmEvent=%d pfnNotify=%p\n", m_pszSvcName, enmEvent, m_fntable.pfnNotify));
+    if (m_fntable.pfnNotify)
+    {
+        HGCMMsgCore *pCoreMsg;
+        int rc = hgcmMsgAlloc(m_pThread, &pCoreMsg, SVC_MSG_NOTIFY, hgcmMessageAllocSvc);
+        if (RT_SUCCESS(rc))
+        {
+            HGCMMsgNotify *pMsg = (HGCMMsgNotify *)pCoreMsg;
+            pMsg->enmEvent = enmEvent;
+
+            rc = hgcmMsgPost(pMsg, NULL);
+            AssertRC(rc);
+        }
+    }
+}
+
 #ifdef VBOX_WITH_CRHGSMI
 
@@ -1856,17 +1910,18 @@
 
 /* Messages processed by the main HGCM thread. */
-#define HGCM_MSG_CONNECT    (10)  /* Connect a client to a service. */
-#define HGCM_MSG_DISCONNECT (11)  /* Disconnect the specified client id. */
-#define HGCM_MSG_LOAD       (12)  /* Load the service. */
-#define HGCM_MSG_HOSTCALL   (13)  /* Call the service. */
-#define HGCM_MSG_LOADSTATE  (14)  /* Load saved state for the specified service. */
-#define HGCM_MSG_SAVESTATE  (15)  /* Save state for the specified service. */
-#define HGCM_MSG_RESET      (16)  /* Disconnect all clients from the specified service. */
-#define HGCM_MSG_QUIT       (17)  /* Unload all services and terminate the thread. */
-#define HGCM_MSG_REGEXT     (18)  /* Register a service extension. */
-#define HGCM_MSG_UNREGEXT   (19)  /* Unregister a service extension. */
+#define HGCM_MSG_CONNECT    (10)  /**< Connect a client to a service. */
+#define HGCM_MSG_DISCONNECT (11)  /**< Disconnect the specified client id. */
+#define HGCM_MSG_LOAD       (12)  /**< Load the service. */
+#define HGCM_MSG_HOSTCALL   (13)  /**< Call the service. */
+#define HGCM_MSG_LOADSTATE  (14)  /**< Load saved state for the specified service. */
+#define HGCM_MSG_SAVESTATE  (15)  /**< Save state for the specified service. */
+#define HGCM_MSG_RESET      (16)  /**< Disconnect all clients from the specified service. */
+#define HGCM_MSG_QUIT       (17)  /**< Unload all services and terminate the thread. */
+#define HGCM_MSG_REGEXT     (18)  /**< Register a service extension. */
+#define HGCM_MSG_UNREGEXT   (19)  /**< Unregister a service extension. */
+#define HGCM_MSG_BRD_NOTIFY (20)  /**< Broadcast notification event (VM state change). */
 #ifdef VBOX_WITH_CRHGSMI
-# define HGCM_MSG_SVCAQUIRE  (30)  /* Acquire a service handle (for fast host calls) */
-# define HGCM_MSG_SVCRELEASE (31)  /* Release a service */
+# define HGCM_MSG_SVCAQUIRE  (30) /**< Acquire a service handle (for fast host calls) */
+# define HGCM_MSG_SVCRELEASE (31) /**< Release a service */
 #endif
 
@@ -1953,4 +2008,11 @@
 };
 
+class HGCMMsgMainBroadcastNotify: public HGCMMsgCore
+{
+    public:
+        /** The notification event. */
+        HGCMNOTIFYEVENT enmEvent;
+};
+
 #ifdef VBOX_WITH_CRHGSMI
 class HGCMMsgMainSvcAcquire: public HGCMMsgCore
@@ -1986,4 +2048,5 @@
         case HGCM_MSG_REGEXT:     return new HGCMMsgMainRegisterExtension();
         case HGCM_MSG_UNREGEXT:   return new HGCMMsgMainUnregisterExtension();
+        case HGCM_MSG_BRD_NOTIFY: return new HGCMMsgMainBroadcastNotify();
 #ifdef VBOX_WITH_CRHGSMI
         case HGCM_MSG_SVCAQUIRE:  return new HGCMMsgMainSvcAcquire();
@@ -2100,4 +2163,13 @@
                     pService->ReleaseService();
                 }
+            } break;
+
+            case HGCM_MSG_BRD_NOTIFY:
+            {
+                HGCMMsgMainBroadcastNotify *pMsg = (HGCMMsgMainBroadcastNotify *)pMsgCore;
+
+                LogFlowFunc(("HGCM_MSG_BRD_NOTIFY enmEvent=%d\n", pMsg->enmEvent));
+
+                HGCMService::BroadcastNotify(pMsg->enmEvent);
             } break;
 
@@ -2147,4 +2219,6 @@
 
                 HGCMService::Reset();
+
+                HGCMService::BroadcastNotify(HGCMNOTIFYEVENT_RESET);
             } break;
 
@@ -2551,5 +2625,5 @@
 }
 
-/* The host calls the service.
+/** The host calls the service.
  *
  * @param pszServiceName The service name to be called.
@@ -2557,4 +2631,6 @@
  * @param cParms         Number of parameters.
  * @param paParms        Pointer to array of parameters.
+ * @param fWait          Whether to wait for the call to complete (default),
+ *                       or just post it and return immediately.
  * @return VBox rc.
  */
@@ -2597,4 +2673,30 @@
 }
 
+/** Posts a notification event to all services.
+ *
+ * @param   enmEvent    The notification event.
+ * @return  VBox rc.
+ */
+int HGCMBroadcastEvent(HGCMNOTIFYEVENT enmEvent)
+{
+    LogFlowFunc(("enmEvent=%d\n", enmEvent));
+
+    HGCMMsgCore *pCoreMsg;
+    int rc = hgcmMsgAlloc(g_pHgcmThread, &pCoreMsg, HGCM_MSG_BRD_NOTIFY, hgcmMainMessageAlloc);
+
+    if (RT_SUCCESS(rc))
+    {
+        HGCMMsgMainBroadcastNotify *pMsg = (HGCMMsgMainBroadcastNotify *)pCoreMsg;
+
+        pMsg->enmEvent = enmEvent;
+
+        rc = hgcmMsgPost(pMsg, NULL);
+    }
+
+    LogFlowFunc(("rc = %Rrc\n", rc));
+    return rc;
+}
+
+
 #ifdef VBOX_WITH_CRHGSMI
 int HGCMHostSvcHandleCreate(const char *pszServiceName, HGCMCVSHANDLE * phSvc)
Index: /trunk/src/VBox/Main/src-client/VMMDevInterface.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/VMMDevInterface.cpp	(revision 75968)
+++ /trunk/src/VBox/Main/src-client/VMMDevInterface.cpp	(revision 75969)
@@ -29,5 +29,4 @@
 #include <VBox/shflsvc.h>
 #include <iprt/asm.h>
-#include <iprt/buildconfig.h>
 
 #ifdef VBOX_WITH_HGCM
@@ -36,7 +35,4 @@
 # if defined(RT_OS_DARWIN) && defined(VBOX_WITH_CROGL)
 #  include <VBox/HostServices/VBoxCrOpenGLSvc.h>
-# endif
-# ifdef VBOX_WITH_GUEST_PROPS
-#  include <VBox/version.h>
 # endif
 #endif
@@ -770,4 +766,48 @@
 
 /**
+ * @interface_method_impl{PDMDRVREG,pfnSuspend}
+ */
+/*static*/ DECLCALLBACK(void) VMMDev::drvSuspend(PPDMDRVINS pDrvIns)
+{
+    RT_NOREF(pDrvIns);
+#ifdef VBOX_WITH_HGCM
+    HGCMBroadcastEvent(HGCMNOTIFYEVENT_SUSPEND);
+#endif
+}
+
+/**
+ * @interface_method_impl{PDMDRVREG,pfnResume}
+ */
+/*static*/ DECLCALLBACK(void) VMMDev::drvResume(PPDMDRVINS pDrvIns)
+{
+    RT_NOREF(pDrvIns);
+#ifdef VBOX_WITH_HGCM
+    HGCMBroadcastEvent(HGCMNOTIFYEVENT_RESUME);
+#endif
+}
+
+/**
+ * @interface_method_impl{PDMDRVREG,pfnPowerOff}
+ */
+/*static*/ DECLCALLBACK(void) VMMDev::drvPowerOff(PPDMDRVINS pDrvIns)
+{
+    RT_NOREF(pDrvIns);
+#ifdef VBOX_WITH_HGCM
+    HGCMBroadcastEvent(HGCMNOTIFYEVENT_POWER_ON);
+#endif
+}
+
+/**
+ * @interface_method_impl{PDMDRVREG,pfnPowerOn}
+ */
+/*static*/ DECLCALLBACK(void) VMMDev::drvPowerOn(PPDMDRVINS pDrvIns)
+{
+    RT_NOREF(pDrvIns);
+#ifdef VBOX_WITH_HGCM
+    HGCMBroadcastEvent(HGCMNOTIFYEVENT_POWER_ON);
+#endif
+}
+
+/**
  * @interface_method_impl{PDMDRVREG,pfnReset}
  */
@@ -778,5 +818,5 @@
 #ifdef VBOX_WITH_HGCM
     HGCMHostReset();
-#endif /* VBOX_WITH_HGCM */
+#endif
 }
 
@@ -883,5 +923,7 @@
     AssertReturn(ptrConsole.isNotNull(), VERR_INVALID_POINTER);
 
-    /* Load the service */
+    /*
+     * Load the service
+     */
     int rc = hgcmLoadService("VBoxGuestPropSvc", "VBoxGuestPropSvc");
     if (RT_FAILURE(rc))
@@ -890,14 +932,4 @@
         return VINF_SUCCESS; /* That is not a fatal failure. */
     }
-    /*
-     * Initialize built-in properties that can be changed and saved.
-     *
-     * These are typically transient properties that the guest cannot
-     * change.
-     */
-
-    /* Sysprep execution by VBoxService. */
-    i_guestPropSet("/VirtualBox/HostGuest/SysprepExec", "", "TRANSIENT, RDONLYGUEST");
-    i_guestPropSet("/VirtualBox/HostGuest/SysprepArgs", "", "TRANSIENT, RDONLYGUEST");
 
     /*
@@ -964,18 +996,4 @@
 
     /*
-     * These properties have to be set before pulling over the properties
-     * from the machine XML, to ensure that properties saved in the XML
-     * will override them.
-     */
-    /* Set the raw VBox version string as a guest property. Used for host/guest
-     * version comparison. */
-    i_guestPropSet("/VirtualBox/HostInfo/VBoxVer", VBOX_VERSION_STRING_RAW, "TRANSIENT, RDONLYGUEST");
-    /* Set the full VBox version string as a guest property. Can contain vendor-specific
-     * information/branding and/or pre-release tags. */
-    i_guestPropSet("/VirtualBox/HostInfo/VBoxVerExt", VBOX_VERSION_STRING, "TRANSIENT, RDONLYGUEST");
-    /* Set the VBox SVN revision as a guest property */
-    i_guestPropSet("/VirtualBox/HostInfo/VBoxRev", RTBldCfgRevisionStr(), "TRANSIENT, RDONLYGUEST");
-
-    /*
      * Register the host notification callback
      */
@@ -1178,11 +1196,11 @@
     NULL,
     /* pfnPowerOn */
-    NULL,
+    VMMDev::drvPowerOn,
     /* pfnReset */
     VMMDev::drvReset,
     /* pfnSuspend */
-    NULL,
+    VMMDev::drvSuspend,
     /* pfnResume */
-    NULL,
+    VMMDev::drvResume,
     /* pfnAttach */
     NULL,
@@ -1190,5 +1208,5 @@
     NULL,
     /* pfnPowerOff */
-    NULL,
+    VMMDev::drvPowerOff,
     /* pfnSoftReset */
     NULL,
