VMware; Error:This virtual machine cannot be powered on because its working directory is not valid. Use the configuration editor to set a valid working directory, and then try again.

On VMware, if you get the error noteated below then remove any spaces or special characters for the guest machine. I had to remove the system from inventory (not the disk/data), browse to the databastore and rename the folder that held all of the guest configurations.

Error:
This virtual machine cannot be powered on because its working directory is not valid. Use the configuration editor to set a valid working directory, and then try again.

Fix:
1.) Right-click VM and select “Remove from inventory”
2.) Browse the datastore that has your VM
3.) Remove any spaces or special characters from the VM files and folder of your VM
4.) Right-click the *.vmx file and select “Add to Inventory”; go through the wizard and don’t allow any spaces or special characters
5.) Boot the VM

The above steps worked for me; if you come across this and can’t repeat the steps above then you may want to try these steps:

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

This issue may occur if the name of the virtual machine directory has a space at the beginning or the end of the directory name. You may also experience problems powering on a virtual machine if there are spaces in the virtual machine disk’s name.

To resolve this issue, rename the directory so that there are no spaces in it.

To rename the directory:
1.Connect to the ESX host using the Virtual Infrastructure Client.

2.Log in as a user with administrative privileges on the ESX host.

3.Right-click on the virtual machine and click on Remove from Inventory.

4.Use the datastore browser from the VI Client to rename the directory. If you are able rename the directory, go to Step 9. Otherwise, go to Step 5.

5.Connect to the Service Console of the ESX host using an SSH client.

6.Log in as a user with administrative privileges on the ESX host.

7.Browse to the virtual machine directory under the VMFS volume.

8.Run a command similar to the following to rename the directory:
mv “/vmfs/volumes/storage1/ ” “/vmfs/volumes/storage1/”
This removes the space from the directory name.
Note: You can also clone the virtual machine and rename it during the clone process.

9.Change the current working directory location of the virtual machine in the virtual machine configuration (.vmx) file. For more information, see Creating snapshots in a different location than default virtual machine directory (1002929).

10.Using the VI Client, navigate to the newly renamed directory in the Datastore browser to find the virtual machine.

11.Right-click on the .vmx file and click Add to Inventory.

12.Complete the wizard. The virtual machine is now registered.

To rename the virtual machine disk, see Renaming a virtual machine disk (1002491).

Advertisements