Sample Header Ad - 728x90

Can not drag-drop or copy-paste files between guest and host

0 votes
1 answer
2750 views
The documentation says: > Installing the Spice vdagent in your guest will let you copy and paste > between your guest and client OSes, to drag and drop files between the > 2 OSes, … In order for the agent to work, your virtual machine must > have a virtio serial device (and the corresponding guest drivers) as > well as a Spice spicevmc channel. It also says: > Agent support allows better integration with the guest. For example, > it allows copy and paste between the guest and the host OSes, dynamic > resolution changes when the client window is resized/full-screened, > file transfers through drag and drop, … > > The agent is a daemon/service running in the guest OS so it must be > installed if it was not installed by default during the guest OS > installation. It also relies on a virtio-serial PCI device and a > dedicated spicevmc char device to achieve communication between the > guest and the host. These devices must be added to the virtual machine > for the agent to work in the guest. I have installed all the necessities in the guest. And then enabled the services. sudo apt install qemu-guest-agent spice-vdagent spice-webdavd sudo systemctl start spice-vdagent sudo systemctl enable spice-vdagent sudo systemctl start qemu-guest-agent sudo systemctl enable qemu-guest-agent sudo systemctl start spice-webdavd sudo systemctl enable spice-webdavd Started the vm with the following script. #!/bin/bash QEMU_AUDIO_DRV=spice qemu-system-x86_64 -accel kvm,thread=multi -cpu host -smp 2 -m 8192 \ -drive file=/media/ismail/SSDWorking/_QEMU/vm_mint.qcow2,format=qcow2,if=virtio \ -machine vmport=off \ -vga virtio -usb -device qemu-xhci -device usb-tablet \ -soundhw hda \ -spice port=5911,addr=127.0.0.1,disable-ticketing \ -device virtio-serial-pci \ -chardev spicevmc,id=spicechannel0,debug=0,name=vdagent \ -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \ -device virtserialport,chardev=charchannel1,id=channel1,name=org.spice-space.webdav.0 \ -chardev spiceport,name=org.spice-space.webdav.0,id=charchannel1 \ -chardev socket,path=/tmp/qga.sock,server=on,wait=off,id=qga0 \ -device virtio-serial \ -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \ -daemonize remote-viewer --spice-shared-dir=/media/ismail/SSDWorking/_QEMU/VM_Share spice://127.0.0.1:5911 > /dev/null 2>&1 & Now dynamic resolution changes work. However, drag and drop and copy-paste files between guest and host does not work. Just to be clear, copy-paste text between guest and host works. Drag and drop text between guest and host does not work. In the case of files, neither copy-paste nor drag and drop work. What might be the reason?
Asked by Ahmad Ismail (2998 rep)
May 13, 2023, 11:05 AM
Last activity: May 14, 2023, 07:03 AM