Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Template registration

  • No change in user User experience during template registration
  • Once template is downloaded and installed in the secondary storage it will be post processed
  • Post processing will be handled by 2 new Agent commands - GetDataDisksCommand and CreateDataDiskTemplateCommand
    • GetDataDisksCommand
      • Will temporarily import the OVA into CloudStack to identify the ROOT disk and additional data disks present (if any). If present, path and size of each of the data disks will be returned
      • Identifying the ROOT disk (remaining disks will be considered as data disks)
        • OVA template custom property "cloud.ova.bootdisk" will be used to determine the ROOT disk. If
      it
        • this property is not set
      the
        • the first disk will be identified as the ROOT disk
        • The value of parameter “cloud.ova.bootdisk” should be in format ”<controllertype><controllerId>:<devicenumber_on_this_controller>” e.g. “cloud.ova.bootdisk”=”scsi0:2”
          • Possible values for <controllertype> - "ide" or "scsi", <controllerId> - 0, 1, 2, 3, <devicenumber_on_this_controller> - 0 to 15
          • Custom property can be added to VM before creating OVA from the VM per VMware documentation. Refer -  Modifying Virtual machine custom property
      • For each of the additional disks, Datadisk template entries will be made in the DB
        • Entries will be made in vm_templates and vm_template_store_ref table
        • Datadisk Template will be referenced to the corresponding VM template by with DB column parent_template_id where parent_template_id points to the VM template
    • CreateDataDiskTemplateCommand
      • This agent command will be invoked for each of the Datadisk templates returned by GetDataDisksCommand
      • As part of the Datadisk template creation following files will be created to represent the template
        • An OVF descriptor based on the disk properties returned by GetDataDisksCommand
        • An OVA .meta file to represent an OVA
        • template.properties file to encapsulate the properties of the Datadisk template
      • Datadisk, OVF, META and template.properties file
      data disks
      • An OVF descriptor will be created 
      • Datadisk template will be created by packaging the disk and OVF into an OVA
      • Datadisk, OVF and OVA will be present in a separate folder inside the parent template folder. e.g. -
        • Say VM template id is 206, then the 1st data disk of a template will be present in folder  - template/tmpl/2/206/1 
        • Sample contents of the Datadisk template folder will be
          • MultipleVolumes.ova MultipleVolumesmeta MultipleVolumes.ovf MultipleVolumes-disk1.vmdk
    • Template post processing will return information about each of the additional data disks present (if any).
    • Information about the data disks will include physical and virtual size of the data disk and path where the template has been installed
    • For each of the additional disks a Datadisk template will be created
      • Entries will be made in vm_templates and vm_template_store_ref table
      • Datadisk Template will be referenced to the corresponding VM template by with DB column parent_template_id where parent_template_id points to the VM template
          • template.properties


Listing templates

  • All template i.e. both VM templates and Datadisk templates will be listed.
  • Datadisk template can be differentiated from VM templates by the property templatetype
    • Datadisk templates will have templatetype set to 'Datadisk'
    • VM templates will continue to have templatetype set to 'User'
  • Following attributes will also be different for the two type of templates – bootable(set to false for Datadisk template), guestos(unset for Datadisk template)

...

  • During template post processing after download CloudStack will check the OVA template being registered if there exists multiple disks in the container.Unless the OVA has custom property "cloud.ova.bootdisk" set, the first disk in the OVA container is registered as vm template and remaining disks would be registered as data disk templates. The value of parameter “cloud.ova.bootdisk” should be in format ”<controllertype><controllerId>:<devicenumber_on_this_controller>” to VM before exporting that as OVA. Possible values for <controllertype> are "ide" or "scsi". Possible values for <controllerId> are 0, 1, 2, 3. Possible values for <devicenumber_on_this_controller> are 0 to 15. Ex: “cloud.ova.bootdisk”=”scsi0:2”. Custom property can be added to VM before creating OVA from the VM per VMware documentation http://pubs.vmware.com/vsphere-50/topic/com.vmware.vsphere.vm_admin.doc_50/GUID-88C8B72F-5753-4A2A-94B5-40EA1046C4D9.html

Change in the existing behavior

...