VMware Cloud Community
golddiggie
Champion
Champion

Looking for opinions, suggestions, on best method to use for changing VM file names (on datastore)

I'll be starting with a new company shortly which has a bit of a situation with their current VMware environment. Many of the names of the VM files do not follow any kind of naming convention standards. With a lot of them having additional tags such as 'restored' or 'backup' due to being recovered from B&R software. One of the things that the head of IT wants me to do is get all the VM's files to follow a (to be determined) standard naming convention. While this is easy when creating new VM's, I would be interested in hearing how other (experienced) VMware admin's would tackle this.

My thoughts are to use the converter tool to V2V those VM's, providing them with names that follow the new standard during scheduled maintenance windows. Since we're also looking at getting some new host servers, and an iSCSI SAN, this shouldn't be too much of an issue. I've not, yet, tried to just change the names of the files that a VM uses to something else. Would that be a better method (editing the .vmx file to reflect the new file names).

I'm looking for the option that will give the most reliable, and stable, results. It doesn't need to be the fastest, since we would prefer to have this done right rather than quickly (with sloppy results). I'm sure someone here has gone through this process before.

VMware VCP4

Consider awarding points for "helpful" and/or "correct" answers.

Reply
0 Kudos
6 Replies
a_p_
Leadership
Leadership

Besides the KB articles you might already know

KB1003743 - Verifying ESX virtual machine file integrity

KB6821743 - Renaming the virtual machine disk file

there's - in my opinion - a way easier method with just renaming the object and migrating it

Community post - Renaming directories, machines and disk files on my datastore, best practice???

Before trying anything on production VM's with RDM's mapped, I'd suggest you try this first on your test equipment.

André

golddiggie
Champion
Champion

I'll give the cold svMotion method a shot over the weekend, in my test lab... If that works, then I'll probably end up using that. Especially since we'll be using svMotion to move the VM's from the old (existing) SAN to a new SAN pretty early on...

Unable to test the svMotion method here, since it doesn't come up with an option to rename the files. I did perform a cold clone, renaming the VM that would be the new copy, and that worked 100%... I only tested with a VM that was empty (just created it, didn't actually do anything with it yet)... I'll deploy a VM from one of my templates and try the cold clone mode again, as well as a warm/hot clone process to see how that works. Since we'll be going to a new SAN with the VM's, I could use this method, leaving the old VM's intact, just powering them off once it completes. This provides a 'safety net' just in case something goes wrong...

VMware VCP4

Consider awarding points for "helpful" and/or "correct" answers.

Reply
0 Kudos
golddiggie
Champion
Champion

After some initial method testing, I'm leaning towards using a clone function on the original VM's (at the source SAN) to new VM's (onto the new/target SAN). Cold cloning a VM with a 20GB vmdk file (Server 2003 Standard SP2) takes about seven minutes when cold, 15 if hot. The only item I'll need to check, before going with this method, is that the new ESX hosts have no issue seeing the existing SAN (not sure what it is, exactly, yet). If they can, then shouldn't be much of an issue to perform the migration/renaming tasks. I do like the added benefit of still having the originals, on the original SAN available in case something goes wrong in the process. I'll adjust the method for any VM's that we cannot bring down for the process (for the X minutes it will take) and probably use a converter (v2v) task to move/rename those VM's from their existing hosts.

I'll post up how things progress on this item, as well as final results... If anyone else has actually gone through this type of thing, I would like to hear how it went, as well as what methods you ended up using. Especially since what works in a test lab, might not work to the same degree in production. Especially when there's older versions of ESX/ESXi in the mix...

VMware VCP4

Consider awarding points for "helpful" and/or "correct" answers.

Reply
0 Kudos
shootking
Contributor
Contributor

In 4.0, use the function Migrate. You can perform a Migrate this hot or cold, so there is no need for downtime on production servers. I have done this for 20+ VM:s with no failures. Some reflections from my renaming activities:

1. Correct the hname in VC. This is the name the folder and the files will get after performing a Migrate. If you have a VM namd "Server 1 Prod" then the folder on the datastore will have "Server 1 Prod" as name. The files will be renamed "Server 1 Prod.vmdk" and so on.

2. You have to migrate the machine to a different data store. If not, the Virtual Center will skip this task.

In 3.5 you can also use the migrate task. But as there is no storage vMotion in 3.5, you have to perform this task on a cold machine. In other words, you have to shut it down.

Hope this helps!

/Jens Myretyr

Reply
0 Kudos
jkumhar75
Hot Shot
Hot Shot

While doing the upgrade from ESX 3 & ESX 3.5 to ESX 4.0, we have adopted the approach of cold cloning for migrating and renaming the VM's with the new industry standard.This method has been adopted for the PROD & DEV both the enviroment and for us it has worked like a gem without any issues.

Some of the VM's which had a RDM connected, we had to first disconnect the RDM and then do the cloning.After that power on the cloning vm with the new specification and attach the RDM.

For some of the VM's we had face the issue with the NIC's card as well as VM's OS crashing, for those we have updated the hardware tools as well vmware tools and it has worked.

Jay

MCSE,VCP 310,VCP 410

Consider awarding points for "helpful" and/or "correct" answers.

If you found this or other information useful, please consider awarding points for "Correct" or "Helpful". Jayprakash VCP3,VCP4,MCSE 2003 http://kb.vmware.com/
Reply
0 Kudos
abaum
Hot Shot
Hot Shot

We just rename the server in VC and then do a storage vmotion. The end result is renamed files to match the server name that is listed in VC.

adam

Reply
0 Kudos