Open a ticket
Chat with us
BLOG Published on 2017/09/01 by Asitha De Silva in Tech-Tips

Azure Stack – Create Your First VM

From my previous blog posts I have talked deep on Azure Stack, its overview, architecture and the business need of it.(here) also for a POC and testing prospective, I have provided step by step on how to deploy Azure Stack on a Azure VM(here). From this post I’m hoping explain how to deploy your first VM on Azure Stack.

For this demo I’m using my Azure Stack POC environment which created on an Azure VM. If you have, you can use that or physically deployed Azure Stack environment.

Before deploying a VM or creating a workload following configurations have to perform in Azure Stack and Azure tenant.

  • Installing Azure Stack PowerShell
  • Register Azure Stack with Azure Subscription
  • Connect to market place and download OS images

Microsoft recommend to register Azure Stack with an azure subscription to access and download items from marketplace and subscribe usage data back to Microsoft. TechNet state Azure stack development kit users will not be charged for any usage they report.

Before registration, you should have

  1. Azure Subscription and subscription ID (MSDN or free azure accounts can be used)
  2. Azure Subscription should be registered as Azure Stack resource provider
  3. Credentials of the Owner of the subscription,
  4. User name who created the tenant is required or the registration script will fail
  5. Azure active directory of the Azure subscription

Register Azure Stack resource provider in Azure

  1. Login to the Azure portal, portal.azure.com
  2. Navigate to Subscriptions, select the subscription – resource provider
  3. Type AzureStack and click register and refresh




Install PowerShell for Azure Stack

Azure stack PowerShell should be installed to register the stack with Azure. There are two ways described in TechNet for installing

I followed the quick installation script. Login to the Azure Stack VM or connected computer to the Azure Stack

  1. Copy the PowerShell Scrip from following URL

    https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-powershell-configure-quickstart

  2. Fill the Tenant name and run the PowerShell script as run as admin


Register Azure Stack with Azure

  1. Login to the Azure Stack Deployed machine
  2. Open the Azure Stack PowerShell as run as admin
  3. Copy the RegisterWithAzure.ps1 script to a folder, from
    https://github.com/Azure/AzureStack-Tools/blob/master/Registration/RegisterWithAzure.ps1
  1. Run the Script with following changes
    • YourAccountName is the owner of the Azure subscription
    • YourID is the Azure subscription ID that you want to use to register Azure Stack
    • YourDirectory is the name of your Azure Active Directory tenant that your Azure subscription is a part of.

    RegisterWithAzure.ps1 -azureSubscriptionId YourID -azureDirectoryTenantName YourDirectory -azureAccountId YourAccountName

    Example

    C:\temp\RegisterWithAzure.ps1 -azureSubscriptionId "5e0ae55d-0b7a-47a3-afbc-8b372650abd3" `
    -azureDirectoryTenantName "contoso.onmicrosoft.com" `
    -azureAccountId [email protected]

    When prompted provide the Subscription owner credentials



  2. Script should be completed without errors


  3. Test the registration by accessing the market place

    To test you have to login to the Admin portal - https://adminportal.local.azurestack.external
    More servicesMarketplace managementAdd from Azure,


Creating the Test VM

Now we have the access to the market place, before deploying the VM latest OS images can be downloaded from the market place. Also if you want your Azure Stack environment to run in a disconnected scenario use PowerShell to add the image (here)

  1. Login to the Admin console, Marketplace, select the OS image and click Download


  2. After image download, click New – Compute and you can see the image is available now, select the image and Create


  3. You can see creating the VM is same as in Azure, follow the steps and create the VM




  4. VM will be created in a while


That’s how you create a VM in Azure Stack

Hope this post is useful

Thanks

Asitha De Silva


References 

https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-register

Asitha De Silva

Consultant Cloud Solutions

Expert in architecting and implementing cloud-based infrastructure solutions.

Newsletter

To keep up with the news and updates related to our products, make sure to subscribe to our newsletter!

Copyright © 2024 Terminalworks. All Rights Reserved