You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Donal Lafferty <do...@citrix.com> on 2013/07/03 22:44:20 UTC
Problems with using the TemplateObjectTO's checksum
I'm trying to improve the performance of CopyCommand when copying a TemplateObjectTO to a TemplateObjectTO. On Hyper-V this happens when a template is downloaded from S3 to the hypervisor's primary data store.
I notice that the checksum on a TemplateObjectTO cannot be used to verify that an uncompressed image already exists on the destination. E.g. for a System VM template, the checksum corresponds to the .bz2 file, and not the .vhd
Should I store only the compressed image, and take a performance hit during uncompression? Or can I update the checksum for the TemplateObjectTO?
Any suggestions welcome,
DL
RE: Problems with using the TemplateObjectTO's checksum
Posted by Donal Lafferty <do...@citrix.com>.
I'm happy to tweak the template.
For users creating a template from a .bz2, does CreateTemplate use the checksum of decompressed image?
DL
> -----Original Message-----
> From: Edison Su [mailto:Edison.su@citrix.com]
> Sent: 03 July 2013 10:18 PM
> To: dev@cloudstack.apache.org
> Subject: RE: Problems with using the TemplateObjectTO's checksum
>
>
>
> > -----Original Message-----
> > From: Donal Lafferty [mailto:donal.lafferty@citrix.com]
> > Sent: Wednesday, July 03, 2013 1:44 PM
> > To: dev@cloudstack.apache.org
> > Subject: Problems with using the TemplateObjectTO's checksum
> >
> > I'm trying to improve the performance of CopyCommand when copying a
> > TemplateObjectTO to a TemplateObjectTO. On Hyper-V this happens
> when
> > a template is downloaded from S3 to the hypervisor's primary data store.
> >
> > I notice that the checksum on a TemplateObjectTO cannot be used to
> > verify that an uncompressed image already exists on the destination.
> > E.g. for a System VM template, the checksum corresponds to the .bz2
> > file, and not the .vhd
> Do you update template.sql with the uncompressed template url, and
> checksum?
>
> For example, the following entry should be updated properly for both
> "checksum" field and "url" filed:
>
> INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public,
> created, type, hvm, bits, account_id, url, checksum, enable_password,
> display_text, format, guest_os_id, featured, cross_zones, hypervisor_type)
> VALUES (9, UUID(), 'routing-9', 'SystemVM Template (HyperV)', 0, now(),
> 'SYSTEM', 0, 32, 1, 'http://download.cloud.com/templates/acton/acton-
> systemvm-02062012.vhd.bz2', 'f613f38c96bf039f2e5cbf92fa8ad4f8', 0,
> 'SystemVM Template (HyperV)', 'VHD', 15, 0, 1, 'Hyperv' );
>
>
>
> >
> > Should I store only the compressed image, and take a performance hit
> > during uncompression? Or can I update the checksum for the
> TemplateObjectTO?
> >
> > Any suggestions welcome,
> >
> > DL
RE: Problems with using the TemplateObjectTO's checksum
Posted by Edison Su <Ed...@citrix.com>.
> -----Original Message-----
> From: Donal Lafferty [mailto:donal.lafferty@citrix.com]
> Sent: Wednesday, July 03, 2013 1:44 PM
> To: dev@cloudstack.apache.org
> Subject: Problems with using the TemplateObjectTO's checksum
>
> I'm trying to improve the performance of CopyCommand when copying a
> TemplateObjectTO to a TemplateObjectTO. On Hyper-V this happens when
> a template is downloaded from S3 to the hypervisor's primary data store.
>
> I notice that the checksum on a TemplateObjectTO cannot be used to verify
> that an uncompressed image already exists on the destination. E.g. for a
> System VM template, the checksum corresponds to the .bz2 file, and not
> the .vhd
Do you update template.sql with the uncompressed template url, and checksum?
For example, the following entry should be updated properly for both "checksum" field and "url" filed:
INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type)
VALUES (9, UUID(), 'routing-9', 'SystemVM Template (HyperV)', 0, now(), 'SYSTEM', 0, 32, 1, 'http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2', 'f613f38c96bf039f2e5cbf92fa8ad4f8', 0, 'SystemVM Template (HyperV)', 'VHD', 15, 0, 1, 'Hyperv' );
>
> Should I store only the compressed image, and take a performance hit during
> uncompression? Or can I update the checksum for the TemplateObjectTO?
>
> Any suggestions welcome,
>
> DL