Replicating templates from one datastore to another

I have two datastores at 2 separate locations that are both dedicated to storing vm templates. I am tired of updating all the vm templates in one datastore and then logging into a different datacenter and having to update this same templates all over again just because they are stored in two different datastores in two different esx hosts.

I want to update ONE set up templates then copy them to the other datastore.

I am fairly sure I can copy the folders containing the templates from one datastore to the other but I need to know if there are any 'caveats' in need to know before doing this. Keep in mind the templates in the two datastores have the same template folder names. Also, I see there is a .vSphere-HA folder in each datastore too. What do I do with that?

If I copy the templates from one datastore to the other, will they list as template folders in vSphere or do I have to do something special?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dawid FusekVirtualization Expert, Sr B&R, Storage SpecialistCommented:
hi mate,

1. if the names and folder are the same (you can one time make it absolutely the same) you can in theory copy just folder and files between datastores from cli or from vSphere we client or vsphere client/gui, but you have to notice that will copy this templates always with full disk size, so like disk will be in thick state, so they consume more bandwith and will use more space on second DC, but aftec rewriting old one new temps should working on on that second DC, but it's not an optimal solution
2. more professional solution is to just clone all that templates to the other DC if of course all ESXi hosts are in the same vCenter server, if no, you have to use other solution, also notice that this solution can be some automated by VMware vCenter Scheduler
3. Another option is also VMware vCenter Converter Standalone, it can be used in almost any config, also if there are 2 different DC with different not connected vCenter Servers you may also use VMware vCenter Converter Standalone to convert these templates between ESXi/vCenter Servers, and you also may notice that  VMware vCenter Converter Standalone has a function to synchronize these Vm/templates between ESXi/vCenter Servers on demand.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Just go ahead and copy the templates, or why not have a single datastore for both datacentres!

We have a single template and iso repository for ALL our Datacentres, usually mounted on NFS.
jimlock720Author Commented:
Both of you have good solutions but will the folder copies of templates have to be re-registered once they are on the new datastore? I'm not concerned about space or bandwidth right now but I can see where that would be a concern for a lot of IT peeps out there.

Also, right now, these three vcenters (I forgot we have a 3rd one!) have no direct connectivity otherwise answer #1 would be a good option.

I am considering a work order to have a 4TB SAN NAS configured that all 3 centers can add as a shared datastore for templates  and voila problem solved. In fact I may start that process tomorrow. Awesome idea Andrew.
Dawid FusekVirtualization Expert, Sr B&R, Storage SpecialistCommented:

if you just copy a VM/template files from one DataStore (DS) to other DS it will be just copied and not appear in VM/templates inventory, but my concern was to copy them to existing exactly same VM's/templates (so for true they should be exactly same vm/templates with the same files names), then maybe it's not fully professional but in practice it will work that newly copied vVMs/templates will just work as a newer ones because VMware vCenter server update them when they will be accessed/cloned, converted to VMs or just copied again. To get manually newly copied VM/template to work (to be visible in the inventory) you have to register it, by righ mouse button on .vmx file and select "Add to inventory", then wizard lets you give the new name for VM and put them in correct inventory location and resources pools, host/cluster.

I surly agree with Andy than easiest way, most practical and also safe is to use single NFS share for all vCenters (ESXi hosts) if possible. NFS is native for ESXi and ESXi host not react bad if it disappear so it's not critical to have it on critically stable production storage if they are just templates.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jimlock720Author Commented:
Perfect! I ended up right-clicking on the vmx file to register them. Thanks guys!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.