Renaming Virtual Disks (VMDK) in VMware ESXi
You have just cloned a VM, and would like to rename your VMDKs to match the new name of the clone.
When you try to rename a VMDK in the GUI Datastore Browser in vSphere client, you get a message:
“At the moment, vSphere Client does not support the renaming of virtual disks”
How do you go around the message?
- Lookup the name of your Datastore and your VM in the GUI.
- Start SSH service.
- Login as root to your ESXi host.
- In a SSH session type the following commands. Substitute the name of your Datastore for STORAGENAME and your VM for VMNAME.
- cd /vmfs/volumes/STORAGENAME/VMNAME
- Substitute the name of your old VMDK for OLDNAME and your new VMDK for NEWNAME. Remember – everything is case sensitive.
- vmkfstools -E ./OLDNAME.vmdk ./NEWNAME.vmdk