VMware Cloud Community
td3201
Contributor
Contributor

VM won't power on - missing -flat.vmdk in vcenter, but not disk

I have 1 VM that will not power on.  It gives this error:
This virtual machine cannot be powered on because its working directory is not valid. Please use the configuration editor to set a  valid working directory, and then try again. 

Looking at the actual folder when browsing the datastore in vcenter, it shows the *-flat.vmdk file missing but it shows up on the ESXi command line when doing an ls of that directory.

I tried this KB with no luck:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100251...

It seems like I have all of the pieces here, just can't get it to power on.  Full disclosure, we had a power event.  This is the only VM that's giving me issues and it's on a store with other VMs so not sure why just this one.  I appreciate the help.
Reply
0 Kudos
6 Replies
PduPreez
VMware Employee
VMware Employee

The fact that you cannot see the -flat.vmdk is troublesome, not sure if there might be a lock on this file.

What I would try:# (assuming there is no snapshots on this VM)

  -  Try and copy the VM's vDisks (vmdk's) to another location (new folder or datastore) using utility like Fast SCP.

  -  Try to remove the vDisks from the VM and add them again pointing to the new location

  -  Or create a new VM and attach the vDisks to the new VM

  -  If this works I would do a cleanup (VM Folder structure) by using SvMotion or Clone to a single location

Please don't forget to award points if you find this helpful/correct Smiley Happy

Reply
0 Kudos
td3201
Contributor
Contributor

Hello,

Thanks for the response.

I have tried moving them to a new folder.  When doing this, I added the VM back in using add to inventory from the new location.  No go.  I also tried a clone but the host keeps disconnecting when attempting this particular VM.  I am not sure I tried a new VM, let me try that.

Reply
0 Kudos
td3201
Contributor
Contributor

Created a new VM and tried to add the existing disk to it and get:
"Object reference not set to an instance of an object."

All of these disks have spaces in them.  While I realize that's not best practice, I don't want to go renaming things just because.  It was working like this for quite a while.

Reply
0 Kudos
PduPreez
VMware Employee
VMware Employee

Am I correct in saying this VM does not have any associated snapshots?

Have you tried to create a new VM, copythese parent vmdk's to the new VM's folder. (example vmname.vmdk, vmname1.vmdk) Attach them through settings and power up new VM? (try this from client directly connected to host)

Don't worry about the *-flat.vmdk

You will not see -flat.vmdk from vcenter or DataStore Browser.

See - http://communities.vmware.com/thread/209611

If the VMware can't read the parent vmdk file, it could have been corrupted with the power outage.

Regards

Please award points for helpful/correct responses Smiley Happy

Reply
0 Kudos
Walfordr
Expert
Expert

1. VMware's datastore browser will only show the vmdk pointer file.  It will not show the *-flat.vmdk file.  The pointer vmdk and the *-flat.vmdk are masked/grouped together.  From the CLI you will see all files with the ls command.

2. Edit the VM, go to Options > General Options and confirm that the working location is the one that has the actual files.

2a. If its not the correct (or even if its correct directory) try removing the VM from inventory.  Browse to the folder and right-click on the vmx file and add to inventory.

Robert -- BSIT, VCP3/VCP4, A+, MCP (Wow I haven't updated my profile since 4.1 days) -- Please consider awarding points for "helpful" and/or "correct" answers.
Reply
0 Kudos
a_p_
Leadership
Leadership

Please explain as detailed as possible what you did so far and attach the vmware*.log files from the VM's folder(s). In addition to the log files post a screen shot (datastore browser window) which shows all the files in the VM's folder with full names, extensions, sizes and timestamps.

André

Reply
0 Kudos