Connecting a second mouse or keyboard directly to a hosted virtual machine

When trying to connect Mice and keyboards to  virtual machine we some times get following error message.

Cannot connect “XXXXXX usb device” to this virtual machine. The host requires this device for input.

Mice and keyboards belong to a special class of USB devices known as Human Interface Devices (HID). By default, you cannot connect these devices to the virtual machine due to the risk of removing all human interface from the host computer. However, you can instruct the VMware product to allow these devices by modifying the virtual machine settings.

Caution: Before performing these steps, ensure that you have access to a second keyboard and/or mouse. Do not perform these steps if you only have one mouse and/or keyboard, as you will not be able to use the device(s) with your host computer while the virtual machine is running.
To connect an external keyboard and/or mouse directly to your virtual machine:

  1. Shut down the virtual machine that needs the mouse/keyboard.
  2. Plug the second mouse/keyboard into your host.
  3. Edit your virtual machine’s .vmx file to include these lines:

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

  4. Power on your virtual machine.
  5. Go to VM > Removable Devices.
  6. Find and select your keyboard/mouse.
  7. Click Connect (Disconnect from host)


Productivity Tips and Tricks VMware