Thursday, August 27, 2009

How to rename Virtual Machines in VMWare

You can clone the VM to a new one with the proper name, but that requires a lot of downtime usually.
Follow are the two ways to rename the VM in VMWare ESX.:



1.Shut down the VM
2.Choose “Remove from inventory”
3.Log into the ESX console and cd to the place where your VM is
4.Rename the directory
5.Rename all the files in the directory
6.Change the names in the vmdk, vmsd, vmx, and vmxf files
7.Browse the datastore and add the new vmx to the inventory

(OR)

cd /vmfs/volumes/vmfs-data6
mv OldVM NewVM
cd NewVM
rename OldVM NewVM *
perl -pi -e 's/OldVM/NewVM/g' NewVM.vm*

No comments:

Post a Comment