VMware Cloud Community
fhrivers
Enthusiast
Enthusiast
Jump to solution

Unable to Start VM After Migration--ESXi Hosts

Last night I wanted to move a VM from a test host to a production cluster. All hosts (test and production) have shared access to the same LUNS so I'm usually able to simply remove the VMS from inventory in the test environment and add them to the production environment by accessing the .vmx file on the datastore. Two out of 3 hosts migrated flawlessly and are up and running in the production environment. However, the third server, while migrated, won't start up.

First it gave me errors that it was missing some files. The only thing I did different was to rename the folder for the VM on the datastore. It was called "New Virtual Machine" for some reason so I renamed it to "Antivirus". However, something weird happened. Instead of renaming the folder, it seems a new folder called "Antivirus" was created and the old "New Virtual Machine" folder was still there. Additionally, the renamed folder "Antivirus" had only SOME of the files necessary. So I copied everything from the old folder into the "Antivirus" folder and it hung up on the 20 GB virtual disk file. So I closed the VI client and checked back this morning and the 20 GB vdmk file is in the folder along with the other files. However, when I try to start the virtual machine, I get the "unable to access a file since it's locked" error message.

I did some sleuthing and I noticed that in my second datastore where the other vdmk file was, the file was now .40kB in size. It looks like I lost my other vdmk file. What's going on here?

Reply
0 Kudos
1 Solution

Accepted Solutions
kjb007
Immortal
Immortal
Jump to solution

Looks like the vm was still running when you tried to change the name, so the old folder could not be renamed due to the lock. This is why a new folder was created instead, and why your vm hung on the vmdk file until the lock was released. Not sure what happened to the 2nd vmdk file, but the vmware.log file in the vm directory should have some more info as to why the vm won't start. If the 2nd vmdk is no longer there, that could be one reason.

-KjB

VMware vExpert

Message was edited by: kjb007 : changed vm to vmdk

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB

View solution in original post

Reply
0 Kudos
4 Replies
kjb007
Immortal
Immortal
Jump to solution

Looks like the vm was still running when you tried to change the name, so the old folder could not be renamed due to the lock. This is why a new folder was created instead, and why your vm hung on the vmdk file until the lock was released. Not sure what happened to the 2nd vmdk file, but the vmware.log file in the vm directory should have some more info as to why the vm won't start. If the 2nd vmdk is no longer there, that could be one reason.

-KjB

VMware vExpert

Message was edited by: kjb007 : changed vm to vmdk

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
Reply
0 Kudos
fhrivers
Enthusiast
Enthusiast
Jump to solution

That makes a lot of sense. Is there anyway to find a missing vdmk file?

Reply
0 Kudos
fhrivers
Enthusiast
Enthusiast
Jump to solution

I removed the second datastore and the VM booted up. So it seems as if that's the folder it was looking for was the old datastore that I blew up. I recreated another disk and I'll just reinstall the app that was using it.

Thanks.

Thankfully I made a configuration backup of the software I installed.

Reply
0 Kudos
weinstein5
Immortal
Immortal
Jump to solution

That might be the reason but I think what really is going on is the change of the directory where your VM is stored - in the VMX file the paths to important files like the VMX, virtual disk, logs are specified so when you start the VM the vmkernel is still looking for the directory New Virtual Machine - you will also notice that the VMX and VMDK files will have the file name New Virtual Machine. New Viirtual Machine BTW is the default name given to a VM when you create or clone one -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Reply
0 Kudos