RE: Xen - Deploying servers from a template

2015-04-29 Thread Yuri Kogun
Yes, it works fine with the shared storage. This is local storage on Xen server 
issue.  I'm happy to provide more info if needed 

Best regards 
Yuri 


> From: geoff.higginbot...@shapeblue.com
> To: users@cloudstack.apache.org
> Subject: Re: Xen - Deploying servers from a template
> Date: Wed, 29 Apr 2015 13:05:59 +
>
> Hi Yuri,
>
> Thanks for the update. Would I be right in saying this is a local storage 
> issue and if using shared storage the prepare template api functions as 
> expected.
>
> I think I've only tested when using shared storage so I will get our 
> developers to look at this to see if we can include the fix in 4.5.1
>
> Regards
>
> Geoff Higginbottom
> CTO / Cloud Architect
>
> D: +44 20 3603 0542 | S: +44 20 3603 
> 0540 | M: +447968161581
>
> geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com> | 
> www.shapeblue.com | 
> Twitter:@cloudstackguru<https://twitter.com/#!/cloudstackguru>
>
> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 
> 4HS
>
>
> On 29 Apr 2015, at 15:45, Yuri Kogun 
> mailto:yko...@outlook.com>> wrote:
>
> Hi Geoff,
>
> We have raised the issue with citrix cloudPlatform and I believe they are 
> working on it and should contribute the fix back to cloudstack.
>
> The problem itself as follows
>
> if you have more than one host in the XEN cluster with the local storage and 
> send the prepare_template api call for a new template the secondary storage 
> template NFS directory will be mounted as SR on all hosts in the cluster and 
> you will get the following error in the log
>
> GetStorageStats Exception:SR_BACKEND_FAILURE_40The SR scan failed 
> [opterr=['INTERNAL_ERROR', 'Db_exn.Uniqueness_constraint_violation("VDI", 
> "uuid", "9fc07770-b9c0-4db6-a0e0-48a24c901db7")']]
>
> The template will be copied to the local storage on only server in the 
> cluster and you will have to repeat the command to copy the template again. 
> The only way to check if the template was copied to the local storage will be 
> to query the cloud.template_spool_ref table.
>
> Best regards
> Yuri
>
> 
> From: 
> geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com>
> To: users@cloudstack.apache.org<mailto:users@cloudstack.apache.org>
> Subject: Re: Xen - Deploying servers from a template
> Date: Wed, 29 Apr 2015 10:28:29 +
>
> Hi Yuri,
>
> Thanks for adding some more detail to the thread.
>
> You say that the prepare template api does not work for you, I have not had 
> the same experience so could you share more details and ideally log a jira 
> ticket etc
>
> Regards
>
> Geoff Higginbottom
> CTO / Cloud Architect
>
> D: +44 20 3603 0542 | S: +44 20 3603 
> 0540 | M: +447968161581
>
> geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com><mailto:geoff.higginbot...@shapeblue.com>
>  | www.shapeblue.com<http://www.shapeblue.com> | 
> Twitter:@cloudstackguru<https://twitter.com/#!/cloudstackguru>
>
> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 
> 4HS
>
>
> On 29 Apr 2015, at 14:10, Yuri Kogun 
> mailto:yko...@outlook.com><mailto:yko...@outlook.com>> 
> wrote:
>
> Just wanted to add from the personal experience that the process of copying 
> template is sequential as the secondary storage can be mounted only on one 
> host in the cluster (due to SR locking issue) . We use local storage in 
> production and normally prepare the template by starting the vm with is on 
> every host in the cluster in the quiet time. The prepare_template API call 
> does not work properly.
> The other problem is that the XEN server host is unusable until the template 
> copy is finished and all other calls to start VM's on the host will have to 
> wait.
>
> Best regards
> Yuri Kogun
> 
> From: 
> geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com><mailto:geoff.higginbot...@shapeblue.com>
> To: 
> users@cloudstack.apache.org<mailto:users@cloudstack.apache.org><mailto:users@cloudstack.apache.org>
> Subject: Re: Xen - Deploying servers from a template
> Date: Tue, 28 Apr 2015 11:58:55 +
>
> The first time a template is used, it is copied from Secondary to Primary,
> then the VM is created, and in the case of XenServer is created as a
> Œlinked clone¹. This linking of the VM to the Template means that whilst
> there are VMs allocated to Primary Storage, the templates that the VMs are

Re: Xen - Deploying servers from a template

2015-04-29 Thread Geoff Higginbottom
Hi Yuri,

Thanks for the update.  Would I be right in saying this is a local storage 
issue and if using shared storage the prepare template api functions as 
expected.

I think I've only tested when using shared storage so I will get our developers 
to look at this to see if we can include the fix in 4.5.1

Regards

Geoff Higginbottom
CTO / Cloud Architect

D: +44 20 3603 0542 | S: +44 20 3603 0540 
| M: +447968161581

geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com> | 
www.shapeblue.com | 
Twitter:@cloudstackguru<https://twitter.com/#!/cloudstackguru>

ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 
4HS


On 29 Apr 2015, at 15:45, Yuri Kogun 
mailto:yko...@outlook.com>> wrote:

Hi Geoff,

We have raised the issue with citrix cloudPlatform and I believe they are 
working on it and should  contribute the fix back to cloudstack.

The problem itself as follows

if you have more than one host in the XEN cluster with the local storage and 
send the prepare_template api call for a new template the secondary storage 
template NFS directory will be mounted as SR on all hosts in the cluster and 
you will get the following error in the log

GetStorageStats Exception:SR_BACKEND_FAILURE_40The SR scan failed  
[opterr=['INTERNAL_ERROR', 'Db_exn.Uniqueness_constraint_violation("VDI", 
"uuid", "9fc07770-b9c0-4db6-a0e0-48a24c901db7")']]

The template will be copied to the local storage on only  server in the cluster 
and you will have to repeat the command to copy the template again. The only 
way to check if the template was copied to the local storage will be to query 
the  cloud.template_spool_ref table.

Best regards
Yuri


From: geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com>
To: users@cloudstack.apache.org<mailto:users@cloudstack.apache.org>
Subject: Re: Xen - Deploying servers from a template
Date: Wed, 29 Apr 2015 10:28:29 +

Hi Yuri,

Thanks for adding some more detail to the thread.

You say that the prepare template api does not work for you, I have not had the 
same experience so could you share more details and ideally log a jira ticket 
etc

Regards

Geoff Higginbottom
CTO / Cloud Architect

D: +44 20 3603 0542 | S: +44 20 3603 0540 
| M: +447968161581

geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com><mailto:geoff.higginbot...@shapeblue.com>
 | www.shapeblue.com<http://www.shapeblue.com> | 
Twitter:@cloudstackguru<https://twitter.com/#!/cloudstackguru>

ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 
4HS


On 29 Apr 2015, at 14:10, Yuri Kogun 
mailto:yko...@outlook.com><mailto:yko...@outlook.com>> 
wrote:

Just wanted to add from the personal experience that the process of copying 
template is sequential as the secondary storage can be mounted only on one host 
in the cluster (due to SR locking issue) . We use local storage in production 
and normally prepare the template by starting the vm with is on every host in 
the cluster in the quiet time. The prepare_template API call does not work 
properly.
The other problem is that the XEN server host is unusable until the template 
copy is finished and all other calls to start VM's on the host will have to 
wait.

Best regards
Yuri Kogun

From: 
geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com><mailto:geoff.higginbot...@shapeblue.com>
To: 
users@cloudstack.apache.org<mailto:users@cloudstack.apache.org><mailto:users@cloudstack.apache.org>
Subject: Re: Xen - Deploying servers from a template
Date: Tue, 28 Apr 2015 11:58:55 +

The first time a template is used, it is copied from Secondary to Primary,
then the VM is created, and in the case of XenServer is created as a
Œlinked clone¹. This linking of the VM to the Template means that whilst
there are VMs allocated to Primary Storage, the templates that the VMs are
using will always remain on Primary Storage.

If a 2nd VM is created based on the same template, the template is already
on Primary Storage so is not copied again.

If all the VMs which were using a Template are deleted or migrated to
alternate storage, the Template is no longer required and will be deleted
from Primary Storage.

This automatic clean up can be disabled by updating the global setting
storage.template.cleanup.enabled

Regards

Geoff Higginbottom
CTO / Cloud Architect

D: +44 20 3603 0542  | S: +44 20 3603 0540
 | M: +447968161581 

geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com><mailto:geoff.higginbot...@shapeblue.com>
 | www.shapeblue.com<http://www.shapeblue.com><http://www.shapeblue.com>
 | Twitter:@cloudstackguru
<https://twitter.com/#!/cloudstackguru>

ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS


RE: Xen - Deploying servers from a template

2015-04-29 Thread Yuri Kogun
Hi Geoff, 

We have raised the issue with citrix cloudPlatform and I believe they are 
working on it and should  contribute the fix back to cloudstack. 

The problem itself as follows 

if you have more than one host in the XEN cluster with the local storage and 
send the prepare_template api call for a new template the secondary storage 
template NFS directory will be mounted as SR on all hosts in the cluster and 
you will get the following error in the log 

GetStorageStats Exception:SR_BACKEND_FAILURE_40The SR scan failed  
[opterr=['INTERNAL_ERROR', 'Db_exn.Uniqueness_constraint_violation("VDI", 
"uuid", "9fc07770-b9c0-4db6-a0e0-48a24c901db7")']]

The template will be copied to the local storage on only  server in the cluster 
and you will have to repeat the command to copy the template again. The only 
way to check if the template was copied to the local storage will be to query 
the  cloud.template_spool_ref table. 

Best regards 
Yuri 


> From: geoff.higginbot...@shapeblue.com
> To: users@cloudstack.apache.org
> Subject: Re: Xen - Deploying servers from a template
> Date: Wed, 29 Apr 2015 10:28:29 +
>
> Hi Yuri,
>
> Thanks for adding some more detail to the thread.
>
> You say that the prepare template api does not work for you, I have not had 
> the same experience so could you share more details and ideally log a jira 
> ticket etc
>
> Regards
>
> Geoff Higginbottom
> CTO / Cloud Architect
>
> D: +44 20 3603 0542 | S: +44 20 3603 
> 0540 | M: +447968161581
>
> geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com> | 
> www.shapeblue.com | 
> Twitter:@cloudstackguru<https://twitter.com/#!/cloudstackguru>
>
> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 
> 4HS
>
>
> On 29 Apr 2015, at 14:10, Yuri Kogun 
> mailto:yko...@outlook.com>> wrote:
>
> Just wanted to add from the personal experience that the process of copying 
> template is sequential as the secondary storage can be mounted only on one 
> host in the cluster (due to SR locking issue) . We use local storage in 
> production and normally prepare the template by starting the vm with is on 
> every host in the cluster in the quiet time. The prepare_template API call 
> does not work properly.
> The other problem is that the XEN server host is unusable until the template 
> copy is finished and all other calls to start VM's on the host will have to 
> wait.
>
> Best regards
> Yuri Kogun
> --------------------
> From: 
> geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com>
> To: users@cloudstack.apache.org<mailto:users@cloudstack.apache.org>
> Subject: Re: Xen - Deploying servers from a template
> Date: Tue, 28 Apr 2015 11:58:55 +
>
> The first time a template is used, it is copied from Secondary to Primary,
> then the VM is created, and in the case of XenServer is created as a
> Œlinked clone¹. This linking of the VM to the Template means that whilst
> there are VMs allocated to Primary Storage, the templates that the VMs are
> using will always remain on Primary Storage.
>
> If a 2nd VM is created based on the same template, the template is already
> on Primary Storage so is not copied again.
>
> If all the VMs which were using a Template are deleted or migrated to
> alternate storage, the Template is no longer required and will be deleted
> from Primary Storage.
>
> This automatic clean up can be disabled by updating the global setting
> storage.template.cleanup.enabled
>
> Regards
>
> Geoff Higginbottom
> CTO / Cloud Architect
>
> D: +44 20 3603 0542  | S: +44 20 3603 0540
>  | M: +447968161581 
>
> geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com> | 
> www.shapeblue.com<http://www.shapeblue.com>
>  | Twitter:@cloudstackguru
> <https://twitter.com/#!/cloudstackguru>
>
> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS
> 
>
>
>
>
> On 28/04/2015 15:13, "cs user" 
> mailto:acldstk...@gmail.com>> wrote:
>
> Hi All,
>
> Quick question with regards to xenserver and deploying a cloudstack
> instance from a template stored within secondary storage.
>
> In this case it is secondary storage using NFS and deploying to local disk
> on the xenserver. (cloudstack 4.3, Xen 6.0.1)
>
> I believe this script is used to pull down the template:
> /opt/cloud/bin/copy_vhd_from_secondarystorage.sh
>
> I'm seeing a big variation when deploying 3 servers, for example. 2 of the
> servers might start very quickly and one may take longer.
>
> Is there any caching of th

Re: Xen - Deploying servers from a template

2015-04-29 Thread Geoff Higginbottom
Hi Yuri,

Thanks for adding some more detail to the thread.

You say that the prepare template api does not work for you, I have not had the 
same experience so could you share more details and ideally log a jira ticket 
etc

Regards

Geoff Higginbottom
CTO / Cloud Architect

D: +44 20 3603 0542 | S: +44 20 3603 0540 
| M: +447968161581

geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com> | 
www.shapeblue.com | 
Twitter:@cloudstackguru<https://twitter.com/#!/cloudstackguru>

ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 
4HS


On 29 Apr 2015, at 14:10, Yuri Kogun 
mailto:yko...@outlook.com>> wrote:

Just wanted to add  from the personal experience that the process of copying 
template is sequential as the secondary storage can be mounted only on one host 
in the cluster (due to SR  locking issue)  .  We use local storage in 
production and normally prepare the template by starting the vm with is on 
every host in the cluster in the quiet time. The prepare_template API call does 
not work properly.
The other problem is that the XEN server host is unusable until the template 
copy is finished and all other calls to start VM's on the host will have to 
wait.

Best regards
Yuri Kogun

From: geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com>
To: users@cloudstack.apache.org<mailto:users@cloudstack.apache.org>
Subject: Re: Xen - Deploying servers from a template
Date: Tue, 28 Apr 2015 11:58:55 +

The first time a template is used, it is copied from Secondary to Primary,
then the VM is created, and in the case of XenServer is created as a
Œlinked clone¹. This linking of the VM to the Template means that whilst
there are VMs allocated to Primary Storage, the templates that the VMs are
using will always remain on Primary Storage.

If a 2nd VM is created based on the same template, the template is already
on Primary Storage so is not copied again.

If all the VMs which were using a Template are deleted or migrated to
alternate storage, the Template is no longer required and will be deleted
from Primary Storage.

This automatic clean up can be disabled by updating the global setting
storage.template.cleanup.enabled

Regards

Geoff Higginbottom
CTO / Cloud Architect

D: +44 20 3603 0542  | S: +44 20 3603 0540
 | M: +447968161581 

geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com> | 
www.shapeblue.com<http://www.shapeblue.com>
 | Twitter:@cloudstackguru
<https://twitter.com/#!/cloudstackguru>

ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS





On 28/04/2015 15:13, "cs user" 
mailto:acldstk...@gmail.com>> wrote:

Hi All,

Quick question with regards to xenserver and deploying a cloudstack
instance from a template stored within secondary storage.

In this case it is secondary storage using NFS and deploying to local disk
on the xenserver. (cloudstack 4.3, Xen 6.0.1)

I believe this script is used to pull down the template:
/opt/cloud/bin/copy_vhd_from_secondarystorage.sh

I'm seeing a big variation when deploying 3 servers, for example. 2 of the
servers might start very quickly and one may take longer.

Is there any caching of the template taking place on the xen host its
self?
If a host has previously deployed a template, and is then asked to deploy
a
new instance using the template, will it have to go back to secondary
storage again or can it use a local cache of the vhd file?

Many thanks in advance for any responses.

Cheers!

Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Software 
Engineering<http://shapeblue.com/cloudstack-software-engineering/>
CloudStack Infrastructure 
Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended 
solely for the use of the individual to whom it is addressed. Any views or 
opinions expressed are solely those of the author and do not necessarily 
represent those of Shape Blue Ltd or related companies. If you are not the 
intended recipient of this email, you must neither take any action based upon 
its contents, nor copy or show it to anyone. Please contact the sender if you 
believe you have received this email in error. Shape Blue Ltd is a company 
incorporated in England & Wales. ShapeBlue Services India LLP is a company 
incorporated in India and is operated under license from Shape Blue Ltd. Shape 
Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is 
operated under license from Shape Bl

RE: Xen - Deploying servers from a template

2015-04-29 Thread Yuri Kogun
Just wanted to add  from the personal experience that the process of copying 
template is sequential as the secondary storage can be mounted only on one host 
in the cluster (due to SR  locking issue)  .  We use local storage in 
production and normally prepare the template by starting the vm with is on 
every host in the cluster in the quiet time. The prepare_template API call does 
not work properly.
The other problem is that the XEN server host is unusable until the template 
copy is finished and all other calls to start VM's on the host will have to 
wait. 

Best regards 
Yuri Kogun 

> From: geoff.higginbot...@shapeblue.com
> To: users@cloudstack.apache.org
> Subject: Re: Xen - Deploying servers from a template
> Date: Tue, 28 Apr 2015 11:58:55 +
>
> The first time a template is used, it is copied from Secondary to Primary,
> then the VM is created, and in the case of XenServer is created as a
> Œlinked clone¹. This linking of the VM to the Template means that whilst
> there are VMs allocated to Primary Storage, the templates that the VMs are
> using will always remain on Primary Storage.
>
> If a 2nd VM is created based on the same template, the template is already
> on Primary Storage so is not copied again.
>
> If all the VMs which were using a Template are deleted or migrated to
> alternate storage, the Template is no longer required and will be deleted
> from Primary Storage.
>
> This automatic clean up can be disabled by updating the global setting
> storage.template.cleanup.enabled
>
> Regards
>
> Geoff Higginbottom
> CTO / Cloud Architect
>
> D: +44 20 3603 0542  | S: +44 20 3603 0540
>  | M: +447968161581 
>
> geoff.higginbot...@shapeblue.com | www.shapeblue.com
>  | Twitter:@cloudstackguru
> <https://twitter.com/#!/cloudstackguru>
>
> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS
> 
>
>
>
>
> On 28/04/2015 15:13, "cs user"  wrote:
>
>>Hi All,
>>
>>Quick question with regards to xenserver and deploying a cloudstack
>>instance from a template stored within secondary storage.
>>
>>In this case it is secondary storage using NFS and deploying to local disk
>>on the xenserver. (cloudstack 4.3, Xen 6.0.1)
>>
>>I believe this script is used to pull down the template:
>>/opt/cloud/bin/copy_vhd_from_secondarystorage.sh
>>
>>I'm seeing a big variation when deploying 3 servers, for example. 2 of the
>>servers might start very quickly and one may take longer.
>>
>>Is there any caching of the template taking place on the xen host its
>>self?
>>If a host has previously deployed a template, and is then asked to deploy
>>a
>>new instance using the template, will it have to go back to secondary
>>storage again or can it use a local cache of the vhd file?
>>
>>Many thanks in advance for any responses.
>>
>>Cheers!
>
> Find out more about ShapeBlue and our range of CloudStack related services
>
> IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
> CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
> CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
> CloudStack Software 
> Engineering<http://shapeblue.com/cloudstack-software-engineering/>
> CloudStack Infrastructure 
> Support<http://shapeblue.com/cloudstack-infrastructure-support/>
> CloudStack Bootcamp Training 
> Courses<http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are intended 
> solely for the use of the individual to whom it is addressed. Any views or 
> opinions expressed are solely those of the author and do not necessarily 
> represent those of Shape Blue Ltd or related companies. If you are not the 
> intended recipient of this email, you must neither take any action based upon 
> its contents, nor copy or show it to anyone. Please contact the sender if you 
> believe you have received this email in error. Shape Blue Ltd is a company 
> incorporated in England & Wales. ShapeBlue Services India LLP is a company 
> incorporated in India and is operated under license from Shape Blue Ltd. 
> Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is 
> operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company 
> registered by The Republic of South Africa and is traded under license from 
> Shape Blue Ltd. ShapeBlue is a registered trademark.
  

Re: Xen - Deploying servers from a template

2015-04-28 Thread cs user
Hi Geoff,

Many thanks for that, very useful information and definitely explains what
I have been seeing.

Cheers!

On Tue, Apr 28, 2015 at 2:25 PM, Prashant s  wrote:

> Thanks Geoff, i wasnt aware of this global setting !  this feature will
> speed up my vm deployments 
>
> "This automatic clean up can be disabled by updating the global setting
> storage.template.cleanup.enabled"
>
>
> Thanks
> prashant S
>
> On Tue, Apr 28, 2015 at 7:58 AM, Geoff Higginbottom <
> geoff.higginbot...@shapeblue.com> wrote:
>
> > The first time a template is used, it is copied from Secondary to
> Primary,
> > then the VM is created, and in the case of XenServer is created as a
> > Œlinked clone¹.  This linking of the VM to the Template means that whilst
> > there are VMs allocated to Primary Storage, the templates that the VMs
> are
> > using will always remain on Primary Storage.
> >
> > If a 2nd VM is created based on the same template, the template is
> already
> > on Primary Storage so is not copied again.
> >
> > If all the VMs which were using a Template are deleted or migrated to
> > alternate storage, the Template is no longer required and will be deleted
> > from Primary Storage.
> >
> > This automatic clean up can be disabled by updating the global setting
> > storage.template.cleanup.enabled
> >
> > Regards
> >
> > Geoff Higginbottom
> > CTO / Cloud Architect
> >
> > D: +44 20 3603 0542  | S: +44 20 3603 0540
> >  | M: +447968161581 
> >
> > geoff.higginbot...@shapeblue.com | www.shapeblue.com
> >  | Twitter:@cloudstackguru
> > 
> >
> > ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS
> > 
> >
> >
> >
> >
> > On 28/04/2015 15:13, "cs user"  wrote:
> >
> > >Hi All,
> > >
> > >Quick question with regards to xenserver and deploying a cloudstack
> > >instance from a template stored within secondary storage.
> > >
> > >In this case it is secondary storage using NFS and deploying to local
> disk
> > >on the xenserver. (cloudstack 4.3, Xen 6.0.1)
> > >
> > >I believe this script is used to pull down the template:
> > >/opt/cloud/bin/copy_vhd_from_secondarystorage.sh
> > >
> > >I'm seeing a big variation when deploying 3 servers, for example. 2 of
> the
> > >servers might start very quickly and one may take longer.
> > >
> > >Is there any caching of the template taking place on the xen host its
> > >self?
> > >If a host has previously deployed a template, and is then asked to
> deploy
> > >a
> > >new instance using the template, will it have to go back to secondary
> > >storage again or can it use a local cache of the vhd file?
> > >
> > >Many thanks in advance for any responses.
> > >
> > >Cheers!
> >
> > Find out more about ShapeBlue and our range of CloudStack related
> services
> >
> > IaaS Cloud Design & Build<
> > http://shapeblue.com/iaas-cloud-design-and-build//>
> > CSForge – rapid IaaS deployment framework
> > CloudStack Consulting
> > CloudStack Software Engineering<
> > http://shapeblue.com/cloudstack-software-engineering/>
> > CloudStack Infrastructure Support<
> > http://shapeblue.com/cloudstack-infrastructure-support/>
> > CloudStack Bootcamp Training Courses<
> > http://shapeblue.com/cloudstack-training/>
> >
> > This email and any attachments to it may be confidential and are intended
> > solely for the use of the individual to whom it is addressed. Any views
> or
> > opinions expressed are solely those of the author and do not necessarily
> > represent those of Shape Blue Ltd or related companies. If you are not
> the
> > intended recipient of this email, you must neither take any action based
> > upon its contents, nor copy or show it to anyone. Please contact the
> sender
> > if you believe you have received this email in error. Shape Blue Ltd is a
> > company incorporated in England & Wales. ShapeBlue Services India LLP is
> a
> > company incorporated in India and is operated under license from Shape
> Blue
> > Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in
> Brasil
> > and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd
> is
> > a company registered by The Republic of South Africa and is traded under
> > license from Shape Blue Ltd. ShapeBlue is a registered trademark.
> >
>


Re: Xen - Deploying servers from a template

2015-04-28 Thread Prashant s
Thanks Geoff, i wasnt aware of this global setting !  this feature will
speed up my vm deployments 

"This automatic clean up can be disabled by updating the global setting
storage.template.cleanup.enabled"


Thanks
prashant S

On Tue, Apr 28, 2015 at 7:58 AM, Geoff Higginbottom <
geoff.higginbot...@shapeblue.com> wrote:

> The first time a template is used, it is copied from Secondary to Primary,
> then the VM is created, and in the case of XenServer is created as a
> Œlinked clone¹.  This linking of the VM to the Template means that whilst
> there are VMs allocated to Primary Storage, the templates that the VMs are
> using will always remain on Primary Storage.
>
> If a 2nd VM is created based on the same template, the template is already
> on Primary Storage so is not copied again.
>
> If all the VMs which were using a Template are deleted or migrated to
> alternate storage, the Template is no longer required and will be deleted
> from Primary Storage.
>
> This automatic clean up can be disabled by updating the global setting
> storage.template.cleanup.enabled
>
> Regards
>
> Geoff Higginbottom
> CTO / Cloud Architect
>
> D: +44 20 3603 0542  | S: +44 20 3603 0540
>  | M: +447968161581 
>
> geoff.higginbot...@shapeblue.com | www.shapeblue.com
>  | Twitter:@cloudstackguru
> 
>
> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS
> 
>
>
>
>
> On 28/04/2015 15:13, "cs user"  wrote:
>
> >Hi All,
> >
> >Quick question with regards to xenserver and deploying a cloudstack
> >instance from a template stored within secondary storage.
> >
> >In this case it is secondary storage using NFS and deploying to local disk
> >on the xenserver. (cloudstack 4.3, Xen 6.0.1)
> >
> >I believe this script is used to pull down the template:
> >/opt/cloud/bin/copy_vhd_from_secondarystorage.sh
> >
> >I'm seeing a big variation when deploying 3 servers, for example. 2 of the
> >servers might start very quickly and one may take longer.
> >
> >Is there any caching of the template taking place on the xen host its
> >self?
> >If a host has previously deployed a template, and is then asked to deploy
> >a
> >new instance using the template, will it have to go back to secondary
> >storage again or can it use a local cache of the vhd file?
> >
> >Many thanks in advance for any responses.
> >
> >Cheers!
>
> Find out more about ShapeBlue and our range of CloudStack related services
>
> IaaS Cloud Design & Build<
> http://shapeblue.com/iaas-cloud-design-and-build//>
> CSForge – rapid IaaS deployment framework
> CloudStack Consulting
> CloudStack Software Engineering<
> http://shapeblue.com/cloudstack-software-engineering/>
> CloudStack Infrastructure Support<
> http://shapeblue.com/cloudstack-infrastructure-support/>
> CloudStack Bootcamp Training Courses<
> http://shapeblue.com/cloudstack-training/>
>
> This email and any attachments to it may be confidential and are intended
> solely for the use of the individual to whom it is addressed. Any views or
> opinions expressed are solely those of the author and do not necessarily
> represent those of Shape Blue Ltd or related companies. If you are not the
> intended recipient of this email, you must neither take any action based
> upon its contents, nor copy or show it to anyone. Please contact the sender
> if you believe you have received this email in error. Shape Blue Ltd is a
> company incorporated in England & Wales. ShapeBlue Services India LLP is a
> company incorporated in India and is operated under license from Shape Blue
> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil
> and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is
> a company registered by The Republic of South Africa and is traded under
> license from Shape Blue Ltd. ShapeBlue is a registered trademark.
>


Re: Xen - Deploying servers from a template

2015-04-28 Thread Geoff Higginbottom
The first time a template is used, it is copied from Secondary to Primary,
then the VM is created, and in the case of XenServer is created as a
Œlinked clone¹.  This linking of the VM to the Template means that whilst
there are VMs allocated to Primary Storage, the templates that the VMs are
using will always remain on Primary Storage.

If a 2nd VM is created based on the same template, the template is already
on Primary Storage so is not copied again.

If all the VMs which were using a Template are deleted or migrated to
alternate storage, the Template is no longer required and will be deleted
from Primary Storage.

This automatic clean up can be disabled by updating the global setting
storage.template.cleanup.enabled

Regards

Geoff Higginbottom
CTO / Cloud Architect

D: +44 20 3603 0542  | S: +44 20 3603 0540
 | M: +447968161581 

geoff.higginbot...@shapeblue.com | www.shapeblue.com
 | Twitter:@cloudstackguru


ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS





On 28/04/2015 15:13, "cs user"  wrote:

>Hi All,
>
>Quick question with regards to xenserver and deploying a cloudstack
>instance from a template stored within secondary storage.
>
>In this case it is secondary storage using NFS and deploying to local disk
>on the xenserver. (cloudstack 4.3, Xen 6.0.1)
>
>I believe this script is used to pull down the template:
>/opt/cloud/bin/copy_vhd_from_secondarystorage.sh
>
>I'm seeing a big variation when deploying 3 servers, for example. 2 of the
>servers might start very quickly and one may take longer.
>
>Is there any caching of the template taking place on the xen host its
>self?
>If a host has previously deployed a template, and is then asked to deploy
>a
>new instance using the template, will it have to go back to secondary
>storage again or can it use a local cache of the vhd file?
>
>Many thanks in advance for any responses.
>
>Cheers!

Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build
CSForge – rapid IaaS deployment framework
CloudStack Consulting
CloudStack Software 
Engineering
CloudStack Infrastructure 
Support
CloudStack Bootcamp Training Courses

This email and any attachments to it may be confidential and are intended 
solely for the use of the individual to whom it is addressed. Any views or 
opinions expressed are solely those of the author and do not necessarily 
represent those of Shape Blue Ltd or related companies. If you are not the 
intended recipient of this email, you must neither take any action based upon 
its contents, nor copy or show it to anyone. Please contact the sender if you 
believe you have received this email in error. Shape Blue Ltd is a company 
incorporated in England & Wales. ShapeBlue Services India LLP is a company 
incorporated in India and is operated under license from Shape Blue Ltd. Shape 
Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is 
operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company 
registered by The Republic of South Africa and is traded under license from 
Shape Blue Ltd. ShapeBlue is a registered trademark.