Create Azure VM - Step by Step Guide for CSP

This document covers the steps for creating a basic Virtual machine in Azure for a customer by a CSP reseller.

Create VM using Azure Ibiza Portal for a customer as a CSP Reseller

Prerequisites

The following are the prerequisites for this section:

  1. The Customer and Azure subscription for the customer are already created by the CSP reseller.

Create VM using Ibiza Portal

  1. Visit the Microsoft Partner Center portal: https://partnercenter.microsoft.com and login using the CSP credentials.
  2. Click on "View customers" link under Customer Management section.
  3. Expand the view for the customer to view details.

  1. Click on "Microsoft Azure Management Portal" link to visit the Azure Ibiza portal on behalf of the customer.

    ( Alternatively, another option is to login directly to Azure Ibiza Portal on behalf of customer, without going through the Partner Center portal by visiting the URL https://portal.azure.com/<customer domain name here> and login using CSP credentials )

  1. The Azure Ibiza portal will open in a new tab/new window. Hover the mouse over identity icon on top right hand corner of the portal or click on it to view the Customer info.

  1. Click on "NEW" icon in the Navigation bar on the left hand side of the portal. From the menu options displayed Click on "Compute" to proceed to create a Virtual Machine for the customer. A list of templates are displayed. Select a template to view details of the template and Click on "Create" button.

  1. Fill in the details for the Virtual machine to be created like Name of the virtual machine, Admin username, password, Size of the virtual machine, etc.

  1. Click on "Create" to start the deployment of the virtual machine.

  1. Click on "Notifications" to view the status of the deployment.

  1. Wait for the deployment to complete.

Create VM using Azure PowerShell for a customer as a CSP Reseller

Prerequisites

The following are the prerequisites for this section:

  1. The Customer and Azure subscription for the customer are already created by the CSP reseller.
  2. A machine having Azure PowerShell installed. Steps mentioned below to configure the same:
    1. Navigate to the following link and install Web Platform Installer:

      https://www.microsoft.com/web/downloads/platform.aspx

    2. Click on Products link and Select Windows Azure folder on left hand side.

  1. Click on Add and then, Click on install and let the install complete.

Create VM using Azure PowerShell

  1. Open Azure PowerShell window.
  2. Switch to use the Azure Resource Manager module by running following cmdlet:

    Switch-AzureMode -Name AzureResourceManager

  1. Login to customer subscription using the following cmdlet:

    Add-AzureAccount –Tenant <customer domain name here>

  1. When prompted for credentials, enter the reseller credentials:

  1. After successful login, the list of subscriptions for the customer will be displayed:

  1. Navigate to github link: https://github.com/Azure/azure-quickstart-templates and choose a template for VM creation. (You can also create your own template by downloading the template JSON file and modifying it or creating one from scratch.
    The following steps in this section are shown for a template chosen from github link)

    101-simple-windows-vm is taken as an example here.

  1. Open the link for the template. Open the template's JSON file and observe the parameters section for the template :

  1. Create the params object for the parameters required by the template:

    $params = @{ param1="value1"; param2="value2"; …}   

  1. Create the Resource Group using the template by running the following cmdlet:

    New-AzureResourceGroup -Name "<new resource group name>" -Location "<Azure DC location for resource group>" –TemplateUri "<Raw URL for template JSON file>"


  1. Wait for the deployment to complete. ( If any errors have caused deployment to fail, view the error description, take appropriate action, and rerun the previous step. Common causes could be incorrect parameters like invalid StorageAccountName, invalid Username, etc.)


Create VM using CLI for a customer as a CSP Reseller

Prerequisites

The following are the prerequisites for this section:

  1. The Customer and Azure subscription for the customer are already created by the CSP reseller.
  2. A machine having Azure CLI installed. Steps mentioned below to configure the same on Linux - Ubuntu 14.04 (Visit https://azure.microsoft.com/en-in/documentation/articles/xplat-cli-install/ for setting up Azure CLI on Windows or Mac or different version of Linux):
    1. Login to the Ubuntu Linux command shell.
    2. Azure CLI requires Node.js. Run the following commands to install Node.js and npm:

      sudo apt-get install nodejs-legacy

sudo apt-get install npm

  1. Run the following command to install Azure CLI:

    sudo npm install -g azure-cli

Create VM using Azure CLI

  1. Switch the mode to Azure Resource Manager by running the following command:

    azure config mode arm


  1. Login to customer subscription using the following command:

    azure login –u <reseller credentials' username> --tenant <customer domain name here>

  1. Navigate to github link in a browser: https://github.com/Azure/azure-quickstart-templates and choose a template for VM creation. (You can also create your own template by downloading the template JSON file and modifying it or creating one from scratch.
    The following steps in this section are shown for a template chosen from github link)

    101-simple-windows-vm is taken as an example here.

  1. Open the link for the template. Open the template's JSON file and observe the parameters section for the template :

  1. Create the params variable in JSON string format for the parameters required by the template by running the following command in Linux shell:

    params ='{ "param1": {"value":"value1"}, {"param2": {"value":"value2"}, … }'   

  1. Create a new Resource Group using the template by running the following command:

    azure group create –n "<new resource group name>" –l "<Azure DC location for resource group>" –template-uri "<Raw URL for template JSON file>" –p "$params"

    Wait for the deployment to get initiated. ( If any errors have caused command to fail, view the error description, take appropriate action, and rerun the previous step. Common causes could be incorrect parameters like invalid StorageAccountName, invalid Username, etc. or invalid formatting of JSON parameter string variable)


  1. Check the status of the deployment by running the following command:

    azure group deployment show –n "<resource group name>"

    Observe the field: ProvisioningState in the output of above command.


ProvisioningState value of Running indicates the deployment is in progress. ProvisioningState value of Succeeded indicates the deployment has been completed and is successful.