NB: since I placed a bounty I'll gladly award the bounty to anyone who can provide a functional alternative to what I am demonstrating in my answer below (commercial or not). Because the reputation gets subtracted from me either way.
Out of the four solutions linked by harrymc in a comment (thanks!), I had already tried the first three. The fourth, a freeware called OSFMount also didn't help me. What's worse, the linked article uses misleading terminology:
[...] here are 4 ways to get it mounted in Windows as a disk drive.
The proper terminology would be to get it mounted as a volume. In fact the mounting part implies that. Roughly one could say that disks get attached, while volumes (== partitions on disks) get mounted. But my guess is that due to the fact that terminology varies between OSs and not everyone is a kernel mode developer with knowledge about the Windows storage driver architecture terminology has gotten fuzzy.
The shell extension installed by VMware calls it Map Virtual Disk
, although it would be more aptly named Mount Volume inside Virtual Disk
(or similar). Besides, the context menu (via shell extension) only provides an alternative route to the second presented solution, which uses the VMware Workstation GUI to invoke the dialog to Map Virtual Disks
.
Regardless, terminology is key here. Which is also why it took so long to come up with a result for this question. Too many people use misleading terminology, which "pollutes" search results.
However, since I placed a bounty, I also researched anew if there was a solution. I ended up on the excellent reboot.pro forum in this thread and from there found a mentioning of Arsenal Image Mounter. Apparently written, in large parts, by Olof Lagerkvist of LTR Data (creator of ImDisk), Arsenal Image Mounter includes a storport
driver, which is exactly the thing I was looking for.
The steps were:
- Installing the driver
- ... and using
ArsenalImageMounter.exe
from an older revision
... allowed to attach the VMDK file as a SCSI disk to Windows. This also caused the volumes to be auto-mounted (much like is done when you attach a partitioned USB disk), but the important part was that the volume was now visible to VeraCrypt for mounting.
This satisfies the requirements I put up in my question.
The steps in screenshots looked as follows (after installing the Arsenal Image Mounter driver):
(Terminology here is also a bit fuzzy, because this tool apparently provides both attaching an image file as SCSI disk and mounting volumes therein.)
And the result in the disk management snap-in of Windows 10 looks like this:
The relevant parts are that Disk 3
is the (VMDK) image file appearing as actual disk to the system and VeraCrypt is able to see that RAW volume which had been automatically assigned the drive letter H:
(and subsequently opened up the dialog to format said volume). The relevant parts are highlighted in the last screenshot.
2It's not clear to me what you're asking. Are you saying that you encrypted a partition (or drive) of a virtual disk with TrueCrypt/VeraCrypt, or you have TrueCrypt/VeraCrypt encrypted container (a
.tc
/.hc
file) that resides on a virtual disk? I presume you mean the former. I have not tested it myself, but have you tried mounting the.vmdk
as a drive on the host first? – jamesdlin – 2017-09-14T19:52:37.793@jamesdlin I don't have a container/file, but a partition/volume. Yes, I have tried it and VMware will only let me mount the volumes inside the
.vmdk
. Obviously you can't mount an encrypted volume directly but instead have to use TrueCrypt/VeraCrypt.kpartx
on Linux (as well aslosetup
) lets you connect images containing partition tables and partitions and makes them available to the system this way. This is the functionality I'd need, because I need TrueCrypt/VeraCrypt to be able to see the partitions so that I can mount the partition/volume via it. – 0xC0000022L – 2017-09-15T08:34:36.483Essentially the issue with this kind of volumes is that they need to be known to the volume manager prior to being mounted by TrueCrypt/VeraCrypt. – 0xC0000022L – 2017-09-15T08:39:20.527
Not that it helps, but as I see it, the problem is VeraCrypt will only enumerate physical disks/partitions to mount, so even if you mount the partition in the .vmdk with VMware's disk mounting tool, it won't be listed by VeraCrypt. Doh. – jamesdlin – 2017-09-15T11:05:11.723
Is it feasible to do the mounting from the host, then share the mounted volume? – harrymc – 2018-07-31T15:46:17.503
@harrymc not sure what you mean. But I am actually after being able to mount such a volume contained inside a VMDK from the host (i.e. the Windows system on which VMware Workstation runs). The missing link at this point seems to be to make the VMDK available in some fashion so that the volume mount manager can see the contained volume. – 0xC0000022L – 2018-07-31T16:13:41.730
Do you mean that your problem is that you have mounted a TrueCrypt/VeraCrypt volume in the VM and you want to expose it to the host or to the network, which is just the opposite of Shared Folders? If the volume is file-based, why can't you share the file itself and mount it on the host? Or do you want the mounted volume available in both host and guest in parallel? Is sharing the volume as a network share an acceptable solution? – harrymc – 2018-07-31T19:00:58.593
1@harrymc No, I have a Windows host and to stress the main point let's assume that I have not even installed VMware Workstation on it. Now I have a VMDK file which contains a number of volumes (i.e. partitions). I want to be able to see the volumes from the VMDK as devices on my Windows host in order to hand it to VeraCrypt and mount the encrypted volume. That is: any tool that attempts to mount the contained volume automatically is of no help as it would "see" the volume merely as raw. So it would perhaps get a drive letter but be inaccessible to Explorer and VeraCrypt for mounting. – 0xC0000022L – 2018-07-31T19:22:42.843
1
If you wish to just mount a vmdk file see for example these solutions, although you can only mount one partition at a time.
– harrymc – 2018-07-31T20:02:57.047@harrymc thanks for the pointers, except for OSFMount I had tried all of them. I just tried OSFMount and it has the same issue. All of these tools attempt to mount the partitions from the disk rather than simply making the disk available in a fashion that will make the contained partitions/volumes visible to VeraCrypt. Well, actually OSFMount lets me also mount the entire disk instead of individual volumes, but the result is that it's seen as an unformatted (or raw) disk as well. In conclusion VeraCrypt cannot mount the contained volume this way. – 0xC0000022L – 2018-07-31T20:22:36.003
I think we are getting nearer to understanding the problem. Is this a VeraCrypt rawdisk? – harrymc – 2018-07-31T20:33:02.823
It's an encrypted volume which VeraCrypt understands how to mount, yes. Alas, because there's seemingly no way to attach the VMDK as a disk (as opposed to attaching individual volumes contained therein), which is a different device stack, I have no way of accessing that encrypted volume on Windows other than by attaching it as virtual disk to some VM and running that VM. It really is inside my question, even after re-reading it now. But I just found something that may provide the solution. If it works, I'll post my own answer Q&A-style. – 0xC0000022L – 2018-07-31T20:53:09.603
1
This might help : Install the Virtual Disk Development Kit (VDDK) which may install the utility
– harrymc – 2018-07-31T21:17:02.393vmware-mount [driveletter:] [path-to-vmdk] [options]
.Maybe the downvote was because your post is too short and hard to understand. It has taken me a long time to understand the problem. You might try to clarify and perhaps give more details. – harrymc – 2018-07-31T21:26:09.260
@0xC0000022L - You shouldn't accuse people of downvoting your question, because in this case, you are accusing the incorrect person. A single downvote should be treated as an anomaly anyways. – Ramhound – 2018-07-31T21:26:36.430
@Ramhound I wasn't accusing, I was assuming. Wrongly, as it seems. But again, I don't care about the downvote, because - from where I stand - it arose from a misunderstanding of my question. No matter who downvoted. Besides I'm grateful harrymc inquired like that, as it motivated me to research anew on my own. – 0xC0000022L – 2018-07-31T21:50:18.660
All I know is your entire comment about the downvote came off as extremely rude – Ramhound – 2018-07-31T22:01:04.283
@harrymc I apologize if you were offended by my comment above. That was seriously not my intent. – 0xC0000022L – 2018-07-31T22:14:44.783
I was not offended (in truth I didn't even understand that you meant me). I think that you should also try ImDisk virtual disk driver whose usage for mounting vmdk is demoed here.
– harrymc – 2018-08-01T11:23:56.1331Windows can mount VHD and VHDX file natively. Can you try converting the vmdk to vhdx file and mount it? – phuclv – 2018-08-03T04:43:44.693
@phuclv That was my first thought seeing this question, and it seems to work assuming OP is happy to continue using the VHDs in VMware (which is possible). If you'd like to flesh out that comment into an answer, let me know and I'll delete mine. – Bob – 2018-08-06T02:21:17.443