Tl;dr run this command to mount the second partition on fedora.vmdk
to the mountpoint ./mnt
.
guestmount -a fedora.vmdk -m /dev/sda2 --ro ./mnt
guestmount
is part of libguestfs
. In nixpkgs, use libguestfs-with-appliance
instead of libguestfs
, since the latter produces the following error. See NixOS/nixpkgs#37540 for details.
libguestfs: error: cannot find any suitable libguestfs supermin, fixed or old-style appliance on LIBGUESTFS_PATH (search path: /nix/store/c2q57gv3kxl0pvwbdjc8hpqpvykl6n4g-libguestfs-1.48.4/lib/guestfs)