deployVirtualMachine Deploy a VM zoneid globalzoneid serviceofferingid globalserviceofferingid diskofferingid globaldiskofferingid templateid globaltemplateid account admin domainid 1 displayname TempSyncVM group group1 networkids globalnetworkid id vmid select id from volumes true Getting volume id for the VM created instance_id vmid id volumeid stopVirtualMachine Stop the Virtual Machine id vmid createTemplate Create template volumeid volumeid name privatetemplatename displaytext newtext osTypeId 12 account admin domainid 1 id privatetemplateid listtemplate.sh List template directory after it was created h secondary_storage_ip s secondary_storage_dir p template_path removetemplate.sh Removing template file from secondary storage h secondary_storage_ip s secondary_storage_dir p template_path ms.sh Restarting management server h ms1 o restart ms.sh Restarting management server h ms2 o restart sleep.sh Sleep for 4 min s 240 createTemplate Create template volumeid volumeid name privatetemplatename displaytext newtext osTypeId 12 account admin domainid 1 id privatetemplateid listtemplate.sh List template directory after it was created h secondary_storage_ip s secondary_storage_dir p template_path corrupttemplate.sh Corrupting template file on secondary storage h secondary_storage_ip s secondary_storage_dir i privatetemplateid a 2 ms.sh Restarting management server h ms1 o restart ms.sh Restarting management server h ms2 o restart sleep.sh Sleep for 4 min s 240 listtemplate.sh true Verify that template got removed from the secondary storage by template sync h secondary_storage_ip s secondary_storage_dir p template_path createTemplate Create template volumeid volumeid name privatetemplatename displaytext newtext osTypeId 12 account admin domainid 1 id privatetemplateid listtemplate.sh List template directory after it was created h secondary_storage_ip s secondary_storage_dir p template_path createfaketemplate.sh Corrupting template file on secondary storage h secondary_storage_ip s secondary_storage_dir i privatetemplateid a 1 dir 300556 ms.sh Restarting management server h ms1 o restart ms.sh Restarting management server h ms2 o restart sleep.sh Sleep for 4 min s 240 listtemplate.sh true Verify that template got removed from the secondary storage by template sync h secondary_storage_ip s secondary_storage_dir p /template/tmpl/1/300556/template.properties createTemplate Create template volumeid volumeid name privatetemplatename displaytext newtext osTypeId 12 account admin domainid 1 id privatetemplateid listtemplate.sh List template directory after it was created h secondary_storage_ip s secondary_storage_dir p template_path removetemplate.sh Removing template file from secondary storage h secondary_storage_ip s secondary_storage_dir p template_path ms.sh Stopping management server h ms1 o stop ms.sh Stopping management server h ms2 o stop ms.sh Starting management server h ms1 o start ms.sh Starting management server h ms2 o start sleep.sh Sleep for 4 min s 240 createTemplate Create template volumeid volumeid name privatetemplatename displaytext newtext osTypeId 12 account admin domainid 1 id privatetemplateid listtemplate.sh List template directory after it was created h secondary_storage_ip s secondary_storage_dir p template_path ms.sh Restarting management server h ms1 o restart ms.sh Restarting management server h ms2 o restart sleep.sh Sleep for 4 min s 240 deployVirtualMachine Deploy vm from private template after management server was rebooted zoneid globalzoneid serviceofferingid globalserviceofferingid diskofferingid globaldiskofferingid templateid privatetemplateid account admin domainid 1 displayname PrivateTempSyncVM group group2 networkids globalnetworkid id vmid registerTemplate Register template name registername displaytext registerdisplay url globaltemplateurl ostypeid 12 format vhd zoneid globalzoneid account admin domainid 1 id privatetemplateid sleep.sh Sleep for 5 min s 300 listtemplate.sh List template directory after it was created h secondary_storage_ip s secondary_storage_dir p template_path removetemplate.sh Removing template file from secondary storage h secondary_storage_ip s secondary_storage_dir p template_path ms.sh Stopping management server h ms1 o stop ms.sh Stopping management server h ms2 o stop ms.sh Starting management server h ms1 o start ms.sh Starting management server h ms2 o start sleep.sh Sleep for 15 seconds s 15 destroyVirtualMachine Destroy virtual machine as a part of cleanup id vmid