Updating the lapextension script for all Kyvos nodes
If you encounter any issue regarding AZCopy, you must update the lapextension script for Virtual Machine Scale Set (VMSS) and VMs for all Kyvos nodes, including dedicated compute.
The following procedure demonstrates how to update the lapextension script for Virtual Machine Scale Set (VMSS). You can apply the same steps to Virtual Machines (VMs).
To update the lapextension script on Azure portal, perform the following steps.
Log in to the Azure Portal.
Search for Virtual Machine Scale Set.
On the Virtual Machine Scale Set page, search and navigate to your dedicated compute VMSS.
In the left pane, navigate to Extensions + applications.
In the Extensions tab, select the custom script named as lapextension.
Select the base64-encoded bootstrap script from the Dedicated Compute Extension from the VMSS on the Azure Portal.
Execute the following command to decode the script. In the command, replace the ENCODED_SCRIPT_TEXT with the base64 encoded bootstrap script (selected in step 6).
echo "ENCODED_SCRIPT_TEXT" | base64 --decode >> DedicatedCompute.shUpdate the following lines in the decoded script (decoded in step- 7):
echo curl -o /tmp/azcopy.tar.gz $AZCOPY_DOWNLOAD_URL |& tee -a $OUT_FILENAME >/dev/null
curl -o /tmp/azcopy.tar.gz $AZCOPY_DOWNLOAD_URL 2>>$OUT_FILENAME >/dev/nullto
echo curl -Lo /tmp/azcopy.tar.gz $AZCOPY_DOWNLOAD_URL |& tee -a $OUT_FILENAME >/dev/null
curl -Lo /tmp/azcopy.tar.gz $AZCOPY_DOWNLOAD_URL 2>>$OUT_FILENAME >/dev/nullExecute the following command to encode the script:
base64 Dedicated_Compute.sh >> Encoded_BootstrapUninstall the lapextension from VMSS.
Run the following command from Azure CLI to add the updated lapextension script. In the command, replace the <ENCODED_SCRIPT_TEXT> with the encoded text generated in step 9.
az vmss extension set --resource-group KYVOS-RG --vmss-name KyvosDedicatedCompute --name CustomScript --publisher Microsoft.Azure.Extensions --version 2.1 --settings '{}' --protected-settings "{\"commandToExecute\": \"echo <ENCODED_SCRIPT_TEXT> | base64 -d > /tmp/init.sh && chmod +x /tmp/init.sh && /tmp/init.sh\"}"