Index: /trunk/src/VBox/Storage/VMDK.cpp
===================================================================
--- /trunk/src/VBox/Storage/VMDK.cpp	(revision 85944)
+++ /trunk/src/VBox/Storage/VMDK.cpp	(revision 85945)
@@ -3769,4 +3769,23 @@
                                            char **ppszRawPartition)
 {
+# if 1
+    /*
+     * Ask the drive handle for its device number rather than mess about extracting
+     * it from the path (discovered this later when doing the path verification).
+     */
+    int                   rc         = VINF_SUCCESS;
+    DWORD                 cbReturned = 0;
+    STORAGE_DEVICE_NUMBER DevNum;
+    RT_ZERO(DevNum);
+    if (DeviceIoControl((HANDLE)RTFileToNative(hRawDrive), IOCTL_STORAGE_GET_DEVICE_NUMBER,
+                        NULL /*pvInBuffer*/, 0 /*cbInBuffer*/, &DevNum, sizeof(DevNum), &cbReturned, NULL /*pOverlapped*/))
+        RTStrAPrintf(ppszRawPartition, "\\\\.\\Harddisk%uPartition%u", DevNum.DeviceNumber, idxPartition);
+    else
+        rc = vdIfError(pImage->pIfError, RTErrConvertFromWin32(GetLastError()), RT_SRC_POS,
+                       N_("VMDK: Image path: '%s'. IOCTL_STORAGE_GET_DEVICE_NUMBER failed on '%s': %u"),
+                       pImage->pszFilename, pszRawDrive, GetLastError());
+    return rc;
+
+# else
     /*
      * First variant is \\.\PhysicalDriveX -> \\.\HarddiskXPartition{idxPartition}
@@ -3829,4 +3848,5 @@
                        pImage->pszFilename, pszRawDrive, idxPartition, rc);
     return rc;
+# endif
 }
 #endif /* RT_OS_WINDOWS */
