$ virt-list-filesystems Debian5x64.img /dev/debian5x64/home /dev/debian5x64/root /dev/debian5x64/tmp /dev/debian5x64/usr /dev/debian5x64/var /dev/sda1
You can also augment this tool with the -a and -l options. The -a option tells it to list swap partitions too. The -l option tells it to show the filesystem type on each partition that was found:
$ virt-list-filesystems -a -l Fedora12.img /dev/sda1 ext4 /dev/vg_f12x64/lv_root ext4 /dev/vg_f12x64/lv_swap swap
While this is a fairly simple tool, the use case comes from a user who asked me how I knew what filesystems could be mounted using the guestmount command. The answer is that you don’t know, unless you know something about the guest, or you interactively examine the guest using guestfish, or just use this new tool.