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?

  • Do you already have loop0p1 used? it does not release them automatically - even if the mount command fails. – TheFiddlerWins Jul 28 '15 at 21:23
  • No it is not used – user301916 Jul 28 '15 at 21:28

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.

  • 1
    You can (and should) accept your own answer if it solved your problem. – zymhan Apr 14 '16 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.