Reset the Password on Azure VM – ARM

We’ve all been there.  You have an old VM that you haven’t booted up for a while, and you need to use it for something.  You open the Azure Portal, find it in a Resource Group and Click Start.

Without fail your trusty VM starts and then you click the Connect Button, but when you try to log in nothing.  You try over and over…NOTHING!


So, you wonder to yourself “Can’t I just reset the password on my Azure VM”?  You look in the portal at your VM and your dreams are coming true!  You see that there is a button named “Reset Password”.

resetpasswordSo you click the click the link, and your dreams are dashed…Seriously?!

dangAt this point it seems that the only thing you can do would be to just delete the VM and start over.

Don’t!  You can use some simple PowerShell to reset the the Administrator Account Name and Password.  Below are the instructions to make this happen.

Hope you enjoy this!







Renaming the Administrator Account and Resetting the Password on an Azure VM using PowerShell

1.  Open a PowerShell ISE Window and in the Console Pane Login to Azure Resource Manager. (Note:  This doesn’t work on Classic VMs.)


loginarmps2.  Once logged into Azure paste this code into the console pane (or download the script here)

$rgName = “RgNameHere”
$vmName = “VmNameHere”
$extName = “MyVMAccessExt”
$userName = “NewUserName”
$password = “!MyNewPasswordHere911″

Set-AzureRmVMAccessExtension -ResourceGroupName $rgName `
                                                          -VMName $vmName `
                                                          -Name $extName `
                                                          -UserName $userName `
                                                          -Password $password

3.  You will need to update the variables with the information for your VM.

  • $rgName  - This is your Resource Group where the VM is located.
  • $vmName – The Name of your VM.
  • $userName – The User Name that the built-in Administrator account will become.
  • $password - The new password for the above user account.

4.  This is how the script will look in the Console Pane once you have updated all of the variables.


5.  Once you have updated the variables you can go ahead and run the script by pressing the Green Play button.  (Note:  you will be prompted to save the script)


6.  While the script is running your VM’s Status will show as “Updating”.


7.  After the script has completed this should be the return that you receive from Azure.



You can now go back to the portal – Click Connect and use the username and password that you just put into the script and log back into your VM.

Couple of important points:

A:  The script that you just used has a password in it and when you pressed the play button it prompted you to save that file.  That means you just saved a file on your hard-drive with a clear text password.  Go change varible to something other than your password and save that file again.

B:  This post only works on Azure Resource Manager VMs.

C:  I didn’t try this on a Domain Joined VM, so not sure how it will react.  I would assume it would change the local administrator password.

Take Care,



5 New Online Courses – Docker, Azure Logic Apps, Developing in Azure Cloud Services, Web Apps w/Redis and Azure Search

The Opsgility team has been busy since the beginning of the year, working diligently to deliver you the best in Microsoft Azure training!

Super Man on computer Photo

Check out our newly published courses:

Course Title



Introduction to Docker on Microsoft Azure 1+ hours of video and 2 hours of lab exercises Manesh Raveendran
Integrating Applications with Azure Logic Apps 1+ hours of video and almost 3.5 hours of lab exercises Manesh Raveendran
Introduction to Developing Cloud Services 1 hour 49 minutes of video and 6 hours 44 minutes of lab exercises Manesh Raveendran
Building Scalable Web Apps with Redis Cache 1+ hours of video and 2 hours and 22 mins of lab exercises Manesh Raveendran
Building Search Aware Apps With Azure Search 1+ hours of video and 3+ hours of lab exercises Manesh Raveendran

We appreciate your feedback so please be sure to comment in each course!  Happy learning!

Install the Azure CLI Tool on ubuntu

Welcome back to the series I’ve been doing on OSS Tools in Azure.  The Azure CLI tool is extremely powerful and available on both the Windows and Linux Platforms.  In this Blog post I’m going to help you install the Azure CLI tools on the LinuxVM that we built in the last post.

These same steps will work on your local Ubuntu Machines I just happen to be installing it on a VM that is already running in Azure.

Let’s do this!







Task 1:  In this exercise you will install the Azure CLI Tools for Linux using the advanced packaging tool (apt).

After logging into the Unbuntu VM first you should go ahead an do a quick update to the VM.  To update the machine running the following command:

sudo apt-get update


 Next you will install the nodejs-legacy tools by running:

sudo apt-get install nodejs-legacy


NOTE:  You will be prompted with an amount of diskspace that will be used by the installation.  Simply press ‘Y’. 

Then you will see an output of many screens that looks like this:


 Next install the Node Package Manager Tools with this command

sudo apt-get install npm

You will see many screens of output such as this during this part of the installation.

NOTE:  You will be prompted with an amount of diskspace that will be used by the installation.  Simply press ‘Y’.

Final step is to use the Node Package Manager or npm to install the Azure CLI Tools.

sudo npm install -g azure-cli

You will see many screens of information as the npm is running the installation.


After a successful installation run the Azure CLI Tool using the Azure command



Now that you have installed the tool let’s get logged into Azure!

Task 2:  Logging into Azure with the CLI Tool

At the Linux command Prompt type the following Command:

azure login

You will see a screen that asks you to open a web browser and navigate to an Azure Web Page to authenticate and a code to enter.  In my case the code is AUFNCWJD8.  When you arrive at the screen you will enter the code and then be asked to login to your Azure Subscription.


Once you have logged into your Azure Subscription Successfully you will be directed to this webpage.


You can then close this page and move back over to your puTTY session still connected your LinuxVM.

You will now see that your Login was successful and that your Azure Subscriptions was added.


You have now successfully logged into Azure via the CLI tool on your VM running in Azure!

Task 3:  Run some Azure Commands

Here are some commands that you can run to see items that are in your Azure subscription.  Take note that the Azure CLI tool by default is in Service Management Mode, but can see Azure Resource Manager items by changing modes.

Get a help with the Azure CLI Tool:

azure –help


List your Azure Accounts

azure account show


List Virtual Machines using this command:

azure vm list


List Virtual Networks using this command:

azure network vnet list


Well I hope this helped you get to know the Azure CLI on Linux.


Creating and Deploying a Linux VM using Azure Resource Manager Templates

Creating an ARM Template

In this post I’m going to show you how to create a simple ARM template using Visual Studio.  The template you create will deploy an Ubuntu Linux VM along with all other pieces required to make the VM functional.




First things first…

Task1: Create a new ARM Template:

Launch Visual Studio 2015+ (with the 2.8.1+ Azure SDK and tools installed).

Click File, New, Project

1LinuxArmSelect Template, and then click Azure Resource Group.

2LinuxArmSelect Blank Template

3LinuxArmOpen the DeploymentTemplate.json file.


NOTE:  If you do not see the JSON Outline window, click View -> Other Windows -> JSON Outline.

Right click on resources, and click Add New Resource.

5LinuxArmChoose a Storage Account resource, and name it linuxvm, and then click Add.


Note:  Make sure to use only lowercase letters in the storage account name here and keep it short.

Right click on resources, and Add New Resource.

8LinuxArmSelect Virtual Network, and name the resource armVNET. Click Add to add the resource.

9LinuxArmAgain, Right Click on Resources and choose Add a new resource.


This time, select Ubuntu Virtual Machine and name the resource linuxVM. Specify the vmStorageAccount, and the first subnet in the armVNET virtual network.

11LinuxArmAdd another resource.


Here add a Public IP Address resource. Name the resource linuxPubIP and ensure the linuxVMNic network interface is selected.


 Save the DeploymentTemplate.json file.

Ok, so you have done it! You created your first ARM Template using Visual Studio!  That’s a pretty big deal for an IT guy like me, so I’m sure you are felling excited.

Now, with the ARM template you created we are half way there to creating our brand new Linux VM in Azure.  You are going to build an infrastructure with code!

The next steps will take you through the process to use the template you just created to now deploy all of those resources into Azure.  You might be familiar with doing this from the Azure Portal, but now using templates we can actually run the deployment from Visual Studio.

Task 2:  Deploy the LinuxVM to Azure using Visual Studio

In Visual Studio Click VIEW, and then click Server Explorer.

14LinuxArmIn Server Explorer, right click on the Azure node, and then click Connect to Microsoft Azure Subscription. When you are prompted, login with the account for your Azure Subscription.

15LinuxArmRight click on the ARMLAB project, click Deploy, and then select New Deployment.

16LinuxArmClick the Resource group drop down and select <Create New>.


 Specify the Resource group name as ARMLAB and click Create.

 18LinuxArmClick the Edit Parameters button.


 Specify the following configuration settings and click Save:

  1. linuxVMName: ubuntuvm
  2. linuxVMAdminUserName: demouser
  3. linuxVMAdminPassword: demo@pass1
  4. linuxPubIPDnsName: a unique name for the DNS name of the public IP. This should be a globally unique value.


NOTE:  You can use PowerShell to determine if the DNS name is available for use.  Open a PoweShell window and Run the following two commands:

Add-AzureAccount – enter your Azure Credentials.


Next run Test-AzureName -Service -Name YourVMNameHere if the return from Azure is False then the Name is unique and can be used.


 Click Deploy to deploy the template.


You will be prompted for the password that should be assigned to the username that you entered. Use the password of demo@pass1


Switch to the Output tab and wait until the template has successfully been deployed before proceeding.


 Alright!  Now our Linux VM is deployed and up and running!  Let’s get connected to the VM and see how it runs!

Task 3: Validate that the template deployed by connecting to your VM

Download putty from: to your desktop.


 Launch the Azure Preview Portal

Click Virtual Machines.


Click the virtual machine LinuxVM


 Copy the PUBLIC IP ADDRESS to the clipboard.

110LinuxArmLaunch Putty by double clicking the icon on your desktop. Paste the IP address into the host name field and click Open.

36LinuxArmClick Yes when prompted.


 Login using the previously used credentials:

  • User: demouser
  • Password: demo@pass1


There you go!  Now you are connected to your LinuxVM that you created in Azure.

In my next post I will show you how to install the Azure CLI tools to get up and running with managing Azure in Linux.  Until then enjoy your new OSS machine in Azure.



Using Docker in Azure DevTest Labs

In my first post about Azure DevTest Labs we got you up and running by creating the environment with only a few clicks.  In this post we will try some Open Source by building a Linux VM running Docker.  This is possible using the Artifacts that are included with DevTest Labs to easily create a VM with the Docker Software already installed.





Build a Linux Virtual Machine with Docker installed in the DevTest Lab

Using Azure DevTest Labs is all about working the VMs.  Using these steps we will build an Ubuntu Linux Virtual Machine (VM) will in the ContosoDevTestLab.

Locate the ContosoDevTestLab on the Dashboard of the Portal and click the link.


This will load the Lab VM Blade.  Type a name in the field – in my case I used the name LabVM2.

72dtlabsNext click Base Configure require settings which will open the Lab VM Base Blade.


On the Lab VM Base Blade click Ubuntu Server.


Next enter the User Name = demouser and Password = demo@pass1.


Next Click the VM Size link to assign a new VM Size.


Find and Click the D1 Standard_D1 VM size and then click Select

 77dtlabsClick Artifacts.


 On the Artifacts Blade click Docker.


 Click Add.


Notice how the portal shows that 1 Artifact has been selected for this VM.


 Click Ok.


The Lab VM Configure Settings Blade should look like this now.


 Click Create.


Step by Step – Connect to the Linux VM

Once the Ubuntu Server virtual machine LabVM2 is created the next step will be to connect and verify that Docker was installed.

Note:  You will need to download puTTY for this exercise if you don’t already have it installed on your machine.


 Locate the ContosoDevTestLab on the Dashboard of the Portal and click the link.


On the ContosoDevTestLab Blade locate the My VMs section and Click on LabVM2 (or whatever you named your VM).


This will open the LabVM2 Virtual Machine Blade.  Click on the Public IP Address.


This will open the lbvm2 Public IP Address.  Copy the DNS Name into your clipboard to copy into puTTY to connect to your Ubuntu Server.




Launch puTTY by double clicking the icon. Paste the DNS NAME or IP address into the host name field and click Open.


Click Yes when prompted.

91dtlabsLogin using the previously used credentials:

  • User: demouser
  • Password: demo@pass1

To verify Docker is installed, use the following command:

sudo docker info


Use the docker version command to get information on currently installed Docker client and daemon.

sudo docker version


That’s It! You have a Linux VM running inside of your Azure DevTest Labs that has Docker installed!  You can read more about using Docker on Azure by going here.


Azure Dev/Test Labs


There is almost universal agreement that Development and Test environments, or “DevTest” as it’s known, should be moved to the Cloud.

DevTest is probably the only workload that doesn’t have corporate issues slowing down its migration.  Aside from the security and backup of a company’s source code, there’s no reason for IT managers to balk nor are there regulatory or compliance rules that are stopping the march of DevTest to the Cloud.

That being said teams still need to get up and running with a brand new environment. They will have to build VMs, Virtual Networks etc in order to have a functional network.  This can stretch the abilities of the team as it requires quite a bit of experience working with infrastructure.

To solve these problems and let developers and testers do what they do best Microsoft has developed a turnkey solution for DevTest in the Cloud:  Azure DevTest Labs.

Azure DevTest Labs was designed with one goal is mind to enable development teams to leverage the strength and flexibility of the cloud without the complication of having to build from scratch all of the infrastructure to make that possible.

In this post I’m going to help you get up and running with Azure Dev/Test Lab.  Currently it is in preview, but you should be able to find information about it on their site here.

In my next post I will feature how to build a Linux VM with Docker in your new Lab. 





Create a DevTest Lab in Azure

Much like anything in Azure creating a DevTest Lab is fast and easy.  Azure takes care of the hard parts for development teams allowing them to get up in running almost immediately.

The DevTest Labs can be found in the Azure Marketplace and will require only a few inputs to consider prior to creation.  The first will be creating or choosing an Azure subscription that will be used to create the Lab and the second being the location.


Step by Step – Building an Azure DevTest Lab

In order to create the DevTest Lab use Microsoft or Organization account to login to the Azure Preview portal to start.

Open a browser and navigate to

Enter the account associated with a Microsoft Azure subscription.


 If the account is associated with an organization account and a Microsoft account there could be a prompt to choose which one to authenticate with for Microsoft Azure.


 After logging into the Azure Portal next create a New DevTest Lab in Azure

Click the +NEW button in the portal.


Click See all.


Click Everything and then type DevTest Labs and press enter.


 The Search will reveal the DevTest Labs link for you to click.


 This will bring up the DevTest Labs Page.  Click Create.


Then you will see the Create a DevTest Lab Blade.  Name the Lab: in the example the name ContosoDevTestLab was used.


Next Choose the Correct Subscription you wish to use for this DevTest Lab.  Please note that owners of the subscription will have full access to everything in the Lab.

Chose location for the DevTest Lab assign a Location for this lab in this case I have chosen East US. 

Click Auto Shutdown and ensure that the defaults are assigned to Enable On and Scheduled Shutdown 19:00.


Then click Create to start the process of building the DevTest Lab.


After completing these steps Azure will take care of the hard work of creating all of the resources required for the DevTest Labs.

Azure Dev/Test Labs has to be one of the coolest products I’ve seen from the Azure team to date!  It really is a fully functional environment right out of the box.

Make sure you look for the Next post where we get some Open Source Action happening in this lab!

Hope you enjoyed this post – @deltadan

Using Chef on Azure


Chef is a truly great piece of software and those that are working on DevOps most likely have run across it.  Along with software like Chef Dev/Test teams are going all in with the Cloud for their work using public cloud offerings such as Microsoft Azure.  My goal here is to help you get going quickly by combining your skills in Chef and using the Azure Marketplace server image.

In this post I will provide detailed step-by-step instructions that will guide you through the installation of Chef Server on Microsoft Azure assuming an Azure subscription has already been created. The scenarios will cover the setup Chef Server 12, BYOL (Bring You Own License), install cookbooks and bootstrapping a Windows VM (virtual machine) node with an IIS Web Server installation Cookbook.





Microsoft Azure Subscription

Local workstation instructions are for a local Windows OS or you choose or a virtual machine configured with:

  • Text Editor – Most popular ones are Atom, Sublime Text, and Notepad++ for writing Chef code amongst others.
  • Free Telnet/SSH Client for Windows – Here I will use PuTTY

Note: This lab guide is written with detailed instructions how using Windows as the client.  Some actions will be different from other OS options.

As an option you can use your Microsoft Azure subscription to create a new virtual machine using the Windows Server 2012 R2 Datacenter image as a workstation for this lab.

Exercise 1: Environment Setup

In this exercise you will setup your Chef Server environment for use throughout the rest of the exercises. This will involve downloading some tools and sample code to your local workstation that will be need to complete all the steps.

Task 1: Creating the Chef Server 12, BYOL

Go to the Azure Preview portal (, after entering your credentials the following screen will be displayed.


Azure portal

To create the Chef Server, you need to get application from the Marketplace.

First click on +New, then click on Marketplace.


Navigating to the Marketplace

In the search box type in “chef” and hit enter.  Click Chef Server 12, BYOL.


Locating Chef Server 12 in the Marketplace

After clicking on Chef Server 12, BYOL, leave the default deployment model as Classic and click on Create.


Chef Server VM Creation

In the creation process of the Chef Server VM, enter Host Name, User name, and Password.

For the purpose of this exercise, we used:

  • Host Name = chefsrv
  • User name = demouser
  • Password   = demo@pass1

Click Resource Group on the Create VM blade

Click Create a new resource group on the Resource group blade

Use the name “AzureChefRG” on the Create resource group blade

Click on OK button which takes you back to Create VM blade


Creating Resource Group

*NOTE:  We left the default A4 Standard Pricing Tier just for the purpose of this exercise. This Pricing Tier is for Azure Infrastructure Costs, not the cost of Chef Server 12, BYOL application. But if you plan to deploy Chef Server in a development or production environment, then you should follow Chef’s System Requirements as if it were On-premises requirements.

At the Create VM blade click on Optional Configuration.

Click on Network.

Click Virtual Network, on the Virtual Network blade click on Create new virtual network.

On the Create a virtual network blade type AzureVNET for Name and click OK button, click OK on Network blade, click OK on Optional config blade and click on Create button on the Create VM blade.


Creating Virtual Network

One the next screen you’ll notice, that the cost to use Chef Server 12, BYOL is $0.00 USD, so click on the Purchase button to complete the installation of the VM.

Note: When you click on the Purchase button, it will take you back to the Azure Preview portal where you will the VM for Chef Server 12 being created.




















Buy blade for Chef Server, BYOL VM


Azure Portal creating Chef Server, BYOL VM

Once completed, it will display all the VM Settings and it should be up running automatically.


Screen details when Chef Server, BYOL VM completes

Task 2: Completing Chef Server Installation

When confirming that the Chef Server VM was successfully created and running, you will need to use a SSH and telnet client tool of your preference to establish a connection to the Chef Server.  You will need to connect use the external DNS name for the Chef Server.

For this lab demo we’ll use PuTTY, copy and paste the Host Name details and create a friendly name to save it under Saved Sessions.

To find the external URL of the Cloud Service where your Chef Server resides use the following steps:  Browse to

Click Resource Groups and then AzureChefRG


Once the Resource Group Loads click the Cloud Service icon and verify you see the Chef Server VM.  Then locate the Site URL that you will use to  connect to the Chef Server from the internet for the rest of this lab.  In our example here the Site URL is  


Find the SITEURL for the Cloud Service












PuTTY Configuration

Click the Yes button to get past the PuTTY Security Alert dialog box.









PuTTY Security Alert dialog box

Once you enter the User name and Password credential used during the creation of your VM, you will need update the hostname property of the Chef Server to the Site URL.  Enter the following command.


NOTE:  Make sure to use the site URL for the server name.

Once the Chef Server has been reconfigured then enter the setup syntax to complete the installation of Chef Server 12, BYOL.  (Replace the hostname with the SITE URL name that we used to connect to the puTTY session.



Command used to complete Chef Server setup

You will then be prompted to for your First Name, Last Name, Email, and Organization Name.  Complete these using your information, but for the organization make sure to type azurechef (no spaces and no capitals letters).






NOTE: You must use azurechef or the rest of this lab will not work properly.

Type Yes to accept the Chef License Agreement





Once Chef Server has finished installing, you get the following message.


Chef Server completion and important details

Exercise 2: Chef Server Configuration

Task 1: Setting up Organization details

Open a browser on your local workstation and go to the Chef Manage console using the SITE URL name of your Chef Server VM. Click on Continue to this website (not recommended) link.


Chef Manage console certificate warning screen

Enter credentials and click on the Sign In button.


Chef Server Sign In screen

Once logged into the Chef Management Portal click Administration and then click gear icon under Actions.  When the menus opens click Starter Kit.



Starter Kit dialog boxes

Now click on Download Starter Kit button and click on Proceed button.


Starter Kit dialog boxes

Note: This will download the Starter Kit to the Downloads folder on the local machine.

Browse to the “Downloads” folder on the machine being used for the lab.  Right click on the file and click on Extract All




In the Select Destination and Extract Files box point the zip file to the Root of the C:\users\<user-name> directory replacing the <user-name> with your user profile name that you are using for this lab.

Note:  This zip file will create a folder called chef-repo folder that will be extracted to your local workstation signed on Users folder











Users folder on workstation where chef-repo folder resides

Next you will install the CHEF client on the local machine.  Open a new browser window and go to  Choose the correct client based on the OS you are using.

Note:  The following install steps are provided for Windows.

Click Windows and then Downloads to get the Chef Client bits.



Double click on the chef-client MSI package file that was saved to your Downloads folder.

Click Next on the Chef Client Setup Wizard and accept the terms and click Next on the following screen.

Choose all of the available packages to install to your hard drive on the Customer Setup Screen of the Chef Client Setup Wizard.











Open Explorer in Windows and find the folder c:\users\<user-name>\chef-repo\.chef then review the files that were created which should include:

  • <cheforganizationname>-validator.pem
  • <chefuser>.pem
  • knife.rb

Open the knife.rb file and update the the chef_server_url to the SITEURL of the CHEF server.  Also add a new line with the following:

ssl_verify_mode :verify_none

The knife.rb file should look the following:


Browse to the following link: to download the file. Right click the file and extract the client.rb file into the c:\users\<user-name>\chef-repo\.chef folder.

28chef The folder will look like this once you have unzipped the file to the correct directory.


Files in .chef folder

15. Next, open the client.rb file with a text editor and change the URL for the Chef Server to the Site URL the where the Chef Server Resides. Ensure you update the [SITEURL] place holder.


Note:  If you are unable to download the file that contains the client.rb file you can create it using the text found in the box above making sure to change the name of the chef_server_url to the SITEURL of your Chef Server.  This should be placed into the c:\user\userid\chef-repo\.chef folder.

To find the external SITE URL of the Cloud Service where your Chef Server resides use the following steps:

Browse to

Click Resource Groups and then AzureChefRG


Once the Resource Group Loads click each Cloud Service until you find the Cloud Service that shows your Chef Server VM.  Then locate the Site URL that you will use to update the client.rb file.


Next confirm connectivity is working from local workstation SSL connections to the Chef Server using the knife tool. Open a PowerShell console window using Run as Administrator.  Execute the following steps commands:







Confirming SSL validity from PowerShell CLI

Troubleshooting the knife command

All knife commands needs to run from the chef-repo folder of the user’s home folder on the local workstation (C:\users\<user_name>\chef-repo\), so make sure you are running from that directory.

Also verify that the client.rb file and knife.rb file point to the external name of the cloud service that contains your Chef Server.

If you experience issues with the knife tool such as the following error then you need to ensure that you have started the PowerShell window by using the Run as Administrator or you may have to restart your machine to allow the environment variables to be set.



Exercise 3: Download and Install Cookbooks

Chef cookbooks can be manually downloaded from Chef Supermarket found at  This is repository of cookbooks is created and maintained by Chef’s Community.

In this exercise you will download and extract Cookbooks using the Chef Client Tools.

Task 1: Manual Download and Extraction of Cookbooks

Open a PowerShell console window using Run as Administrator.  The following steps must be executed in this window from the directory: C:\users\<user_name>\chef-repo

Download, Extract and then delete the IIS cookbook for Windows into the C:\users\<user_name>\chef-repo\cookbooks using the following commands.







Downloading cookbooks in Administrator PowerShell from Chef Supermarket

Task 2: Upload the Cookbook to Chef Server

From an Administrator PowerShell window, you will upload the IIS cookbook for Windows to the Chef Server using the following steps:

Note: Confirm you are in the chef-repo folder before beginning.




Uploading cookbooks to Chef Server

Open a browser to your Chef Server at http://[SITE URL] which will connect you to the Chef Manage console.  Once logged in click the Policy button to and confirm the cookbook has been uploaded successfully.


Chef Manage console to confirm cookbook uploaded

Exercise 4: Bootstrapping Chef Node in Azure

Now that Chef Server 12, BYOL is fully configured on Microsoft Azure, use the following steps to bootstrap a node using the Chef Client plugin extensions. The same steps are used to bootstrap either a Linux or Windows client node.

Task 1: Bootstrap Windows Client Node

From the Azure Preview portal click on New, Click on Compute, and then Click on Windows Server 2012 R2 Datacenter in the Marketplace.


Bootstrap Windows Client node

On the Windows Server 2012 R2 Datacenter blade, leave the default deployment model as Classic, click on Create button.




On the Create VM blade, type the Host Name, User name, and Password.  In this example the Hostname was chefwin, demouser and demo@pass1 respectively.

Click on Resource Group, select AzureChefRG.


Bootstrap Windows Client node

Back on the Create VM blade, click on Optional Configuration

Click OK

Click on Endpoints,

Add the following ports for HTTP (80) and HTTPS (443)


Opening Endpoint ports

On the Optional Configuration blade, select the following.

Click on Extensions

On the Extension blade, click on +Add extension,

On the New resource blade, click Chef Client.


Adding Windows Chef Extension

Click Create on the Windows Chef blade.

Click on the empty box or blue folder icon under the Validate Key (Required) then select the azurechef-validator.pem from the c:\users\<user-name>\chef-repo\.chef folder.

Click on the empty box or blue folder icon under the Client RB (Required) then select the client.rb from the c:\users\<user-name>\chef-repo\.chef folder.

In the Run List box, type learn_chef_iis which is one of the cookbooks uploaded in earlier steps.


Complete adding Windows Chef Extension

Click OK button on the Add Extension pane,

Click OK button on the Extensions pane

Click OK button on the Optional Config pane.

Click Create button on the Create VM pane.

Once the Windows Chef node has been successfully deployed, you will see it in Chef Manage console on the Nodes tab.

If you click on the Reports tab, then click on the Run History on the left column, you will notice that the cookbook learn_chef_iis from the Run List completed with a success status.


You will also be able to verify the installation by navigating to the website using the DNS name in a browser and see the default hello world webpage install by the learn_chef_iis cookbook:

Browse to

Click Resource Groups and then AzureChefRG

Next click the name chefwin VM and locate the DNS Name



Browse to http://< to see the application running.  In our case we browse to





Way to go!

Well that’s it you have used Chef to Configure a VM in Azure!

Resources for passing Azure Exam 70-533 from Opsgility

If you are just now getting started with Azure Certification it is useful to have a roadmap on how to learn the technology in order to pass the certification.

Our team of industry recognized Azure experts have built a lot of Azure training over the years, and in this case we’ve literally written the book on how to pass the exam.

In this post, I want to share some of our online courses that map directly to the objectives for the exam. Each of these courses will cover the objective topic (and then some), and also provides in-depth hands-on lab guides that you can practice in your own Azure subscription to get the hands-on practical experience to really learn the skills being taught.

Objective Online Course
Implement Websites
Implement Virtual Machines
Implement Cloud Services
Implement Storage
Implement an Azure Active Directory
Implement Virtual Networks

If you haven’t tried us out yet, you can start learning Azure with a free 7-day trial here, you can cancel at any time.

New Course: Introduction to Automating IaaS with ARM and PowerShell

New Course

Opsgility has just launched a new online course by Azure MVP Michael Washam, Introduction to Automating IaaS with ARM and PowerShell. This course is available online or can be taught onsite at your location.

Course Description

This course explores learning how to create and configure Azure Virtual Machines and Virtual Networks using the Azure Resource Manager (ARM) PowerShell Cmdlets. This course assumes you have a solid knowledge of the features and capabilities of Azure Infrastructure as a Service and is focused on teaching and reinforcing skills with the Azure PowerShell cmdlets with ARM.

New Features for Enhanced Learning

We have recently launched several new features to enhance your learning experience with Opsgility.

Course Assignments for Individuals

Course assignments allow you to assign a goal date on when to complete a class. They are great because in addition to helping you track your learning progress they also are great for bookmarking your top courses.

Course Assignments for Teams

In team mode an administrator can assign specific courses to their team and track progress to course completion. Reporting is built in to quickly give you an update on your teams progress towards the goals you assign.

Certificates Quick View

For each course that you have completed by completing the labs and knowledge measures you will receive a certificate of completion. We have added a top level link off of the account menu to quickly see and download all of your certificates from a single location.

Course Player Enhancements

Lab Files

Lab files are now a top level download instead of associated with each individual lab.

Take Notes While Learning

You can now add notes while watching a module. Each note will capture the location within the module and when selected take you back to the spot you took the note in.

Simplified discussion

Added support for Disqus to each course. Previously, access to Opsgility expert trainers was through Yammer. To simplify interaction we have added an inline Disqus feature to answer your questions about the course or the labs.

As always, we love to hear feedback on new topics or site enhancements.