Storage vMotion does not rename virtual machine files

When you rename a virtual machine in VMware, the VM’s folder and files on the datastore do not get renamed automatically. This can make troubleshooting difficult as it will be almost impossible to find a renamed VM whilst browsing a datastore.

To fix this, you normally do a Storage vMotion of the VM, which would rename the folder and all of the corresponding VM files to the new name. Unfortunately in vCenter 5.0 and 5.1 a Storage vMotion does not rename the VM files, it will only rename the folder.

There is a fix for this so that the VM files get renamed as well. Here is how to do it…

VMware vCenter Server version?

First off you will need to update your vCenter server to at least the following:

  • vCenter Server 5.0 Update 2
  • vCenter Server 5.1 Update 1

Enabling Storage vMotion File Renaming

If you are already at the correct vCenter Server version or you have updated to the correct version, the next step is to enable Storage vMotion to rename files on a successful migration. To do this, follow these steps:

  1. Log into the vSphere Client (desktop client, not web client) as an Administrator
  2. From the File Menu, click Administration >> vCenter Server Settings
  3. Click Advanced Settings
  4. Add the following advanced parameter
    Key: provisioning.relocate.enableRename
    Value: true
  5. Click Add
  6. The advance parameter will be added (Note: The key will be renamed to config.provisioning.relocate.enableRename)
  7. Click OK
  8. Restart the vCenter Server service for the changes to take effect

More Information

If you would like more information, then all of the details above have been documented in VMware KB2008877.

The good news is that this is now fixed in vSphere 5.5.

Any questions let me know in the comments below.

Luca

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.