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

kvm-virtualizationlibvirtvirt-managervirtualization

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

Best Answer

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