Table of contents
Businesses are under constant pressure to deploy virtual machines (VMs) quickly and efficiently to meet changing demands and optimize cloud resource utilization. Managing these deployments across diverse platforms like Azure and AWS often introduces complexity and consumes valuable time.
To address these challenges, adopting a streamlined and automated approach is critical. This article highlights how XOAPβs Scripted Actions leverage the power of PowerShell to automate the provisioning of multiple VMs. By integrating this solution into their infrastructure, organizations can reduce manual workload, accelerate deployment cycles, and enhance their operational flexibility in managing cloud environments.
Quick VM deployment to Azure: Automate with Scripted Actions
With XOAP, deploying multiple virtual machines to your Azure subscription is a straightforward process that requires just three simple steps:
- Β Add a Connection to your Azure subscription
- Β Create a scripted action with defined parameters
- Β Run the scripted action to deploy multiple VMs
Step 1: Add a Connection to your Azure subscription
To start, check if you’ve added a connection to your Azure subscription. If this hasnβt been set up yet, navigate to the Connections section in XOAP. Click the green plus (+) button to create a new connection. Follow the prompts to link your Azure subscription to XOAP securely.
Once the connection is established, you can proceed with the next steps.
In the βAdd New Connectionβ slide-out panel, enter all the required connection details and click Save to complete the setup.
Β
If you need additional guidance on adding a connection in XOAP, feel free to visit our documentation page.
Step 2: Create your scripted action
Next, navigate to Platform Management and select Scripted Actions. In the upper-right corner, click the green plus (+) button to create a new Scripted Action.
Give your Scripted Action a name and select the βaz-ps-create-multiple-vm.ps1β script from the resources. Optionally, you can add tags and a description to organize and document your scripted action.
Β
In the second step, define your parameters. Some parameters are mandatory and must be provided, while others are optional. These optional parameters allow you to customize the VMs according to your specific requirements.
Explanation of Key Fields:
Number of VMs: Specifies the number of virtual machines you want to deploy.
Name Prefix: Sets the initial part of the VM names. For example, if your prefix is XOAPDemoVM, the script will automatically generate names like XOAPDemoVM001, XOAPDemoVM002, etc., by incrementing the numbering.
Digits: Defines how many digits should follow the name prefix. For example, 3 digits will result in names like XOAPDemoVM001.
PublicIpAddress: When enabled, creates a public IP address for each VM with the name format NamePrefixXX-PublicIP.
Image: If youβre using XOAP Image Management for creating images, you can retrieve the image ID from the run logs.
Step 3: Complete your setup
In the third step, select your connection and click Finish to complete the setup.
The final step is to run the Scripted Action you created. Locate your Scripted Action in the table, open the action menu, and select Run.
The Scripted Action will progress through the Queued and Running phases. Once completed, its status will change to Success, and you will be able to find your VMs in the specified Resource Group.
Get more control over cloud resource management
XOAPβs Scripted Actions are great for automating the deployment of multiple virtual machines on cloud platforms like Azure and AWS. By leveraging PowerShell scripting, it delivers greater flexibility and control over cloud resource management. This approach simplifies the deployment process, reduces complexity, and saves time, enabling IT teams to concentrate on strategic projects rather than manual configurations. Adopting automation with Scripted Actions not only improves cloud operations but also prepares your organization to scale and adapt to future technological advancements.
π Additional resources for Scripted Actions:Β
β Scripted Actions tutorial: Step by step
β Top 4 use cases for Scripted Actions
β Cross-platform cloud automation with Scripted Actions
β Scripted Actions documentation