VMware Cloud Community
cwhicks
Contributor
Contributor

"Failed to Lock File" SCSI device keeps VM from starting

Was trying to move a SCSI tape drive from one VM to another. Somehow I think it got locked in limbo. If I add the device to either the new server or the server it was originally on, it fails to start with the below error:

An error was received from the ESX host while powering on VM Backup.
Failed to start the virtual machine.
Module DevicePowerOn power on failed.
Unable to open the SCSI device '/dev/genscsi/t10.IBM_____ULTRIUM2DHH3_____1H10019834' (scsi1:0): Failed to lock the file.
I have gone in through SSH and found the file and tried the touch command, but I get

touch: t10.IBM_____ULTRIUM2DHH3_____1H10019834: Function not implemented

Which wasn't one of the responses I was expecting.

I looked for .lck files as well and found nothing, but that may not be in esxi. Just trying ideas I found on the internets.

Is there some way I can delete this from the host and start over? When I unplug the tape drive and do a rescan, it doesn't remove it it just shows it as dead, grayed out/italic.

It doesn' let me move it to a different scsi port either on the host.

Any solution ideas appreciated.

0 Kudos
2 Replies
zXi_Gamer
Virtuoso
Virtuoso

Just a few quick steps to cover the basics errors:

1. When you moved the TD from a VM, did you make sure that the VM is powered off?

2. Try to see if the VM is still having any /dev/sg mapped inside it.

3. Power off the VM. Disable to device from the passthrough, Remove the device from the VM and try to power on the VM.

4. If you have removed the device from the VM, look for the entry in the vmx file and see if the device is still mapped after powering on also.

0 Kudos
cwhicks
Contributor
Contributor

Hey Gamer,

1. Thanks for the response. I think I didn't power off the VM before moving which is the problem.

2. I don't see a /dev/sig folder. In the /dev/genscsi I see the tape drive file. Perhaps I can just delete that and then re-add? Don't want to break anything however.

3. I can get the vm's to power on, no problem if I remove the tape drive in "Edit Settings". The problem is the tape drive is in limbo and I can't add it to anything and then get the vm to boot without the failed to lock error. Also I don't have anything set up in the Passthrough section of Configuration/Advanced Settings for that host. It worked fine without that. Perhaps this is not what you are talking about. I would love to just be able to delete this "locked" tape drive and then add again.

4. I checked both vmx files fo the two vm's I have tried to attach the tape drive to and it is not listed in either. Currently the tape drive is not attached to the host. I took it off to try a rescan to see if that would clear it, to no effect.

Thanks again for your help.

0 Kudos