Wondering why VirtualBox and VMWare's Player both "capture" the mouse inside the Virtual Machine? Virtual PC 2007 works quite well if doesn't

3

1

I wonder why VirtualBox and VMWare's Player both "capture" and bound the mouse pointer to the Virtual Machine and not let it come out, and needing to press RIGHT CTRL key or CTRL-ALT to come out.

Microsoft's Virtual PC 2007 actually just treat the VM as an app and let the mouse move freely in and out... and for the few months I have used it, I don't see any problem. So I wonder why VirtualBox and VMWare's Player do it that way and can it be configured that they don't?

nonopolarity

Posted 2009-11-04T12:05:42.780

Reputation: 7 932

Answers

10

Mouse is captured only until you install virtual machine additions. They include driver for virtual mouse and then mouse can be freely moved between host and guest.

Some versions of Windows (Vista, Windows 7, preconfigured Windows XP) already come with drivers for some virtual machine hosts and that is reason why you don't see this issue there. However, if you try to install clean version of e.g. Windows XP, you would have same mouse capturing (until you install VM additions).

Josip Medved

Posted 2009-11-04T12:05:42.780

Reputation: 8 582

3

The function you're looking for is a plugin called "Guest Additions" that's already included in the latest versions of Virtualbox. See the following guide on how to activate it

http://www.dedoimedo.com/computers/virtualbox-guest-addons.html

VMWare has something similar, but I'm not familiar with it.

Malabarba

Posted 2009-11-04T12:05:42.780

Reputation: 7 588

0

As Josip points out, this is only the case until installation is completed and VMware Tools or its equivalent is installed on the virtualized guest, which then results in it behaving the same way as Microsoft's Virtual PC (and other) offerings.

VMware's virtualization offerings significantly predate Microsoft's own, and a) were made available at a time when the technology Microsoft uses to provide this enhanced mouse functionality did not exist, and b) must interop with machines at a lower level to support a greater range of guest operating systems. VirtualBox was released at just around the same time as Hyper-V was being rolled out in the Windows Server 2008 previews, but similarly was not developed with access to these features and with cross-platform portability in mind.

When the virtualization software "captures" the pointer, what it does is emulate a PS/2 (or USB) mouse in the guest, and traps the pointer so that it does not leave the edges of the window (this is not straightforward since the resolution and the DPI of the guest may not match the resolution and dpi of the window it is contained within on the host). The location of the mouse on the host is essentially ignored, and its raw movements are captured and sent directly to the guest. (If there's a significant mismatch in the DPI between host and guest, you'll notice things like the mouse moving either extremely slowly or extremely quickly unless the virtualization layer accounts for these things.)

What Microsoft's VPC does out of the box (by benefit of primarily shipping pre-installed Windows images of known provenance and configuration) is tell the guest OS that the input device is a non-continuous input device, much like a stylus on a tablet. A guest with support for such an input device accepts that input may suddenly appear anywhere on the screen and then just as quickly disappear (when you focus on a different program on the host), without freaking out. This concept of a stylus input device controlling the system cursor was not previously present on Windows (with the exception of some very hacky approaches in Windows CE), and couldn't have been used before Microsoft added in the in-box driver to provide this functionality -- or the user installed a 3rd party input driver provided by the virtualization company in question.

Mahmoud Al-Qudsi

Posted 2009-11-04T12:05:42.780

Reputation: 3 274