Rename a VM without shutting down…using storage vMotion

Summary

When renaming a VM in vCenter, underlying files and folders remain named the same as when the VM name was first designated.  This can make for a difficult recovery scenario if file/folders and names in vCenter are out of sync.

Config

  • vCenter 4.0 U1
  • ESX 4.0 U1

Solution

  1. Rename the VM in vCenter
  2. Migrate the VM to another Datastore
  3. Done!
    • If you check the VM’s settings and/or datastore, all related files/folders should now match the VM name in vCenter.

Maybe this was obvious to some folks, but it wasn’t until I was doing maintenance @ the wonderful hour of 2am that this dawned on me as a possible solution.  I’m so used to having to go through this process.

2 comments:

Martijn said...

Hi Chris,

Thanks for sharing!

I tried your method and it worked partially for me.

All the files were renamed except for the .vmdk files. They still have the original name.. :(

Did I miss something?

Thanx!

Martijn

Chris Nakagaki said...

That is strange. Not sure why it would rename everything but the vmdk's.