Any way to release focus on a KVM guest in virt-manager without having to click Ctrl_L + Alt_L?

Is there a way to move my mouse in and out of a KVM guest in virt-manager without having to click to gain focus of the window and release focus by pressing Ctrl_L+ Alt_L?

BACKGROUND

I typically connect from a Fedora 14 system using virt-manager to manage guest KVMs running on a CentOS 5 system. To see if it mattered I tried using these other versions of virt-manager & libvirt to see if it was a version issue:

OS            virt-manager       libvirt       Steals focus?
--            ------------       -------       -------------
Fedora 14     0.8.7-2            0.8.3-10      Yes
CentOS 5      0.6.1-16           0.8.2-25      Yes
CentOS 6      0.9.0-14           0.9.10-21     Yes

Not sure if it matters but the guest VM is Win2008R2, but I've seen this same issue with other OSes as guests.

Here's a screenshot of the guest VM before and after I click into it showing that it's stealing the focus.

               ss of guest VM before click

               ss of guest VM after click

EDIT #1

I just tried the solution recommended by @tpow and that appears to be the issue. Manually adding a tablet input device resolves the problem and I can now move the mouse in and out of the KVM guest without having to gain focus first.

Here's a screenshot of the guest VM with focus.

               ss of guest vm with focus & tablet input


Solution 1:

You can use a virtual tablet instead of the virtual mouse, and then you won't have to press Ctrl_L & Alt_L. The virtual tablet also improves the mouse tracking by using absolute coordinates instead of relative motion deltas.

To use the virtual tablet, first shutdown your vm. Using virt-manager, select the virtual machine, then select View -> Details, click the Add Hardware button, select Input, and choose "EvTouch USB Graphics Tablet", then click Finish. Start up your vm and you should be all set.

Here's a screen shot of the steps from the Details View:

virtual tablet - howto

Solution 2:

Yes. Use SPICE and the vdagent to have the best experience. SPICE is far more efficient than VNC and the vdagent will provide nice pointer and clipboard integration.

I'm not familiar with the exact steps, but it comes down to this:

  • Install the QXL video driver and virtio serial driver in the guest.
  • Install the vdagent and start the Windows service.
  • Activate the SPICE channels and select the QXL virtual graphics card in virt-manager.

Result: same as VirtualBox and VMware - fair video performance (have seen 720p full screen running smooth), very good pointer/clipboard integration.