2

The shared clipboard doesn't work for me. How to fix it?

Host (Debian buster) with:

  • standard system utilities
  • ufw (ufw enabled, deny incoming, allow out going, deny routed)
  • apparmor-profiles, apparmor-profiles-extra
  • stterm
  • xserver-xorg-core, xserver-xorg-input-libinput, xinit
  • xserver-xorg-video-intel
  • jwm
  • virt-manager
  • /var, /tmp, /var/lib/dpkg, /home are mounted with nodev, noexec, nosuid
  • xclip, x11-apps

I add my vm user (non-root) to the libvirt group.

Guest (Debian buster) with:

  • standard system utilities
  • ufw (ufw enabled, deny incoming, allow out going, deny routed)
  • apparmor-profiles, apparmor-profiles-extra
  • xserver-xorg-core, xserver-xorg-input-libinput, xinit
  • xserver-xorg-video-qxl
  • jwm
  • spice-vdagent
  • xclip, x11-apps

With virt-manager of the host, I set the video to 'qxl' and the display spice to 'spice server'. That is the instruction in section "Enabling SPICE using virt-manager" at https://www.linux-kvm.org/page/SPICE

The "Display Spice" hardware in the "Show virtual hardware details" have the following settings:

Spice Server
------------
type: Spice server
Listen type: Address
Address: Localhost only
Port: [x] Auto (Port:5900)
TLS port: [x] Auto

Since restarting the vm would magically make the "network" hardware disappear, I created another "network" hardware with the gui.


Somehow, within the guest the spice-vdagent doesn't automatically start. I set it to start automatically, following QEMU/KVM SPICE - copy & paste functionalities work on the Windows VM, but not on the Debian VM

But shared clipboard still doesn't work.


In the gui, the "Channel spice" hardware says "State: disconnected". How to connect the channel?

1 Answer 1

1
  • service spice-vdagent start with the root user in the guest.
  • After starting X (with startx command), run spice-vdagent in a x-terminal-emulator with a non-root user in the guest.

Within virt-manager gui, the "Channel spice" and "Channel qemu-ga" still say "State:disconnected". But shared clipboard works.

Using ufw is fine.

1
  • Where do you see "Channel spice" and "Channel qemu-ga" in virt-manager?
    – Slbox
    Feb 26 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.