This post is a part of “up and running with libvirt guests series”
Tldr: see below instructions for centos 8
myLibvirtHost# virsh destroy myguest
myLibvirtHost# virsh edit --domain myguest
# ADD BELOW CODE SNIPPET ANYWHERE IN THE DEVICE SECTION
<devices>
<controller type='virtio-serial' index='0'/>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
</channel>
<graphics type='spice' autoport='yes'>
<listen type='address'/>
</graphics>
</devices>
:wq # save the configuration using vim shortcuts
myLibvirtHost# virsh start --domain myguest
ssh user@myguest
myguest# sudo dnf install spice-vdagent
myguest# sudo systemctl start spice-vdagentd
myguest# reboot
When your libvirt guest boots up again, try connecting over vnc and copy between your computers.
sources: