You can run the sudo poweroff command in the OS to stop the VM. If it does not work, on virt-manager, click Virtual Machine Manager, select the running VM shown in the red box in the following figure, right-click it, and click shutdown (if the VM cannot be stopped, you are advised to click Force Off).
If you select automatic creation of the image disk, the QCOW2 or IMG image file is in the /var/lib/libvirt/images directory.
If you select manual creation of the image disk, obtain the image file from the directory where it was created.
If the created image file is too large, run the following command to compress it:
qemu-img convert -f raw -O qcow2 SourceFile FinallyFile.qcow2
SourceFile format can be .img or qcow2.