VMware ESXi and vSphere Cluster Management
How to Connect a USB Device to a Virtual Machine in VMware Player
Learn how to attach, use, disconnect, and safely return USB devices between a host computer and a running VMware Player virtual machine.
USB passthrough lets a running virtual machine use a physical USB device connected to the host computer. This is useful for flash drives, USB serial adapters, printers, smart-card readers, cameras, and other peripherals.
In this guide, VMware Player means the desktop virtualization application used to run virtual machines. A virtual machine (VM) is a software-defined computer running a guest operating system inside the physical computer. The physical computer and its directly installed operating system are the host; the operating system running inside the VM is the guest.
USB passthrough transfers control of a physical USB device from the host to the guest. In normal use, an ordinary USB device is actively controlled by either the host or one VM at a time. While the guest owns the device, host applications generally cannot use it. Disconnecting the device from the VM returns control to the host.
Before you connect a USB device
Check these requirements before attempting passthrough:
- The target VM must be powered on. A powered-off VM cannot receive a USB device through its running interface.
- The physical USB device must be plugged into the host computer.
- The host operating system must detect the device. Test it on the host if necessary.
- VMware Player must recognize the device in its removable-device list.
- The guest may need a compatible driver before the device can be used.
- Your host account and security settings must allow access to the USB device.
- The VM must have a virtual USB controller enabled.
A USB controller is virtual hardware that provides USB support inside the VM. If no controller is enabled, devices may not appear in VMware Player's removable-device menu.
How USB ownership works
Device ownership means which environment currently controls a USB device. When the host owns a device, host programs can use it and the guest normally cannot. When the VM owns it, the guest can detect and use it while the host temporarily releases it.
| Device state | Where the device is available | Typical indication | Recommended action |
|---|---|---|---|
| Connected to host | Host operating system | The host opens, mounts, or reports the device | Close host applications, then connect it through VMware Player |
| Connected to virtual machine | Guest operating system | The device appears in the guest or the VMware icon shows guest association | Use it in the guest; safely eject storage before disconnecting |
| Visible but cannot be connected | Usually the host or another application | The device is listed, but VMware reports that it is busy or unavailable | Close applications using it and try again |
| Not detected by VMware Player | Neither usable through VMware nor available in its device list | No matching removable device appears | Check the physical connection, host detection, USB controller, and compatibility settings |
| Safely removed or disconnected | Available for the host to claim again | The guest has ejected it and VMware has released it | Confirm that the host detects the device |
Automatic USB connection behavior
When a USB device is inserted while a VM is running, VMware Player may offer to connect it to the host or guest, or may automatically assign it according to the current USB preferences. Automatic behavior can vary by device type, guest support, VMware USB settings, and whether the VM window has focus.
VM focus means that the VM window is active and receiving user input. If automatic connection is expected, click inside the running VM window before inserting or reconnecting the USB device. This does not guarantee automatic passthrough, but it helps VMware determine which environment should receive the device.
If the device remains attached to the host, use the manual connection procedure below. Manual connection is the reliable fallback when automatic behavior does not occur.
Manually connect a USB device to the guest
- Physically connect the USB device to the host computer.
- Start the target VM and wait until its guest operating system is running.
- Make the VM window active if it is not already focused.
- Open the Player menu in VMware Player.
- Open the Removable Devices submenu.
- Find the correct USB device in the list. Check its name carefully if several similar devices are connected.
- Choose the command that connects the device to the virtual machine and disconnects it from the host. The wording can vary by VMware Player version, but it commonly includes Connect or Connect to guest.
- Wait for VMware Player and the guest to process the handoff.
- Confirm the device inside the guest operating system. You may need to open its device-management tool, mount a storage volume, or install a driver.
Connecting a device to the guest does not automatically make every device usable. For example, a USB serial adapter may appear only after its guest driver is installed, and a flash drive may need to be mounted by the guest.
Example: USB flash drive in a Linux guest
- Insert the flash drive into the host while the Linux VM is running.
- If the host retains it, open Player > Removable Devices and select the flash drive.
- Choose the connect action that assigns it to the VM.
- Confirm that Linux detects the drive, then mount it using the guest's normal storage workflow.
- When finished, close files and unmount or eject the drive in Linux before returning it to the host.
Example: USB serial adapter in a Windows guest
- Connect the USB-to-serial adapter to the host.
- Assign it to the running Windows VM through the removable-device menu.
- Install or verify the adapter's driver in Windows.
- Use Device Manager or the adapter's software to identify the assigned COM port.
- Configure terminal or device-management software to use that COM port.
Disconnect the device and return it to the host
- Finish work in the guest and close files or applications that use the device.
- For storage, use the guest operating system's eject, safely remove, or unmount command.
- In VMware Player, open the Player menu and then Removable Devices.
- Select the connected device.
- Choose the action that disconnects it from the VM and reconnects it to the host.
- Wait for the guest to release the device and for the host to detect it again.
Safe removal flushes pending data and releases a storage device before disconnection. Skipping this step can cause file-system corruption or data loss, especially when a flash drive or external disk is being written to or still has open files.
Example: returning an external USB drive after copying files
- Finish the file transfer in the guest.
- Close programs that opened files on the drive.
- Eject or unmount the drive from the guest.
- Use VMware Player's removable-device menu to disconnect the drive from the VM and reconnect it to the host.
- Verify that the host can access the drive again.
Use the VMware status bar or device icon
VMware Player may show a USB or removable-device icon in the VM interface or status area. The icon represents USB devices associated with the VM or available for connection.
Right-clicking the relevant device icon can provide a quick connect or disconnect action. The icon's state can also help indicate ownership: a connected or active state generally means the guest has the device, while an available or disconnected state means the device can be assigned or has been returned to the host. Exact icons and labels vary by VMware Player version and window layout.
USB device compatibility
Many general-purpose USB peripherals work well with passthrough, but successful use depends on the guest driver, the device's operating mode, and whether the device expects exclusive access from host software.
| Device type | Typical use in guest | Guest driver considerations | Important cautions |
|---|---|---|---|
| USB flash drive | Moving files or running portable tools | The guest may need to detect and mount its file system | Unmount before disconnecting; avoid simultaneous host and guest access |
| External USB disk | Backups, test data, or additional storage | The guest must support the disk's partition and file systems | Safely stop writes before changing ownership |
| USB serial adapter | Serial-console access and embedded-device testing | Install the correct guest driver and identify the virtual COM port | Host serial software must release the adapter |
| Printer | Printing from guest applications | The guest may require a vendor driver or printer setup | Some printers are better shared through the host or network |
| Smart-card reader | Authentication, signing, or card testing | Reader and smart-card middleware may both be required | Security software may restrict exclusive access |
| Camera | Testing capture or imaging software | The guest needs camera drivers or compatible capture software | Host camera applications may claim it first |
| Keyboard or mouse | Direct input testing in the guest | Usually supported as standard HID input | Passing through the only host input device can cause loss of control |
Specialized equipment, hardware requiring exclusive host software, license dongles, and security-sensitive devices may have limitations. A device can appear in the VMware list yet fail to provide all of its functions inside the guest.
USB HID considerations
A USB HID, or Human Interface Device, is a USB input peripheral such as a keyboard, mouse, or similar controller. These devices are normally needed to operate both the host and the VM interface.
Be careful when passing through the only keyboard or mouse. If the guest receives that device, the host may no longer receive input from it, making it difficult to open VMware menus or reverse the assignment. Use an additional keyboard or mouse when possible, and follow the dedicated USB HID connection workflow when direct input passthrough is required.
Virtual machine configuration checks
If a device is not listed or cannot connect, review the VM configuration:
- Verify that a virtual USB controller is enabled.
- Review the VM's USB compatibility version. Some devices require a particular USB compatibility level.
- Review automatic USB connection preferences if insertion does not assign the device as expected.
- Power off the VM before changing hardware settings if VMware Player requires the VM to be stopped for that change.
Troubleshooting USB passthrough
The USB device connects to the host instead of the VM
- Confirm that the VM is powered on and its window is focused.
- Automatic connection may be disabled or unsuitable for that device.
- The host may have claimed the device first.
- Close host applications using the device, then manually select it from the removable-device menu.
- To test automatic behavior, focus the VM and reconnect the physical device.
The device is missing from the removable-device list
- Check whether the host detects the physical device.
- Try another USB port, cable, or power source if appropriate.
- Reconnect the device and wait for the host to finish detecting it.
- Check that the VM's USB controller is enabled.
- Review USB compatibility and device restrictions.
- Restart the VM or VMware Player if the device remains absent.
The device appears connected but is not usable in the guest
- Check the guest's device manager, system information, or hardware logs.
- Install the correct guest-side driver or vendor software.
- Mount the device if it is storage hardware.
- Check whether another guest application has claimed the device.
- Close conflicting applications, then disconnect and reconnect the device.
A storage device cannot be disconnected cleanly
- Close applications that use files on the device.
- Wait for copying, indexing, or other writes to finish.
- Eject or unmount the volume in the guest.
- After activity stops, use VMware Player to disconnect the device from the VM.
Keyboard or mouse control is lost
The likely cause is that the only available host keyboard or mouse was passed through to the guest. Avoid assigning the only host input device. Use another input device or reverse the assignment through the available VMware interface controls.
Quick procedure checklist
- Connect the USB device to the host.
- Start the target VM.
- Focus the VM if automatic connection is expected.
- Open Player > Removable Devices.
- Select the correct device and connect it to the guest.
- Install a guest driver or mount the device when required.
- Finish work and close files.
- Safely eject or unmount storage in the guest.
- Use the same menu or the device icon to disconnect it from the VM and reconnect it to the host.
- Verify that the host detects the released device.