vSphere 5.5 Storage Enhancement Part 6 – Rename Files using SvMotion
This 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.
However, 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:
My 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:
A 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”
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 🙂
Yep – in full agreement with you. We’re looking into being able to do that.
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?
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.
I think you are asking about the VAAI UNMAP operation. This is still manual operation. So after a Storage vMotion from a thin provisioned datastore, you will have to run a vmkfstools -y command (or an esxcli unmap command in 5.5) to reclaim the space on the source datastore. This is not an issue if the source datastore is not thin.
More here – http://cormachogan.com/2013/11/27/vsphere-5-5-storage-enhancements-part-4-unmap/
Comments are closed.