Get Azure virtual machine extensions

Azure virtual machines have a variety of built-in extensions that can enable configuration management. There are two extensions for Windows PowerShell. The custom script extension allows you to run a script on a virtual machine at provisioning time or after it is running. The Windows PowerShell DSC Extension allows you to define the state of a virtual machine using the PowerShell Desired State Configuration language and apply it. There are also extensions that allow you to configure your virtual machines to use open source configuration management utilities such as Chef or PuppetRead More »

Defining virtual machine state in Azure

In this post, we’ll explore how we can leverage desired state configuration feature of PowerShell to define the desired configuration of Azure virtual machine. Up to this point, we’d explored how to define the OS/Size/Storage/Network and other related configuration using Get-AzureVM and associated cmdlets. What if one can go a bit further, and also define server configuration at the same time.

Do note that we’ll need to have PowerShell version 4.0 or greater on the client machine to use related commandsRead More »

Get Azure virtual machine location

The virtual machine location is the Azure region the virtual machine will be created in. The location of the virtual machine also determines the location requirement of the underlying storage, and if specified the virtual network. The virtual network and storage account must reside in the same location as the virtual machine.

The service management API enforces this requirement as well. Attempting to create a virtual machine with the storage account or the virtual network in a remote region will result in an error.Read More »

Configuration options available in New-AzureQuickVM vs New-AzureVM

Here’s quick summary of configuration options available in New-AzureQuickVM vs New-AzureVM:

New-AzureQuickVM New-AzureVMConfig and New-AzureVM
Windows and Linux supported Windows and Linux supported
Create only from image Create from image or operating system disk
Specify availability set name Specify availability set name
Specify subnet and virtual network Specify subnet and virtual network
Deploy to location or affinity group Deploy to location or affinity group
Deploy X509 certificates Deploy X509 certificates
Deploy SSH certificates on Linux virtual machines Deploy SSH certificates on Linux virtual machines
Specify DNS settings Specify DNS settings
Wait for boot switch Wait for boot switch
Disable WinRMHttps Disable WinRMHttps
Enable/Disable Windows Remote management endpoint Enable/Disable Windows Remote management endpoint
Specify Active Directory domain join information
Require admin password reset on first login
Create new or attach existing data disks
Configure endpoints (including internal and external load balancing)
Disable Windows Updates
Specify the time zone
Specify static IP addresses
Specify reserved IP address of the  cloud service/domain name

Create Azure virtual machine using PowerShell

If you are looking to create Azure virtual machine using PowerShell, you have same two options as in classic Azure management portal. To start with, you need to first authenticate to Azure using PowerShell:

#Login into Microsoft Azure

In the output, you can see current storage account associated with your subscription. If the CurrentStorageAccountName is empty, you’ll need to associate an storage account with your subscription. To do this, use Set-AzureSubscription cmdlet Read More »

Create Azure Virtual Machines using Azure Management Portal

This post will discuss how to create an Azure virtual machine using azure management portal,

When you are going to create an Azure VM, you have two options:

  1. Create Quick VM. This allows you to create VMs very quickly with only basic details such as DNS name, administrator account username and password, vm location, etc. However you cannot create VM based on image and specify other details etc.
  2. Create VM from gallery. You can use this to specify VM configuration in detail, including storage account, service names, etc.

Read More »

About Azure Virtual Machines

What is Azure Virtual Machine

Virtual machines are one of the compute options available in Microsoft Azure. Azure virtual machines are same as your normal virtual machines but they are located in Azure and hosted by Microsoft. It uses Infrastructure-as-a-service (IaaS) features from the Azure. The flexibility of virtual machines makes them a ideal scenario for many of the workloads. Both linux and windows-based operating system virtual machines allow for a diverse set of workloads. You have total control over the configuration of the VM. You are responsible for all server software installation, configuration, and maintenance, as well as operating system patchesRead More »