Mouse+Keyboard for each VM? [duplicate]

I'm using VM Ware (specifically the player) and i'd like to attach a multiple mouses and have one for each VM (same idea with keyboard but i havent tried keyboards yet). I'd like several people using their own vm. I cant seem to figure out how to lock the mouse into the VM. If i plug in a mouse windows uses both of them and i need to click onto an instance of vmware to get the mouse working there.

I tried clicking the USB area at the bottom of the player window and i got the error message

Cannot connect "BRAND USB Optical Mouse" to this virtual machine. The host requires this device for input.

Is it possible to dedicate a mouse/keyboard to a VM instance? I'm willing to use another VM software (but preferably free)


Solution 1:

In VMware Workstation and VMware Player this is possible for USB (not PS/2 and not Bluetooth) input devices as follows:

  1. Make sure the VM is powered off (suspended wont work).
  2. In the virtual machine settings, select the USB controller and make sure the "Show all USB input devices" option is selected.
  3. Power on the VM, and right click the input device you want to assign to the VM in the devices at the bottom, and connect the device.

This device is now exclusively connected to the VM, it will not input to the host OS even when the VM is not focused, CTRL+ALT or whatever combination you have set for ungrab on that device will not work and neither will CTRL+ALT+DEL.

For Bluetooth devices, you can attach a USB Bluetooth controller to the VM directly (not use the Bluetooth device sharing feature of VMware Workstation 8 and Player 4) and then pair the input device with the connected Bluetooth controller in the VM.

I no longer own any PS/2 input devices so I don't know of a way to use them in this way, I doubt its more difficult than getting a USB<->PS/2 adapter and using it as if it were a USB HID device.

Solution 2:

Add these lines to your VMX file (source: http://nepalipunk.blogspot.ch/2012/06/connecting-second-mouse-or-keyboard.html):

usb.generic.allowHID = "TRUE"
usb.generic.allowLastHID = "TRUE"

You should not do it if do not have another non-USB mouse (e.g a notebook touchpad). Then you do not have to plug in another mouse.