LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   KVM: Mouse under Windows Guest performs way better than under Centos Guest (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/kvm-mouse-under-windows-guest-performs-way-better-than-under-centos-guest-798091/)

martdj 03-26-2010 12:21 PM

KVM: Mouse under Windows Guest performs way better than under Centos Guest
 
Hi all,
I'm running KVM on a Fedora 12 host. I currently have 2 VMs:
- One running Windows 2003
- One running CentOS 5.4 (32 bit)

When I have both consoles open if I hover over my Windows console it immediately grabs my mouse and I can just click in the window as if it's a normal application on my Linux desktop. That's the way I like it to be. Under my CentOS kvm however, when I hover the mouse over the console I first have to click in the console to enable the mouse in the VM. The mouse is rather bumpy there, making it quite difficult to position it where I want to (hard to click the menu for example). Also I have to press alt-tab to ungrab it.
My question: is there a way to make the mouse in my CentOS VM behave the same as in my Windows VM?

While I'm here anyway, is there a way to enable the VMs to be used with a VNC viewer from another computer than the host?

UnderV 03-28-2010 01:29 PM

I use CentOS 5 as host, but in fedora should be almost the same.

To assign vnc server to virtual machine:
1. Open Virtual Machine Manager
2. Add hardware called "Graphic" to guest
3. Choose VNC server.
4. Choose VNC port (usually random)
5. Allow/disable to listen on public network
6. Create password for VNC session
7. Run guest machine

Thats all.

I don't know about "bumpy" mouse You have, but if Your real cursor doesn't have precise position in guest machine then just add hardware called "input -> EvTouch USB graphic Tablet" and configure guest xorg.conf to use it. Here is more detailed description: http://kbase.redhat.com/faq/docs/DOC...0000000HjBZAA0

dyasny 03-29-2010 03:09 AM

This is because qemu connects the mouse as an emulation of a tablet device.

Try to use this in xorg.conf in the VM:
Quote:

Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Tablet" "SendCoreEvents"
InputDevice "Mouse" "CorePointer"
EndSection

Section "InputDevice"
Identifier "Mouse"
Driver "void"
#Option "Device" "/dev/input/mice"
#Option "Emulate3Buttons" "yes"
EndSection

Section "InputDevice"
Identifier "Tablet"
Driver "evdev"
Option "Device" "/dev/input/event2"
Option "CorePointer" "true"
EndSection

martdj 03-29-2010 04:20 AM

The RedHat knowledge base article explained it rather well. My mouse is working well now and basically just like in a windows guest so my goal is reached. Also the VNC tip worked, so thanks a lot!


All times are GMT -5. The time now is 11:13 AM.