VMware Cloud Community
seanm1832
Enthusiast
Enthusiast
Jump to solution

How to rename VMDK

When deploying a new server from a template, the name was set to the desired server name, but with a -test at the end.

Unfortunately the vmdk file and folder still has the -test after it.

What are the steps to rename this to a proper name?

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
rcporto
Leadership
Leadership
Jump to solution

The preferred way to rename a virtual machine files (including virtual disks) is doing a Storage vMotion to another datastore, see: VMware KB: Renaming a virtual machine and its files in VMware ESXi and ESX

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto

View solution in original post

Reply
0 Kudos
2 Replies
rcporto
Leadership
Leadership
Jump to solution

The preferred way to rename a virtual machine files (including virtual disks) is doing a Storage vMotion to another datastore, see: VMware KB: Renaming a virtual machine and its files in VMware ESXi and ESX

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

One way to rename a VM's file and folder is to use Storage Migration, and migrate the VM to another datastore (after renaming the VM in the inventory).

Renaming just a virtual disk can be done from the command line using vmkfstools, e.g.

vmkfstools -E source.vmdk target.vmdk

(please note the upper case -E)

After renaming the .vmdk file (the command will rename the descriptor as well as the flat file), you need to either edit the configuration (.vmx) file, or change the VM's settings via the GUI to access the renamed virtual disk. In case you edit the .vmx file manually, remember to reload the .vmx after editing it (see e.g. https://kb.vmware.com/kb/1026043)

André