Index: /trunk/include/iprt/dvm.h
===================================================================
--- /trunk/include/iprt/dvm.h	(revision 85886)
+++ /trunk/include/iprt/dvm.h	(revision 85887)
@@ -414,4 +414,8 @@
     /** Invalid zero value. */
     RTDVMVOLIDX_INVALID = 0,
+    /** Index matching the host's volume numbering.
+     * This is a pseudo index, that gets translated to one of the others depending
+     * on which host we're running on. */
+    RTDVMVOLIDX_HOST,
     /** Only consider user visible ones, i.e. don't count MBR extended partition
      *  entries and such like. */
Index: /trunk/src/VBox/Runtime/common/dvm/dvm.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/dvm/dvm.cpp	(revision 85886)
+++ /trunk/src/VBox/Runtime/common/dvm/dvm.cpp	(revision 85887)
@@ -737,4 +737,16 @@
     AssertReturn(enmIndex > RTDVMVOLIDX_INVALID && enmIndex < RTDVMVOLIDX_END, UINT32_MAX);
 
+    if (enmIndex == RTDVMVOLIDX_HOST)
+    {
+#ifdef RT_OS_WINDOWS
+        enmIndex = RTDVMVOLIDX_USER_VISIBLE;
+#elif defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) || defined(RT_OS_SOLARIS) || defined(RT_OS_DARWIN)
+/** @todo verify darwin, solaris and freebsd matches the linux algo. Check the linux index matching actual linux. */
+        enmIndex = RTDVMVOLIDX_LINUX;
+#else
+# error "PORTME"
+#endif
+    }
+
     return pThis->pVolMgr->pDvmFmtOps->pfnVolumeGetIndex(pThis->hVolFmt, enmIndex);
 }
Index: /trunk/src/VBox/Runtime/common/dvm/dvmbsdlabel.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/dvm/dvmbsdlabel.cpp	(revision 85886)
+++ /trunk/src/VBox/Runtime/common/dvm/dvmbsdlabel.cpp	(revision 85887)
@@ -528,4 +528,5 @@
 
         case RTDVMVOLIDX_INVALID:
+        case RTDVMVOLIDX_HOST:
         case RTDVMVOLIDX_END:
         case RTDVMVOLIDX_32BIT_HACK:
Index: /trunk/src/VBox/Runtime/common/dvm/dvmgpt.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/dvm/dvmgpt.cpp	(revision 85886)
+++ /trunk/src/VBox/Runtime/common/dvm/dvmgpt.cpp	(revision 85887)
@@ -558,7 +558,8 @@
             return pVol->idxEntry;
 
+        case RTDVMVOLIDX_INVALID:
+        case RTDVMVOLIDX_HOST:
+        case RTDVMVOLIDX_END:
         case RTDVMVOLIDX_32BIT_HACK:
-        case RTDVMVOLIDX_INVALID:
-        case RTDVMVOLIDX_END:
             break;
         /* no default! */
Index: /trunk/src/VBox/Runtime/common/dvm/dvmmbr.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/dvm/dvmmbr.cpp	(revision 85886)
+++ /trunk/src/VBox/Runtime/common/dvm/dvmmbr.cpp	(revision 85887)
@@ -825,4 +825,5 @@
 
         case RTDVMVOLIDX_INVALID:
+        case RTDVMVOLIDX_HOST:
         case RTDVMVOLIDX_END:
         case RTDVMVOLIDX_32BIT_HACK:
Index: /trunk/src/VBox/Runtime/include/internal/dvm.h
===================================================================
--- /trunk/src/VBox/Runtime/include/internal/dvm.h	(revision 85886)
+++ /trunk/src/VBox/Runtime/include/internal/dvm.h	(revision 85887)
@@ -273,5 +273,5 @@
      * @returns The requested index. UINT32_MAX on failure.
      * @param   hVolFmt         The format specific volume handle.
-     * @param   enmIndex        The index to get.
+     * @param   enmIndex        The index to get. Never RTDVMVOLIDX_HOST.
      * @sa RTDvmVolumeGetIndex
      */
