qcow2 file is a common disk file for virtual machines. We don't have to run the VM to gain access to the qcow file system.
It can be mounted directly with a little tweak to the host machine.
We first need to locate the libvirt image folder. It is usually located at /var/lib/libvirt/images
And enabled mod nbd
sudo modprobe nbd max_part=8
sudo qemu-nbd --connect=/dev/nbd0 /var/lib/libvirt/images/ayaka.qcow2
We create perform a disk check on the block device
sudo fdisk /dev/nbd0 -l # list block devices lsblk
And then mount the disk
sudo mkdir /mnt/ayaka mount /dev/nbd0p2 /mnt/ayaka
After you are done, we need to unmount and disconnect the disk
sudo umount /mnt/ayaka sudo qemu-nbd -d /dev/nbd0