Monday, September 8, 2014

Powering on the virtual machine fails with the error: Unable to open SCSI device '/vmfs/devices/genscsi/' (scsiX:Y) (1039080)

Resolving the issue when you experience the Could not find the file error

The Could not find the file error indicates that you have configured the virtual machine to use a host SCSI device in the passthrough (generic) mode and then have either moved the virtual machine or changed the hardware configuration of the host or manually edited the virtual machine configuration file, so that the SCSI device no longer exists.

To workaround this issue when the virtual machine is powered off, using the vSphere client, delete the SCSI device entry from the virtual machine configuration.
 
To delete the SCSI device entry from the virtual machine configuration:
  1. In the vSphere Client, click Edit virtual machine settings.
  2. Select the SCSI device to be deleted and click Remove.
  3. Click OK.
  4. Add the SCSI device back to the virtual machine, if required.

    To add the SCSI device back to the virtual machine:

    1. Click Edit virtual machine settings > Add > SCSI device.
    2. Select the SCSI device to be added and click OK.
  5. Power on the virtual machine.
  6. Verify that all virtual disks have associated SCSI device numbers associated
To workaround this issue when the virtual machine is in a suspended state, manually edit the .vmx file of the virtual machine and remove the entry corresponding to the SCSI device or modify the entry to point to the correct SCSI device.
 
To manually edit the .vmx file:
 
Note: For more information on editing the .vmx file, see Tips for editing a .vmx file (1714 ).
  1. Locate the virtual machine configuration file (.vmx).
  2. Open the .vmx file using a text editor.
  3. Find the entries for the SCSI device. For example:

    scsi0:9.present = "TRUE"
    scsi0:9.deviceType = "scsi-passthru"
    scsi0:9.fileName = "/vmfs/devices/genscsi/mpx.vmhba32:C0:T0:L0"
  4. To remove the SCSI device, delete these entries from the .vmx file.

    Caution: If you remove the SCSI device when the virtual machine is in a suspended state, the virtual machine may experience a kernel panic (BSOD). Use this option only when there is no other way to reconnect the SCSI device.
  5. To point to the correct SCSI device, modify the fileName entry to point to the correct filename.
  6. Power on the virtual machine.

Resolving the issue when you experience the Failed to lock the file error

The Failed to lock the file error indicates that some other virtual machine is already using this SCSI device. Sharing of such SCSI devices among virtual machines is not supported.

To workaround this issue when your virtual machine does not need access to this SCSI device:
  1. Using the vSphere client, edit the virtual machine's settings and remove the SCSI device entry.
  2. Power on the virtual machine.
To workaround this issue when your virtual machine needs access to this SCSI device, ensure that the other virtual machine that is pointing to the SCSI device is powered off when using your virtual machine.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1039080

No comments: