Index: /trunk/src/VBox/Devices/Storage/DrvVD.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DrvVD.cpp	(revision 55870)
+++ /trunk/src/VBox/Devices/Storage/DrvVD.cpp	(revision 55871)
@@ -2330,4 +2330,42 @@
 
 /**
+ * @copydoc FNPDMDRVPOWEROFF
+ */
+static DECLCALLBACK(void) drvvdPowerOff(PPDMDRVINS pDrvIns)
+{
+    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
+    PVBOXDISK pThis = PDMINS_2_DATA(pDrvIns, PVBOXDISK);
+    LogFlowFunc(("\n"));
+
+    RTSEMFASTMUTEX mutex;
+    ASMAtomicXchgHandle(&pThis->MergeCompleteMutex, NIL_RTSEMFASTMUTEX, &mutex);
+    if (mutex != NIL_RTSEMFASTMUTEX)
+    {
+        /* Request the semaphore to wait until a potentially running merge
+         * operation has been finished. */
+        int rc = RTSemFastMutexRequest(mutex);
+        AssertRC(rc);
+        pThis->fMergePending = false;
+        rc = RTSemFastMutexRelease(mutex);
+        AssertRC(rc);
+        rc = RTSemFastMutexDestroy(mutex);
+        AssertRC(rc);
+    }
+
+    if (RT_VALID_PTR(pThis->pBlkCache))
+    {
+        PDMR3BlkCacheRelease(pThis->pBlkCache);
+        pThis->pBlkCache = NULL;
+    }
+
+    if (RT_VALID_PTR(pThis->pDisk))
+    {
+        VDDestroy(pThis->pDisk);
+        pThis->pDisk = NULL;
+    }
+    drvvdFreeImages(pThis);
+}
+
+/**
  * VM resume notification that we use to undo what the temporary read-only image
  * mode set by drvvdSuspend.
@@ -2432,32 +2470,4 @@
     PVBOXDISK pThis = PDMINS_2_DATA(pDrvIns, PVBOXDISK);
     LogFlowFunc(("\n"));
-
-    RTSEMFASTMUTEX mutex;
-    ASMAtomicXchgHandle(&pThis->MergeCompleteMutex, NIL_RTSEMFASTMUTEX, &mutex);
-    if (mutex != NIL_RTSEMFASTMUTEX)
-    {
-        /* Request the semaphore to wait until a potentially running merge
-         * operation has been finished. */
-        int rc = RTSemFastMutexRequest(mutex);
-        AssertRC(rc);
-        pThis->fMergePending = false;
-        rc = RTSemFastMutexRelease(mutex);
-        AssertRC(rc);
-        rc = RTSemFastMutexDestroy(mutex);
-        AssertRC(rc);
-    }
-
-    if (RT_VALID_PTR(pThis->pBlkCache))
-    {
-        PDMR3BlkCacheRelease(pThis->pBlkCache);
-        pThis->pBlkCache = NULL;
-    }
-
-    if (RT_VALID_PTR(pThis->pDisk))
-    {
-        VDDestroy(pThis->pDisk);
-        pThis->pDisk = NULL;
-    }
-    drvvdFreeImages(pThis);
 
     if (pThis->MergeLock != NIL_RTSEMRW)
@@ -3318,5 +3328,5 @@
     NULL,
     /* pfnPowerOff */
-    NULL,
+    drvvdPowerOff,
     /* pfnSoftReset */
     NULL,
