Note: To check the working directory, select the virtual machine and click on Edit Settings > Options > General Options. If the Virtual Machine Working Location is invalid, proceed to Step 9 below.
To resolve this issue, rename the directory so that there are no spaces in it.
To rename the directory:
- Connect to the ESX host using the Virtual Infrastructure Client.
- Log in as a user with administrative privileges on the ESX host.
- Right-click on the virtual machine and click Remove from Inventory.
- Use the datastore browser from the VI Client to rename the directory.
Notes:- If you are able to rename the directory, proceed to Step 9.
- If the virtual machine has disks spread across other datastores, be sure to rename all associated directories.
- Connect to the Service Console of the ESX host using an SSH client.
- Log in as a user with administrative privileges on the ESX host.
- Browse to the virtual machine directory under the VMFS volume.
- To rename the directory, run a command similar to:
mv "/vmfs/volumes/storage1/Sample_Directory" "/vmfs/volumes/storage1/SampleDirectory"
Notes: - Ensure to use quotes to enclose the full directory path. This removes the space from the directory name.
- You can also clone the virtual machine and rename it during the clone process.
- If the virtual machine has disks spread across other datastores, be sure to rename all associated directories.
- Edit the virtual machine configuration (.vmx) file and rename the displayname parameter without spaces.
- 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).
- Using the VI Client, navigate to the newly renamed directory in the Datastore browser to find the virtual machine.
- Right-click the .vmx file and click Add to Inventory.
- Complete the wizard.
Note: To rename the virtual machine disk, see Renaming a virtual machine disk (VMDK) via the vSphere Management Assistant (vMA) or vSphere CLI (vCLI) (1002491).
Additional Information
For translated versions of this article, see: