guestmount
For some types of changes, you may find it easier to mount the image's file system directlyin the guest. The guestmount program, also from the libguestfs project, allows you to doso.For example, to mount the root partition from our centos63_desktop.qcow2 image to/mnt, we can do:# guestmount -a centos63_desktop.qcow2 -m /dev/vg_centosbase/lv_root --rw /mntIf we didn't know in advance what the mount point is in the guest, we could use the -i(inspect) flag to tell guestmount to automatically determine what mount point to use:# guestmount -a centos63_desktop.qcow2 -i --rw /mntOnce mounted, we could do things like list the installed packages using rpm:# rpm -qa --dbpath /mnt/var/lib/rpmOnce done, we unmount:# umount /mnt