Contents

Enabling a generic SCSI device

Using the SCSI Generic driver in Linux, VMware Workstation allows your guest operating system to operate generic SCSI devices within a virtual machine. The SCSI Generic driver sets up a mapping for each SCSI device in /dev. Each entry starts with sg (for the SCSI Generic driver) followed by a letter. For example, /dev/sga is the first generic SCSI device.

Each entry corresponds to a SCSI device, in the order specified in /proc/scsi/ scsi, from the lowest device ID on the lowest adapter to the highest device ID on the lowest adapter, and so on to the highest device ID on the highest adapter. When setting up a generic SCSI device in the Configuration Editor, in the 'Name' field you must enter the /dev/sg entry for the device you wish to install in the virtual machine. Do not enter dev/st0 or /dev/scd0.

Requirements

Generic SCSI requires version 2.1.36 of the SCSI Generic (sg.o) driver, which comes with kernel 2.2.14 and higher.

Concurrent Access to a Generic SCSI Device

Under Linux some devices -- specifically tape drives, disk drives and CD-ROM drives -- already have a designated /dev entry (traditionally, st, sd and scd, respectively). When the SCSI Generic driver is installed, Linux also identifies these devices with an sg entry in /dev -- in addition to their traditional entries. VMware Workstation ensures that multiple programs are not using the same /dev/sg entry at the same time but cannot always ensure that multiple programs are not using the /dev/sg and the traditional /dev entry at the same time. It is important that you do not attempt to use the same device in both host and guest. This can cause unexpected behavior and potentially a loss of data.

Permissions on a Generic SCSI Device

You must have read and write permissions on a given generic SCSI device in order to use the device within a virtual machine, even if the device is a read-only device such as a CD-ROM drive. These devices typically default to root-only permissions. Your administrator should create a group with access to read and write to these devices and then add the appropriate users to that group.

Setting Up a Generic SCSI Device

You can add generic SCSI devices to your virtual machine in the Configuration Editor. The Configuration Editor lets you map virtual SCSI devices to physical generic SCSI devices on the host.

When you set up a generic SCSI device, the virtual machine must be powered off.

  1. Launch VMware Workstation and select the virtual machine. Make sure the virtual machine is powered off.
  2. Select Settings > Configuration Editor. The Configuration Editor opens.
  3. Click the + sign next to SCSI devices. The list of this virtual machine's SCSI devices appears.
  4. Select an unassigned SCSI device where the generic SCSI device is to be installed. At this time, this device is labeled Not Installed. Now you can specify the characteristics of the virtual SCSI device.
  5. In the "Device Type" list, select Generic Device.
  6. In the Name field, enter the name of the /dev/sg entry for the device you want to install in the virtual machine. For example, if this device is named sga, then in the "Name" field, type /dev/sga.
  7. The device is connected to the virtual machine automatically. If you do not want this device to start connected to the virtual machine, clear the Start Connected check box.
  8. Click Install.
  9. Click Save. The Configuration Editor closes.

To remove this device, launch the Configuration Editor, select the generic SCSI device, then click Remove.

Related topics:

Back to top

© 2001 VMware, Inc. All rights reserved.