Renaming the virtual machine disk file


From http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=6821743&sliceId=1&docTypeID=DT_KB_1_1&dialogID=71326048&stateId=1%200%2071322858

Details

This article provides steps for renaming the virtual machine disk file.

Solution

To rename the virtual machine disk file (.vmdk file):
  1. Log in to the VMware Infrastructure (VI) Client.
  2. Click VM > Edit Settings > Remove the disk from the virtual machine.

    Notes:

    • Do not select Remove from the virtual machine and delete files from the disk.
    • To remove the primary disk (containing the guest OS) you must power off the virtual machine.

  3. Connect to the ESX host using SSH and run the following command:

    #vmkfstools -E <source> <target>

    Where <source> is the name of the virtual disk to rename and <target> is the name you want the virtual disk to have.


    Note: Ensure to include the extension . vmdk. If you are not in the same directory as the file you are renaming, include the full path to the files.  If the file name includes a space, you may need to use double quotes around the name to ensure you capture the full name.

  4. After renaming the virtual disk, log in to the VI Client.
  5. Click VM > Edit Settings > Add Hard Disk.
  6. Choose Use an existing virtual disk.
  7. Browse to the datastore and point to the renamed disk. Finish adding the virtual disk.
  1. No comments yet.
(will not be published)
  1. No trackbacks yet.