VMware vSphere

 View Only
  • 1.  How to rename VMDK

    Posted Mar 09, 2016 12:48 PM

    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?



  • 2.  RE: How to rename VMDK
    Best Answer

    Posted Mar 09, 2016 02:38 PM

    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



  • 3.  RE: How to rename VMDK

    Posted Mar 09, 2016 02:43 PM

    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é