profile for Gajendra D Ambi on Stack Exchange, a network of free, community-driven Q&A sites

Sunday, April 1, 2018

Deploying ubuntu linux VM on Azure via cloud azure cli or powershell

So it is quite interesting. Unlike my previous posts if you don't want to setup your machine for azure by download either python or powershell sdk or any cli locally then there is a quicker and better way.
Here is exactly what it takes to deploy a VM on azure.

  1. Create an azure account if you haven't already with pay as you go model you pay for what you use. so no worried. Use it like a lab, where you delete stuff once you are done.
  2. Launch the online azure cli. You can either use powershell or bash. Whichever you love.
  3. So first I want to create a resource group.
az group create -n linuxVms -l westus
      This btw is azure cli, not azure powershell syntax. Here I am creating a group callled linuxVms and the location of that is at the west us datacenter of azure.
      4. Now let us deploy a llinux vm from an ubuntu image
az vm create -g linuxVms -n dummyUbuntu -i UbuntuLTS --generate-ssh-keys
         So we are creating a VM and the
image is UbuntuLTS 
VM name is dummyUbuntu 
group name is linuxVms 
You are done! :)

No comments:

Post a Comment