×
Deploy custom script through VM Extensions in Windows Azure VM
Blog Cloud Computing

Deploy custom script through VM Extensions in Windows Azure VM

Deploy custom script through VM Extensions in Windows Azure VM

In this blog, we will show you the steps to deploy custom script through VM Extensions in Windows Azure VM through the portal.

 

REQUIREMENTS

  • Microsoft Azure Subscription
  • Azure VM

 

VM EXTENSION OVERVIEW

  • VM Extension will help us to do the configuration management in the Azure cloud.
  • Windows and Linux agents are automatically installed on any VMs deployed from the Azure gallery.
  • This agent is very important to manage the life cycle of the VMs through azure Application Programming Interface (API).
  • In order to add new extensions in the gallery, you have to be a Microsoft employee or whitelisted extension publisher.
  • We can always install our own agents directly into the VM.
  • The Linux agent and Microsoft Linux Extensions are available at Github.

 

DEPLOYING SCRIPT

  • Log in to Microsoft Azure portal using your subscription.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • Click on the Virtual Machines link.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • Select the VM to deploy the VM extensions and click on it. In this demo, we are using the VM named az-vm-01.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • Click on the Extension link from the VM settings.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • Now, click on the Add button.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • You can see the various types of extensions that are available for windows azure VM.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • To deploy the custom script, Click on the Custom Script Extension option.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • To create a new extension, Click on Create button.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • We have already created a sample PowerShell script file to save the windows process into a text file under C:\ drive.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • Select the script by click on the browse button.

Deploy custom script through VM Extensions in Windows Azure VM

 

Deploy custom script through VM Extensions in Windows Azure VM

 

  • Click OK to start the deployment.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • It will take several minutes to complete the deployment.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • You can see the script details and its status.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • Click on the extension name CustomScriptExtension.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • Click on View Detailed Status link.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • You can see the deployment status information.

Deploy custom script through VM Extensions in Windows Azure VM

 

VERIFICATION

  • Log in to your Azure VM with login credentials using RDP.

Deploy custom script through VM Extensions in Windows Azure VM

 

  • You can able to see the getprocess.txt file in C:\ drive.

Deploy custom script through VM Extensions in Windows Azure VM

 

VIDEO

Thanks for reading this blog. We hope it was useful for you to know about VM extensions on Microsoft Azure.

2 thoughts on “Deploy custom script through VM Extensions in Windows Azure VM”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.