Mount VMDK containing GPT partition on Linux

Normally, to mount VMDK on Linux, you can follow these steps 

But what if the VMDK in question contains GPT with NTFS inside?  How do you find the offset and mount it?

#first losetup the raw disk
losetup /dev/loop0 ./file-flat.vmdk

#to find out offset do this
parted /dev/loop0
unit s
#find the start offset of the partition you're looking for and multiply by 512 (mine was 135266304 - yours will likely differ)

#use the offset to mount the actual partition
losetup -o 135266304 /dev/loop1 /dev/loop0

#now mount it
mount.ntfs-3g /dev/loop1 /mnt/vmdk

Leave a Reply

Your email address will not be published. Required fields are marked *