You get a bonus - 1 coin for daily activity. Now you have 1 coin

Xen: Virtual Windows Cursor Is Positioned Incorrectly - VNC Cursor Doesn't Match Mouse Position

Practice



A commonly encountered issue - when you launch an HVM Windows virtual machine and connect to it via a remote console, for example VNC Viewer, the movements of your real cursor don't match the movement of the cursor on the virtual machine's screen.

This happens because Windows receives data over the PS/2 port not about the position of the mouse cursor, but about its movement - i.e. how far the mouse has moved along the X and Y axes. And VNC Viewer or another VNC console cannot emulate exactly "how far the cursor has moved".

We will now fix this annoyance. Here's how we'll do it - instead of emulating a PS/2 mouse, we will give the virtual Windows an emulation of a touch screen (or rather, a pen), which can clearly tell the operating system where the cursor is currently located by passing absolute coordinates rather than an offset.

To do this, in the Xen configuration file you should add the lines:

usb = 1
usbdevice = 'tablet'

This combination will attach a tablet device emulation to Windows, and the mouse position inside the virtual guest will exactly match the mouse position on your screen.

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Operating Systems and System Programming"

Terms: Operating Systems and System Programming