The VMDK format is documented in vmdk_specs.pdf.
All VMDK files have some plaintext with metadata. With flat images, this is a separate file from the raw disk data; with sparse images, it's at the beginning of the VMDK file. This can tell you what type of image it is (there are a few others, but these are the main variants):
These are installed with VMware Workstation; I'm not sure about other products.
Flat VMDK files, which are just raw disk images (the actual data part, suffixed with -flat), can be inspected by
parted <file> then type
parted <file> print). This also appears to work if there are no partitions (just a formatted raw block device).
vmware-mount can be used to mount partitions in a VMDK file.
Flat VMDK files are just raw images of the disk, so they can be mounted directly; however, you have to find the first sector of the partition (if the disk has partitions). For example, see Mount Flat VMWare Disk Images Under Linux. It looks like the
kpartx program can be used to automatically set up loop devices for each partition, but I couldn't get the device to mount the one time I tried it. If you can find the right offset (try
fdisk -l -u <file>, multiply start by 512, or the number of bytes per sector; or
parted foobar-flat.vmdk unit B print, which gives you bytes), you can skip the
losetup described in the previously-mentioned article, because mount will do it for you, given the right option:
mount -o loop,offset=1048576 foobar-flat.vmdk /mnt
If the disk image doesn't have a partition table (i.e. the raw block device is formatted with whatever filesystem; this is useful to be able to increase the size while the virtual machine is online),
vmware-mount won't be able to mount it. However, if it's a flat image, you can just mount it directly:
mount -o loop foobar-flat.vmdk /mnt
If you have a sparse image,
vmware-mount can be used with the
-f option to "mount a flat representation of the disk at 'mountPoint/flat.'" Then you can mount it as if you had a flat VMDK file:
vmware-mount -f foobar.vmdk mountpoint mount -o loop mountpoint/flat /mnt