HOW TO: DEPLOY A LINUX AZURE VM FROM CLONED TEMPLATE USING AZURE CLI (PART 2)

In this post we are going to cover how to deploy a Linux VM using the Microsoft Azure ARM portal, Azure CLI, and the template and VHD we created in the previous post

First, you will want to ensure you have Azure CLI installed. You can download it for free here. Again, you will want to make sure you are signed into Azure CLI and have switched from asm mode to arm.

Next, in the following variables, add in the name of your existing resource group, virtual network and subnet, and add in new names for a new public IP address, network interface, and virtual machine.

And that’s it, you then should see the command executing, which will then prompt you to type in the vmName, adminUserName, adminPassword, and networkInterfaceID (copied from the azure network nic show command). Once completed successfully, you’ll see a print out like this:

Reminder: All of my posts are provided "AS IS", imply no warranties, and confer no rights or special privileges. Use of included postings, code samples and other works are subject to the terms specified at Microsoft. For more information, click here.

Comments 2

  • I have updated your script to allow for paramaterized input:

    aka:

    networkId,resourcename,VmName
    MyNetworkid,MyResource,MyVmName

    With multiple lines will ‘loop’ through as many entries as you care for. I could send you the code if you want. It also can create ‘public’ static ip addresses if you need them.

    Thomas

Leave a Reply

Your email address will not be published. Required fields are marked *

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