9

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)

2

2 Answers 2

13

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.

4
  • Well, this was a USB mouse and the error in my post is what i got when following these instructions
    – user3109
    Feb 27, 2012 at 1:50
  • 2
    I just tried it with various mice and keyboards. Works fine here, though I am using VMware Workstation rather than Player. Perhaps there is some interaction with the driver for your particular mouse that causes windows to deny attempts to disconnect it from the host. Try plugging the mouse in after the VM has focus (with the automatic focus option set in the configuration for the USB controller). Feb 27, 2012 at 3:26
  • 1
    You're right! It actually wasn't the driver. I needed to connect another USB mouse and when BOTH are connected i can disconnect one for the VM. I get the touchpad on my testing laptop (or allowing me with no mouse) isn't good enough. Accepted!
    – user3109
    Feb 27, 2012 at 8:15
  • Ok you're right. Found this for getting it to work in Fusion: kb.vmware.com/selfservice/microsites/… Thumbs up!
    – Mose
    Feb 27, 2012 at 9:06
7

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.

1
  • Good job. This will likely fix my issue with writing software in a VM for raw mouse input. I have a laptop with a pad and it wont let me connect the USB mouse because of that error. It says "host requires this device for input".
    – Beeeaaar
    Sep 7, 2018 at 3:46