I do not believe there is any global config or API to achieve what you want 
(force template download from secondary to primary storage for every deployment 
on the same storage).

An easy way to work around this would be to make 20 copies of the template 
(basically register the same template 20 times with different names) and force 
VM deployments to use a new template each time.

Somesh
CloudPlatform Escalations
Citrix Systems, Inc.

-----Original Message-----
From: Kyle Flavin [mailto:kyle.fla...@citrix.com] 
Sent: Wednesday, January 21, 2015 4:53 PM
To: users@cloudstack.apache.org
Subject: Clearing template cache on primary storage

Is it possible to clear template cache on primary storage prior to VM 
deployment, via cloudmonkey or some other method?  I'm doing some performance 
tests on one of our Cloudstack clusters that is running Xenserver.  For testing 
purposes, I'd like to force the copy of the template from secondary storage to 
primary storage, with each deployment on this cluster.  I'm kicking off the vm 
instance deployments in batches of 20.  I want the template to be pulled down 
to primary storage each time a deployment starts.

I've looked over the API and I don't see anything that quite matches what I'm 
looking for.  It looks like "prepareTemplate" will allow me to cache the 
template on primary storage, but I'd like to "uncache" prior to deploying a new 
instance: 
https://cloudstack.apache.org/docs/api/apidocs-4.2/root_admin/prepareTemplate.html,
 and there doesn't appear to be an obvious way to do so.

Thanks,
Kyle

Reply via email to