We have a few VMs that have radically different names in the path and .vmx filenames from the display name. My question is what is the best practice to correct this (I'm a little curious as to how it happened, but I think that is more of a people problem).
Example:
\# vmware-cmd /vmfs/volumes/452d75c9-7ab9486d-6a8d-0017a445851b/[b]ANTXSM3/ANTXSM3[/b].vmx getconfig displayname
getconfig(displayname) = [b]ANNDWT01[/b][/u]
There are also config paths with spaces in them that need clean up too (we encourage the use of the "Notes" field more now). I'm thinking that cloning the VM to the better name and then just removing the ugly one from inventory.
I believe I read somewhere that if you relocate the disk files to another datastore (while the VM is powered off obviously) then it will rename everything according to the display name.
Cloning is probably the easiest way. You could also create folders with the new name you want, and then adjust the two vmdk files to reflect the new name. One of the vmdk files is a pointer file to the real vmdk file and you have to go into that file and adjust the pointer name if you follow through that way. If you decide to go that route, let me know and I can email you my directions on how to do that.
Respectfully,
I believe I read somewhere that if you relocate the disk files to another datastore (while the VM is powered off obviously) then it will rename everything according to the display name.
That is true and is the biggest pain in the but for me