While renaming a vSphere Virtual Machine is very straightforward using the vSphere UI or API, this operation only updates the display name in the vSphere Inventory. To ensure the underlying VM configuration files (e.g. .vmdk, .vmx, etc. ) are also updated, a Storage vMotion is also required, which requires you to have at least two vSphere Datastores to perform the operation.
If Storage vMotion is not an option, you only have a single datastore or you are using vSAN, then your only option is to manually rename the individual VM files. For vSAN-based VMs, one additional step is required as vSAN manages objects and not files.
