open-vmdk icon indicating copy to clipboard operation
open-vmdk copied to clipboard

add fuse utility

Open oliverkurth opened this issue 1 year ago • 0 comments

This adds a utility to mount a vmdk file as a raw disk image in read-only mode. The raw disk image can then be used with kpartx, or partfs (see https://github.com/braincorp/partfs) to access partitions, which can then be mounted. Example:

$ touch vmdk
$ vmdk-fuse --file=$(pwd)/minimal.vmdk ./vmdk
before fuse_main
$ ls -l
total 456800
-rw-r--r-- 1 okurth okurth  467756544 Mar 23 17:35 minimal.vmdk
-rw-r--r-- 1 okurth okurth 8589934592 Mar 23 17:35 vmdk     
$ mkdir partfs
$ partfs -o dev=./vmdk ./partfs/
$ ls -l partfs/
total 0
-rw-r--r-- 1 okurth okurth   10485760 Mar 23 17:35 p1
-rw-r--r-- 1 okurth okurth 7586430464 Mar 23 17:35 p2
-rw-r--r-- 1 okurth okurth  134217728 Mar 23 17:35 p3
-rw-r--r-- 1 okurth okurth  428867584 Mar 23 17:35 p4
-rw-r--r-- 1 okurth okurth  428867584 Mar 23 17:35 p5
$ mkdir p2
$ fuse2fs ./partfs/p2 ./p2 -o fakeroot,ro
Mounting read-only.
$ ls p2
bin  boot  dev  etc  extra  home  lib  lib64  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
$ 

Original PR was https://github.com/vmware/open-vmdk/pull/54, but the branch was renamed and this closed it.

oliverkurth avatar Apr 15 '25 20:04 oliverkurth