libguestfs is a library for accessing and modifying guest disk images. Amongst the things this is good for: making batch configuration changes to guests, getting disk used/free statistics (see also: virt-df), migrating between virtualization systems (see also: virt-p2v), performing partial backups
... [More]
, performing partial guest clones, cloning guests and changing registry/UUID/hostname info, and much else besides.
libguestfs uses Linux kernel and qemu code, and can access any type of guest filesystem that Linux and qemu can, including but not limited to: ext2/3/4, btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, qcow2, vmdk.
libguestfs has bindings for C, C++, OCaml, Perl, Python, Ruby or Java. [Less]