Creating a Linux VM with startup script in Azure(2/2)

Aditya Garg
3 min readJun 18, 2022


This post is a continuation from, specifically its a longer alternative to Step 4 which may/may not be very useful.

ii-Use an extension for Linux:

Choose Custom Script for Linux(By Microsoft).

Click on Create on Next page.

Now,we are prompted for Installation of Extension.

We need to upload a .sh file to Azure Storage.

I am creating a new Storage Account, followed by a container to upload the script as a blob. Note that names must be unique across Azure.

You may choose an existing storage account and container or create a container in an existing storage account.

Select the Storage account and create a Container.

Click on Create above.

Select the container and upload the script as a blob.

Get the script here. This has same content as the previously entered content using ‘Custom Data’ in i.

More details on how to generate same using Windows in a later post.

Choose this script and click Select.

Pheww,that was some work! Lastly, update the Command to reflect the script name.

(Linux can execute scripts using the command sh script-path/name or bash script-path/name )

Click on Ok.

Review+Create ,skipping the Tags section.



Aditya Garg

Cloud Consultant |Zumba Enthusiast | Seaside Lover | 2XAzure, 1XAWS, 1XCCNP, 1XCCNA