VMware Cloud Community
Deano123
Enthusiast
Enthusiast

Unable to add scsi device to VM

Hi,

I have been gradually migrating machines from Hyper V to Vmware VSphere 5.1 and have come across a strange issue.  So far I have converted about 6 machines.  When the conversion is completed the new VMware VM's seem to be using IDE disc drives so i have been adding a scsi controller, restarting the machines to install the device then shut down, remove the hard drive and reattaching the vmdk using the newly created scsi bus.  So far this has worked seemlessly.  However, I have one machine that when I add the scsi: SAS or Parallel and restart the machine it falls over with the following error:

An error was received from the ESX host while powering on VM HydraSQL.
Failed to start the virtual machine.
Module DevicePowerOn power on failed.
Unable to open the SCSI device '/dev/cdrom/mpx.vmhba1:C0:T0:L0' (scsi0:1): Failed to lock the file
I read a post, http://sharethelearning.blogspot.co.uk/2008/02/vmware-virtual-machine-failed-to-lock.html which suggested that deleting the lck file shopuld cure the problem.  But when I shutdown the VM to remove this file the .lck gets deleted anyway.
If i remove the scsi device and restart the vm seems to be all ok..
Any pointers?
Dean
0 Kudos
8 Replies
a_nut_in
Expert
Expert

Try removing the CD ROM device and save configuration, then add the SCSI bus and see if that helps?

Do remember to mark my post as "helpful" or "correct" if I've helped resolve or answer your query!
0 Kudos
a_nut_in
Expert
Expert

From the VM I mean. Not from the host

Do remember to mark my post as "helpful" or "correct" if I've helped resolve or answer your query!
0 Kudos
Deano123
Enthusiast
Enthusiast

Thanks for the reply, however the secind post didn't come through for about 10 minutes so by the time I saw it I had already removed it using edit settings on the host rather than the VM. 

Sadly removing from the host side had no effect and I still can't start the vm up when this device is configured.  So back to square one Smiley Sad

Dean

0 Kudos
Deano123
Enthusiast
Enthusiast

Fixed it, I had forgot to remove the scsi0:1 device from one of my previous conversions so as the device was in use in one the the other VM's it wold not allow it to be added to any other VM's.

Removed it from said VM and Hot add worked just like it should do.

Dean

0 Kudos
a_nut_in
Expert
Expert

Hey Dean,

Edit settings of the host? Is the ESX host in a nested configuration by any chance?

Regards

a

Do remember to mark my post as "helpful" or "correct" if I've helped resolve or answer your query!
0 Kudos
Deano123
Enthusiast
Enthusiast

Sorry, what I meant was I removed the cd/dvd drive from the VSphere host machine rather than from within the VM itself.  It is a standalone VSphere host system with VCentre server for managment of VM's ready for when we add hosts

Dean

0 Kudos
a_nut_in
Expert
Expert

Cool. Sorry your last update came in while I was typing the previous post :smileysilly:

Do remember to mark my post as "helpful" or "correct" if I've helped resolve or answer your query!
0 Kudos
ciandro
Contributor
Contributor

After motioning a VM sometimes i find it helpful to do an MBR align from the host. It cleans up things a bit, especially if you are upgrading tools, VM version, and the network adapter.

Cheers!

0 Kudos