Adventures in Azure

By | 5 May, 2015

….this is just to show I’m not biased 😉

Here’s the equivalent process I dug out to launch a windows server VM on Azure using a command line on a Mac.

1. install node.js

2. install the azure command line tools

– npm install azure-cli -g

3. Create an “organizational account”
– Open up Azure Management Portal
– Go to Active Directory
– Click Add User
– Type of user “New User in Organization”
– Make the new user a co administrator
* Go to Settings in the nav pane of the Azure Portal
* Go to Administrators
* add the user.

4. Test connectivity :-

azure login -u username -p password

Successful message looks something like this:

info: Executing command login
warn: Please note that currently you can login only via Microsoft organizational account or service principal. For instructions on how to set them up, please read
-info: Added subscription Windows Azure MSDN – Visual Studio Ultimate
info: Setting subscription Windows Azure MSDN – Visual Studio Ultimate as default
info: login command OK

5. Download and cache the credentials.

azure account download

azure account import pathtopublishsettingsfile

info: Executing command account import
info: account import command OK

6. Create a VM….you can find the available image names using “azure vm images list”

azure vm create -l “East US” myVMName username password

And the result:

info: Executing command vm create
warn: –vm-size has not been specified. Defaulting to “Small”.
– Looking up image
+ Looking up cloud service
info: cloud service myTestAF001 not found.
+ Creating cloud service
+ Retrieving storage accounts
+ Creating VM
info: vm create command OK