Configure a VM using a Custom Script Extension
In this “Configure a VM using a Custom Script Extension” IT Pro Challenges virtual lab, learners are introduced to skills required to configure a virtual machine using a custom script. The topics covered in this lab are critical for learners to be effective in Network administrators, System analysts, and Azure Administrator job roles in IT.
Knowing custom scripts to configure a VM is a valuable resource for learners who want to use a simple Windows VM to run a script utilizing the script extension.This virtual lab walks learners through the method of configuring a windows virtual machine. This IT Pro Challenge virtual lab makes it simple for learners to shape up a VM by utilizing a Microsoft Azure Portal, where they have to set all the environment specifications required to outline or configure the VM. Other guided challenges in this series are “Create and Manage a Virtual Machine Scale'' and “Work With Managed Disk Snapshots”.
Exercises in this lab teach users how to configure an app on the new server while learning the concepts of the Microsoft Azure Web portal. Learners will learn important concepts such as how a cloud operation engineers create a Windows virtual machine in Azure, how they automate the configuration of a web application on the new server. They will also get to learn how they use a custom script extension to manage a configuration script given by the application developer and how to check that the web application is loading.
Understand the scenario
In this lab you're a cloud operations engineer assigned to create a Windows virtual machine in Azure. You plan to automate the configuration of a web application on the new server. You need to use a custom script extension to run a configuration script provided by the application developer. Finally, you need to verify that the web application is loading.
Create a Windows virtual machine
In this section, learners will sign in to the Azure portal by using the given login credentials. In the next step, they will learn how to create a Windows Server virtual machine in the resource group and how to set the username and password. They will also learn how to select the size, predefining HTTP and RDP public inbound ports, and then disable all monitoring. When you create a new virtual machine, all traffic from the Internet is blocked by default. In this section, learners will also learn how to enable the RDP port in an NSG (network security group) and set values of various properties such as Resource group, Network security group, and Public IP addresses.
Add a custom script extension
In this section of the virtual lab, learners will learn how to save a copy of the PowerShell configuration script. The custom script extension is an Azure VM extension that users use to run arbitrary PowerShell code against particular VMs by utilizing the Azure API. It is useful for bringing all the Azure resources into effective action. Learners will also learn how to create a Custom Script Extension for the saved virtual machine using the already saved script file and how to test the configuration.
Azure PowerShell is a collection of cmdlets for administering Azure resources from the PowerShell command line. It provides robust characteristics for automation.
Lab Summary Conclusion
After completing the “Configure a Virtual Machine Using a Custom Script Extension challenge” you will have accomplished the following:
- Created a new Windows virtual machine
- Created a custom script extension to configure the virtual machine
- Tested the results of the configuration
This virtual lab is an important skill-set to have if you work with networks, IT infrastructure, and architecture. Having VM skills on your resume shows that you can implement and execute important virtualization technologies to accomplish the company's business goals.