To easily rename the files of a virtual machine without causing any problems and without having to shut down (if necessary) it, all you need to do is use the vMotion functionality of VMware vSphere.
To do this, whether the virtual machine concerned is powered on or not, click: Actions -> Migrate.
Choose "Change storage only".
Select a different datastore than where this virtual machine is currently located so that the files can be renamed.
Otherwise, the files will not be renamed. As specified on the "Renaming a virtual machine and its files in VMware ESXi (1029513)" page on the VMware website.
If necessary, you will simply have to perform a second migration of the storage of this virtual machine afterwards to return it to its initial location.
Click Finish.
Wait while this virtual machine's storage is migrated.
Once the migration (and therefore the "Replace the virtual machine" task) is completed, the following may appear:
In this case, click: Actions -> Snapshots -> Consolidate.
Note: the "Consolidate" option is only available when VMware vSphere asks you to use it.
Confirm the consolidation of your virtual machine files by clicking Yes.
Consolidate. This operation consolidates all redundant redo logs on your virtual machine. Are you sure you want to continue?
Once the consolidation is complete, the "Consolidate Virtual Machine Disk Files" task will be completed.
If you check the selected datastore in your virtual machine's migration assistant, you will be able to see that your virtual machine's folder name now matches the name it has in your inventory.
If you go into this folder, you will see that its files have also been renamed with the new name of your virtual machine.
As explained previously, for the files of your virtual machine to be automatically renamed when migrating its storage, you had to migrate it to a datastore other than the original one.
If you wish, now that its files have been renamed, you can migrate its storage again to return it to its original location.
To do this, select it in your inventory and click: Actions -> Migrate.
Choose again: Change storage only.
Select the datastore where your virtual machine was originally located and click Next.
Wait while this virtual machine's storage is migrated.
The migration is complete.
As expected, your virtual machine is in the datastore where it was originally located.
And the name of its files always corresponds to the new name of this one.
VMware 6/2/2023
VMware 12/23/2022
VMware 11/2/2022
VMware 8/14/2024
Pinned content
Contact
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
No comment