The vSphere Client (including vSphere latest client as of today) does not allow renaming of VMDK’s using the GUI.
using the GUI.
1. Veeam FastSCP or Veeam Backup
2. Storage vMotion
3. Cold Storage vMotion
I find copy and renaming vmdk file and creating new vm (attached renamed vmdk) from vClient is hassle free and clean. Ofcourse, you no need to do this manually if your organization can afford to buy VMware additional/commercial tools that come with additional costs (eg. vCeneter, vMotion)
Now here are the steps to copy and rename vmdk file using VMware native tools: vmkfstools.
1. shutdown the target (source) VM
2. copy VMDK file
3. Rename VMDK file using vmkfstools
Enable SSH from ESX console screen or from vClient
Press <F2>, Troubleshooting -> Mode option ->Enable SSH
Go to Security profile -> Services -> Properties..
Use SSH client (eg. Putty) to login. (eg. Usernam:. root / Password: yourESXhostPassword)
Navigate to your target datastore (location of copied .vmdk file as step 2)
Run following command to rename copied vmdk file:
# vmkfstools -E orignial.vmdk new.vmdk
4. Create a new VM and add the renamed .VMDK file
Note: we also can copy (cp) the .vmx (virtual machine configuration file) and edit (vi) to make it work. But I prefer to create a new one as it is cleaner.
5. When done; power on the VM.
If you prefer; you can copy vmdk file using vmkfstools as well. To clone a virtual disk to a new virtual disk, run this command:# vmkfstools -i “originalname.vmdk” “newname.vmdk”
This leaves the original virtual disk untouched. You need enough space available to clone the virtual disk in the destination directory.
You need not rename the originalname-flat.vmdk file after running the vmkfstools command. The vmkfstools command renames both VMDK files and updates the reference within the descriptor.
Do not use the cp or mv commands to rename virtual disk files. Instead, use VMware utilities such as vmkfstools.