How to Add Windows Server 2016 Image to #AzureStack #AzureStackDevKit #WindowsServer

Hello folks,

After installing Azure Stack Development Kit (ASDK) or Azure Stack Integrated Systems, we need to add a default Windows Server 2016 or Linux Image. But before doing so, we have to complete a couple of tasks.

In this blog post, I will show you how to set up PowerShell for Azure Stack, then register Azure Stack with Azure subscription, and finally add a Windows Server 2016 image.

Set up PowerShell for Azure Stack

Login to Azure Stack Development Kit. Open an elevated PowerShell ISE session, and then run the following script:

Here’s a quick overview of what the script above is doing:

  • Set PowerShell Execution and PowerShell repository
  • Install and import AzureStack Modules version 1.2.11
  • Download and install AzureStack-Tools
  • Import Azure Stack connect and compute modules
  • Reset PowerShell Execution Policy back to default
  • Register Azure Resource Manager (AzureRM) environment with Azure Stack Instance
  • Login to Azure Stack environment

Now that you have set up PowerShell for Azure Stack, I will keep PowerShell ISE console open for the time being, we’ll be using it in the subsequent sections.

If you want to confirm that everything is working as expected, you can test the configuration by creating a test resource group by running the command below:

After the resource group is created, the Provisioning state property is set to Succeeded as shown in the next screenshot.

Register Azure Stack with Azure Subscription

This is step is not required, but it’s recommended because it enables you to test and download Azure marketplaces items from public Azure (known as Marketplace Syndication).

Before you start registering Azure Stack with Azure, you must have a subscription ID for an active Azure subscription.

Log into your Azure Subscription at https://portal.azure.com and grab your subscription ID that you want to register with Azure Stack. You might have multiple subscriptions.

Once you have the subscription ID, login to the Azure Stack host computer and run the following PowerShell script to register Azure Stack with Azure.

Here’s a quick overview of what the script above is doing:

  • Logs into your Azure account. You’ll be prompted for credentials, enter the credentials of a Global Administrator for your subscription
  • Registers the “Microsoft.AzureStack” resource provider with your Azure account
  • Specify the AAD Tenant Name, Azure Stack admin credentials, Azure Subscription ID and the IP address for the Privileged Endpoint VM that was deployed as part of Azure Stack
  • Import the Register With Azure Module
  • Finally, activating Azure Stack with Azure (this may take up to 10 minutes to complete)

Add Windows Server 2016 Image to Azure Stack

In the final section, we will download and add Windows Server image from Azure to Azure Stack. This step requires that you  have registered your Azure Stack instanced with Azure. If you have deployed Azure Stack in a disconnected scenario, or in scenarios with limited connectivity, the check the following article on how to add the image in offline mode by using PowerShell.

  • Log into your Azure Stack Development Kit portal at: https://adminportal.local.azurestack.external/
  • Select More services > Marketplace Management > Click on +Add from Azure. (You should now be presented with a populated Marketplace items)
  • Search for the Windows Server 2016 Datacenter – Eval image
  • Select the image and click Download. The image download size is 40GB, so it will take some time to complete. 
  • When the download is finished successfully, you can see the image is available under Marketplace management. The image also is available under Virtual machines.

That’s it there you have it. You can now start provisioning virtual machines… Until then, see you in the next post!

Thanks for reading!

Cheers,
-Ch@rbel-

About Charbel Nemnom 325 Articles

Charbel Nemnom is a Microsoft Cloud Consultant and Technical Evangelist, totally fan of the latest’s IT platform solutions, accomplished hands-on technical professional with over 15 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize performance of mission-critical enterprise systems. Excellent communicator adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design and virtualization.

Be the first to comment

Leave a Reply