Hi to day we are going to give more examples about the libguestfs tools. We will look today guestmount tool. To mount a disk image with specified partition on a file.
$ guestmount -a cirros-0.3.0-i386-disk.img -m /dev/sda1 test2
$ ls test2/
bin boot dev etc home init initrd.img lib linuxrc lost+found mnt old-root opt proc root run sbin sys tmp usr var vmlinuz
Normally guestmount mounts the disk or partition with read-write options if you want to mount readonly use -r...