You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Sean Lair <sl...@ippathways.com> on 2016/04/19 00:09:20 UTC

Best way to update Templates

Hello,

We need to periodically update our templates, for example installing the latest Windows updates in our Windows Server templates  Is there a way to update existing templates or do we just need to delete the old template and create new one with the same name?

The only issue I see with that so far is that we lose the linkage between instaces (VMs) and templates.

Thanks
Sean


Re: Best way to update Templates

Posted by ilya <il...@gmail.com>.
Sean,

You secondary storage should grow naturally - as you add more content.

Also, you would see the most benefit from link clones, when they are
used optimally. That is - you separate your DATA and ROOT into 2
distinctive disks.

I'm not going to bother you with explanation as i'm certain you know it
by now. I've just seen some folks use ROOT disk for both OS and Data -
and wonder why their disks are horrendously large.

Lastly, there is also an API call called recoverVM, which basically
would let you switch the underlying template from the VM, but preserve
the metadata - that is served by router vms. In essense IP, hstname and
metadata remains the same, but disk is reset to new pre-configured state

If you have a smart solution that on the OS start, see that OS is not
configured, fetches metadata from router vm, configures it self and
marks as configure complete (to avoid configuration on next reboot).
Basically makes a VM truly ephemeral. Then on your upgrade cycle, you
just issues recover VM api call in mass - and assuming your automation
is perfect - the VM will power on and configure itself as it was with
previous patch set.

This usually works much easier with Linux, i doubt windoows would be so
simple, but just a thought...

Regards
ilya

On 4/18/16 9:15 PM, Sean Lair wrote:
> Thanks for the reply Kirk.  Will it auto-delete templates if there are not any VMs cloned from them?  Is there a better way to keep templates up-to-date with patches?
> 
> We will be patching these templates fairly often as Microsoft releases new patches.  It sounds like our secondary storage will grow quite quick if it doesn't delete old templates, or if we have long-lived VMs that are linked to these old templates.
> 
> This does explain why our secondary storage has grown more than we expected lately.
> 
> Thanks for any help or guidance you can provide!
> 
> Sean
>  
> 
>> On Apr 18, 2016, at 7:24 PM, Kirk Kosinski <ki...@shapeblue.com> wrote:
>>
>> Hi, yes that is a good way to do it.  Note that if you do delete a template that is in use, it won't actually be deleted on the back-end (i.e. the database entries will remain, as will the files on secondary storage), rather it is just hidden from the end-users in the UI and API.  Giving a new template the same name as a deleted one might be a bit confusing so you could consider adding a version number or date code.
>>
>> Best regards,
>>
>> Regards,
>>
>> Kirk Kosinski
>>
>> kirk.kosinski@shapeblue.com 
>> www.shapeblue.com
>> 53 Chandos Place, Covent Garden, London  WC2N 4HS
>> @shapeblue
>>
>> -----Original Message-----
>> From: Sean Lair [mailto:slair@ippathways.com] 
>> Sent: Monday, April 18, 2016 3:09 PM
>> To: users@cloudstack.apache.org
>> Subject: Best way to update Templates
>>
>> Hello,
>>
>> We need to periodically update our templates, for example installing the latest Windows updates in our Windows Server templates  Is there a way to update existing templates or do we just need to delete the old template and create new one with the same name?
>>
>> The only issue I see with that so far is that we lose the linkage between instaces (VMs) and templates.
>>
>> Thanks
>> Sean
>>

Re: Best way to update Templates

Posted by Sean Lair <sl...@ippathways.com>.
Thanks for the reply Kirk.  Will it auto-delete templates if there are not any VMs cloned from them?  Is there a better way to keep templates up-to-date with patches?

We will be patching these templates fairly often as Microsoft releases new patches.  It sounds like our secondary storage will grow quite quick if it doesn't delete old templates, or if we have long-lived VMs that are linked to these old templates.

This does explain why our secondary storage has grown more than we expected lately.

Thanks for any help or guidance you can provide!

Sean
 

> On Apr 18, 2016, at 7:24 PM, Kirk Kosinski <ki...@shapeblue.com> wrote:
> 
> Hi, yes that is a good way to do it.  Note that if you do delete a template that is in use, it won't actually be deleted on the back-end (i.e. the database entries will remain, as will the files on secondary storage), rather it is just hidden from the end-users in the UI and API.  Giving a new template the same name as a deleted one might be a bit confusing so you could consider adding a version number or date code.
> 
> Best regards,
> 
> Regards,
> 
> Kirk Kosinski
> 
> kirk.kosinski@shapeblue.com 
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London  WC2N 4HS
> @shapeblue
> 
> -----Original Message-----
> From: Sean Lair [mailto:slair@ippathways.com] 
> Sent: Monday, April 18, 2016 3:09 PM
> To: users@cloudstack.apache.org
> Subject: Best way to update Templates
> 
> Hello,
> 
> We need to periodically update our templates, for example installing the latest Windows updates in our Windows Server templates  Is there a way to update existing templates or do we just need to delete the old template and create new one with the same name?
> 
> The only issue I see with that so far is that we lose the linkage between instaces (VMs) and templates.
> 
> Thanks
> Sean
> 

RE: Best way to update Templates

Posted by Kirk Kosinski <ki...@shapeblue.com>.
Hi, yes that is a good way to do it.  Note that if you do delete a template that is in use, it won't actually be deleted on the back-end (i.e. the database entries will remain, as will the files on secondary storage), rather it is just hidden from the end-users in the UI and API.  Giving a new template the same name as a deleted one might be a bit confusing so you could consider adding a version number or date code.

Best regards,

Regards,

KirkĀ Kosinski

kirk.kosinski@shapeblue.comĀ 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HS
@shapeblue

-----Original Message-----
From: Sean Lair [mailto:slair@ippathways.com] 
Sent: Monday, April 18, 2016 3:09 PM
To: users@cloudstack.apache.org
Subject: Best way to update Templates

Hello,

We need to periodically update our templates, for example installing the latest Windows updates in our Windows Server templates  Is there a way to update existing templates or do we just need to delete the old template and create new one with the same name?

The only issue I see with that so far is that we lose the linkage between instaces (VMs) and templates.

Thanks
Sean