Loop back mount a VMDK flat image on a Linux Box

I am trying to loop mount a VMDK flat image generated by VMware fusion. The VMDK file has the -flat extension. I am trying to use kpartx

kpartx -av /path/to /my/vmdk

but I get

llseek error
device-mapper: resume ioctl on loop0p1 failed: invalid argument
create/reload failed on loop0p1
add map loop0p1 (0:0): 0 18872320 linear /dev/loop0 2048

I also tried to convert the vmdk into raw and I got the same error

Any idea what's wrong?


Solution 1:

For some reason this has worked

losetup /dev/loop0 <vmdk file>
kpartx -av /dev/loop0
mount /dev/mapper/loop0p1 /mount/point

I have no idea why this worked and not the above method. If you have any explanation, please let me know.