VMware Cloud Community
bjkar
Contributor
Contributor

how to move templates between datastores

Hi there,

I have 10 VM templates on a datastore and would like to move all templates to a different datastore. What is the Best way to move templates between datastores?

Thanks.

Tags (2)
15 Replies
weinstein5
Immortal
Immortal

Welcome to the Community - you can convert the template to a VM and then cold migrate it to the new datastore -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
TedH256
Expert
Expert

I've never understood why a template can't be migrated. Seems like an over-sight to me.

But whatever - not that difficult to convert then migrate, just is a hassle ...

bjkar
Contributor
Contributor

Thanks for you inputs! Below is what I tired with its results:

I tried to move the Template from Datastore using the 'Move to..' feature in Browse Datastore view. While the Template files got moved the actual VMDK files in the templates have enlarged.

My initial template folder size in Browse Datastore view was < 10GB and now after moving template folder to the new Datastore its size has grown to > 30 GB.. The VMDK file has actually enlarged.

Any idea why the VMDK file size has increased?

0 Kudos
FJ1200
Enthusiast
Enthusiast

I do it this way...

  1. Convert templates to VMs
  2. Leave powered off
  3. In the Virtual Machines tab, select all the VMs you want to move > hold down Shift and Right-click > Migrate
  4. Migrate Datastore - go through the wizard
  5. Will migrate 4 at once and queue the rest, will migrate them as the others complete
  6. Convert back to templates.
  7. Job done.
vJJSosa
Enthusiast
Enthusiast

Hello, i'm not sure but i think when you have some datastores with two different block size, and if you move VMs between with "Move TO", the migrated VM change to thick formart. This is your case?

Regards

[VCAP5-DCA, VCP3/4/5, VCP-DT4, MCITP Network Infrastructure, HP ASE Bladesystem]
0 Kudos
justinsmith
Enthusiast
Enthusiast

Im looking for a cleaner way to replicate a Template Datastore. Right now we have a volume on our test cluster. Its being snapmirrored to our production cluster and our secondary datacenter cluster. We make changes to the test volume, update the snapmirror, and break it off so the other vCenters can see it. It seems that lately we’ve been seeing some weirdness on our hosts and we think it might have to do with this shared datastore solution. We also run into some mounting issues when we update and break the volume. None the less, is this something we can do with VSC? Or something else? We want to utilize VAAI so having the volume on its own NetApp cluster is the only way to do that, so keeping the volume in one NetApp cluster and just presenting it to the vCenters won’t be an option.  I’ve read the old Provisioning and Cloning option had some remote mounting options. We’re currently using VSC 6.1

0 Kudos
Anna_Gayakwad
Contributor
Contributor

Good one @FJ1200

0 Kudos
mrwboilers
Contributor
Contributor

Am I alone in thinking it's incredibly stupid to have to convert a template to a VM in order to change what datastore it's on? That's a bit of a pain in the ass.

ktdann
Contributor
Contributor

Just wanted to say, you are not the only one.

ALy888
Contributor
Contributor

I concur

0 Kudos
NeoKumar
Enthusiast
Enthusiast

as weinstein5 mentioned, I see that is the safest and approved way to do. convert to vm and migrate!

0 Kudos
shaokat
Enthusiast
Enthusiast

you can't move templates directly. first, you need to convert the templates to VM and then migrate the VM to another data store after migrating the VM, convert the VM to template again. 

Shaokat

https://www.linkedin.com/in/shaokat-ullaha/
0 Kudos
maksym007
Expert
Expert

maybe in vSphere8 we will be able to migrate templates

0 Kudos
dignitas
Contributor
Contributor

In vSphere 8 at least, I'm able to right click on a template, select "Clone to Template..." and from there select the compute and storage resource. So I just first rename the template in the old location and then clone it to the new location with the desired name.

0 Kudos
paragvayare
Contributor
Contributor

Even with the vsphere 7, there is an option available "clone to template".

You can right click on template and select "clone to template" Option. Further you can select desired host and datastore. 

0 Kudos