vSphere 5.5 Storage Enhancement Part 6 – Rename Files using SvMotion

vsphere5.5bThis is something which comes up a lot. In the past, many people used a by-product of the Storage vMotion operation to rename all of the files associated with a virtual machine. In this vSphere 5.1U1 post, I mentioned that we brought back this functionality but you had to set an advanced parameter to make it work. Well, in vSphere 5.5, it works without the advanced option. The following blog post shows you this rename of virtual machine files using Storage vMotion in vSphere 5.5 to rename all of the files associated with a virtual machine.

First off, I rename the virtual machine in the vSphere web client. The original name was cor-svmotion-test-vm. The new name is cor-svmotion-new-vm.

Rename VMHowever, most of you will be aware that this doesn’t do anything to the underlying file names. The set of files which makes up this virtual machine continue to retain the original name of the virtual machine (test), as we can clearly see from this file view from the DELL Compellent datastore on which this virtual machine resides:

File list before MigrateMy next step then to rename these files is to Storage vMotion these virtual machines to another datastore. In this example, I am going to migrate the virtual machine to an EMC Isilon NFS datastore. Once the virtual machine has been successfully migrated, a simple check of the file view on that datastore shows that the virtual machines have been seamlessly renamed to reflect the name of the virtual machine:

File list after MigrateA very nice feature which I know many of you use regularly to organize your virtual machines.

5 Replies to “vSphere 5.5 Storage Enhancement Part 6 – Rename Files using SvMotion”

  1. Thanx Cormac,
    this is in fact a nice feature we use.

    But I am wondering why do we have to svMotion just to rename the files.
    Wouldn’t it be even better, if GUI offered an option like “Rename VM and all associated files”. It would even save us some IOPS 🙂

  2. I agree. There needs to be a simpler way to rename a VM and it’s files at the same time. How do you locate a VM in the datastore if someone only renames the VM in vSphere and forgets to rename the .vmdk and .vmx files?

  3. Hi Cormac,
    What happens if you Storage vMotion a VM to another datastore in same Array? once the data is completely moved from Source to Destination and VM is live at destination, Does VMware delete those blocks and write 0’s at the source datastore? Does ESXi host issue unmap command? Is it logged in vmkernel.log? can you please answer keeping Storage LUNs in mind? Also what if you have Eagerdzero thick VMs storage vmotioning to thin volumes at the storage side? Thank you sir.

Comments are closed.