virt-copy-out is a simple shell script wrapper around guestfish copy-out to copy files and directories out of a virtual machine disk image. guestfish(3) supports (including but not limited to) ext2/3/4, XFS and BTRFS filesystems on raw or qcow2 VM disk images.