Index: /trunk/src/VBox/Devices/Storage/DrvVD.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DrvVD.cpp	(revision 55963)
+++ /trunk/src/VBox/Devices/Storage/DrvVD.cpp	(revision 55964)
@@ -2330,9 +2330,11 @@
 
 /**
- * @copydoc FNPDMDRVPOWEROFF
+ * Worker for the power off or destruct callback.
+ *
+ * @returns nothing.
+ * @param   pDrvIns    The driver instance.
  */
-static DECLCALLBACK(void) drvvdPowerOff(PPDMDRVINS pDrvIns)
-{
-    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
+static void drvvdPowerOffOrDestruct(PPDMDRVINS pDrvIns)
+{
     PVBOXDISK pThis = PDMINS_2_DATA(pDrvIns, PVBOXDISK);
     LogFlowFunc(("\n"));
@@ -2365,4 +2367,13 @@
     }
     drvvdFreeImages(pThis);
+}
+
+/**
+ * @copydoc FNPDMDRVPOWEROFF
+ */
+static DECLCALLBACK(void) drvvdPowerOff(PPDMDRVINS pDrvIns)
+{
+    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
+    drvvdPowerOffOrDestruct(pDrvIns);
 }
 
@@ -2471,4 +2482,10 @@
     LogFlowFunc(("\n"));
 
+    /*
+     * Make sure the block cache and disks are closed when this driver is
+     * destroyed. This method will get called without calling the power off
+     * callback first when we reconfigure the driver chain after a snapshot.
+     */
+    drvvdPowerOffOrDestruct(pDrvIns);
     if (pThis->MergeLock != NIL_RTSEMRW)
     {
