Contents

Enabling a USB Device from a Virtual Machine

You can use up to two USB devices in your virtual machine if both your host operating system and your guest operating system support USB. Note, for example, that Windows NT and Linux kernels older than 2.2.17 do not support USB.

Although your host operating system must support USB, you do not need to install drivers for your USB devices in the host operating system if you want to use those devices only in the virtual machine.

Only one operating system — host or guest — can have control of a USB device at any one time. Guest operating systems can use devices that are not already in use by the host — that is, claimed by a host operating system driver. If your device is in use by the host and you try to connect it to the guest using the Devices menu, a dialog box appears, informing you that there is a problem connecting to the device.

To disconnect the device from the host, you must unload the device driver. You can unload the driver manually as root (su) using the rmmod command. Or, if the driver was automatically loaded by hotplug, you can disable it in the hotplug configuration files in the /etc/hotplug directory. See your Linux distribution’s documentation for details on editing these configuration files.

A related issue sometimes affects devices that rely on automatic connection (as PDAs often do).

If you have successfully used autoconnection to connect the device to your virtual machine, then experience problems with the connection to the device, take the following steps:
  1. Disconnect and reconnect the device. You can either unplug it physically, then plug it back in or use the Devices menu to disconnect it and reconnect it.
  2. If you see a dialog box warning that the device is in use, disable it in the hotplug configuration files in the /etc/hotplug directory.

To take advantage of the USB support, you must create your virtual machine using the Configuration Wizard.

Connecting to USB Devices

Use the Devices menu to connect specific USB devices to your virtual machine. You can connect up to two USB devices at a time. If the physical USB devices are connected to the host computer through a hub, the virtual machine sees only the USB devices, not the hub.

There is a menu item for each of the USB ports. Move the mouse over one of these items to see a cascading menu of devices that are plugged into your host computer and available for use. To connect a device to the virtual machine, click its name.

If a device is already connected to that port, clicking the name of a new device releases the first device, then connects the new one.

To release a connected device, click None on the cascading menu for the port to which it is connected.

If you physically plug a new device into the host computer and the autoconnect feature does not connect it to a virtual machine, the device is initially connected to the host. Its name is also added to the Devices menu so you can connect it to the virtual machine manually.

Disconnecting USB Devices

Before unplugging a USB device or using the Devices menu to disconnect it from a virtual machine, be sure it is in a safe state.

You should follow the procedures the device manufacturer specifies for unplugging the device from a physical computer. This is true whether you are physically unplugging it, moving it from host to virtual machine, moving it between virtual machines or moving it from virtual machine to host.

This is particularly important with data storage devices (a Zip drive, for example). You may lose data if you move a data storage device too soon after saving a file and the operating system has not actually written the data to the disk.

Related topics:

Back to top

© 2001-2002 VMware, Inc. All rights reserved.