Skilling up with Microsoft Azure Stack

By Style Sync
| Published on
1ee04-frustraited

I am sure that you are already aware of Microsoft Azure Stack; if you are like me, tech-savvy and like to learn new technology by getting his hands dirty, you will also be aware that Microsoft Azure Stack is different. The challenge you will encounter when skilling up with Microsoft Azure Stack

is that the minimum hardware requirement to deploy the Microsoft Azure Stack is not something you will easily or cheaply accommodate in your home lab. If you are not working for a company with a full kit lab for your testing, your options to skill up on the Azure Stack will be limited to the Microsoft documentation, and will likely be very expensive.

On this blog, I will take you through the deployment of Microsoft Azure Stack running in Azure. I will also show you how to do it with a lower hardware specification than that required by MS. Of course, this is a deployment intended for your personal use to do your own learning and testing.  The performance is not that great, but it is enough to get you a deployment that will suit your purpose.

So, let’s get started…

Minimum Hardware Requirements

The minimum hardware you will need for installing the Azure Stack is listed in the table below. As I mentioned before, there is a way, and I will show you, to install the Azure Stack on lower specification hardware.

This link takes you to the MS Azure Stack site.

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

ComponentMinimumRecommended
CPUDual-Socket: 12 Physical CoresDual-Socket: 16 Physical Cores
Memory96 GB RAM128 GB RAM
BIOSHyper-V Enabled (with SLAT support)Hyper-V Enabled (with SLAT support)
NICWindows Server 2012 R2 Certification required for NIC, no specialized features requiredWindows Server 2012 R2 Certification required for NIC, no specialized features required
OS1 OS disk with minimum of 200 GB available for system partition (SSD or HDD)1 OS disk with minimum of 200 GB available for system partition (SSD or HDD)
DATA4 disks. Each disk provides a minimum of 140 GB of capacity (SSD or HDD).4 disks. Each disk provides a minimum of 250 GB of capacity (SSD or HDD).

Deploying Microsoft Azure Stack  on Microsoft Azure for Testing

Before we start the deployment, it is important that you be aware that you will experience lots of errors during this process.  I hope the steps I am showing you here will minimise the errors that you encounter. Just to give you an idea of the time and difficulty when doing this Azure Stack deployment, I spent six days writing this blog. Again, I hope I can make it faster and less difficult for you with my experience.

  • Create a Microsoft Azure Virtual Machine

For this proof of concept deployment, we will use the Azure Virtual Machine configuration shown below. This, in my opinion, is a good balance between performance and the budget I allocated to this.

 

Note: This deployment is going to take hours; therefore, I recommend that you turn off the Auto-Shutdown VM in Step 3 of the Azure VM configuration. I learned about this step the hard way.

  • Configure the Azure Virtual Machine

After the VM has been deployed and runs, power-off the Virtual Machine. Modify the re-size of the system drive (C:) to 500 GB, and then add another three SSD disks.

Save and run the VM after finalizing the disk sizing and adding the new disks.

  • Log in to the newly created VM
  • Change the Admin username

The deployment script will look for a Windows Administrator; therefore, you must change the default username back to Administrator using this PowerShell command (from AzureAdmin).

Rename-LocalUser -Name StackAdmin -NewName Administrator

  • Reboot, and then login with the Administrator Account
  • Set up the Network and the IE

I configured my Azure networking to use my own subnet. I also changed the IP address of the Virtual Machine from DHCP to a static IP, and I used the Azure DNS. The DNS IP address I acquired from the ipconfig /all command.

The second step is to disable the IE Enhanced Security Configuration; see the figure below.

  • Set up the Time and Time/Zone

Configure your Windows to use your local time zone.

  • Enable PowerShell permissions

To avoid permission (wsman) issues during the Azure Stack deployment script run, run these PowerShell commands:

Set-Item wsman:localhost\client\trustedhosts -Value *

Enable-WSManCredSSP -Role Client -DelegateComputer *

Then run the gpedit.msc; enable and add WSMAN/* to the: Local Computer Policy > Computer Configuration > Administrative Templates > System > Credential Delegation Enable – Allow Delegating Fresh Credentials with NTLM-only Server Authentication 

  • Install the software prerequisites

Microsoft Azure Stack depends on many Windows features; these must be deployed before running the deployment script. The PowerShell commands to deploy all the prerequisite features for Azure Stack are here.

Add-WindowsFeature Hyper-V, Failover-Clustering, Web-Server -IncludeManagementTools
 
Add-WindowsFeature RSAT-AD-PowerShell, RSAT-ADDS -IncludeAllSubFeature
 
Install-PackageProvider nuget –Verbose
 
  • Resize the system drive and then initiate the three disks

Before we reboot the server to start running through the Azure stack, we have to resize the system drive to 500GB and make the other three disk online only using the Windows Disk Manager. CAUTION: Do not Format the Drives!

  • Reboot

Reboot the server. You can use the PowerShell command: Restart-Computer

  • Log back in and download the Azure Stack

After the VM has started, connect and log in using the Administrator account; remember the account you used before is not valid anymore, as we changed it to Administrator.

  • Download the Azure Pack Development Kit and prepare for deployment

For this Proof of Concept, we will download the Azure Stack development kit from this URL, and then extract the package to a temp directory:

https://azure.microsoft.com/en-us/overview/azure-stack/development-kit/

Run the package downloader:

Extract the package which is a part of the download process. After the extraction process is complete, locate and mount the Cloudbuilder.VHDX; by default, this file is located under C:\Temp\Azure Stack Development Kit.

Copy the three folders marked in blue in the figure to the C:\ drive, then unmount and clean the temp directory to save space.

Set Powershell to run as an admin, and then run this Powershell command from the CloudDeployment\Setup directory to start the deployment:

.\InstallAzureStackPOC.ps1 -InfraAzureDirectoryTenantName yourdirectory.onmicrosoft.com -NATIPv4Subnet 172.16.0.0/24 -NATIPv4Address 172.16.0.2 -NATIPv4DefaultGateway 172.16.0.1 -Verbose

Note: Use an unused IP range on your Azure. In the deployment in this blog post, I choose the 172.16.0.x subnet.

Note: TenantName can be retrieved from your Azure Active Directory, it’s your Azure directory name (You can use the default AD name or create a new one before starting the deployment process).

A short time after running the script tuning, more folders will appear on your hard drive (C:\). Now is a good time to modify some parameters to ensure our deployment will keep running without complaining about CPU, memory, and disk requirements. We will also set some parameters to stop complaints about the Azure Stack being deployed on a Virtual Machine.

  • Modify the deployment to run on Virtual Machine

Browse and edit the C:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1 to find $isVirtualizedDeployment. Remove the -not before each variable. This will present in three times. and save the file

  • Modify the hardware specifics

Browse to C:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal and then edit the OneNodeRole to modify the Minimum hardware specification.

The original Validation Requirements are here:

But we will modify the Validation Requirements for these. You can see Cores per Machine has changed from 12 to 1; Physical Memory per Machine has changed from 96 to 9, and so on down the list.

  • Resume after modifying the Validation Requirements

After you have modified the Validation Requirements, resume the deployment using this command: .\InstallAzureStackPOC.ps1 -Rerun –Verbose

  • Provide your Azure Subscription details

The deployment process will now ask you to provide your Azure Subscription username and password to continue with the deployment:

  • Deployment Complete – almost

After several hours, and if there are no issues with the scripts, you will be notified that the deployment is complete. I am sure you will not experience this smooth deployment when you run your deployment of the Azure stack; therefore, you will have to check the troubleshooting section to remediate some of the same types of errors that we experienced during our deployment. As this is a learning experience for us all, if you get a new error, try a Google search for a solution. If you find one, please share it with us.

  • Set up remote execution of PowerShell commands

After the AzSDC01 server, VM has deployed, log in using the Administrator account. Run this PowerShell command to set the permissions needed to enable the remote execution of PowerShell commands: Enable-WSManCredSSP -Role Server

  • Continuing deployment after rebooting

During the deployment process, the server will reboot. After it reboots, log in with the following account to continue the deployment: AzureStack\AzureStackAdmin The password as the same one that you provided during the deployment.

  • Escaping the deployment loop

After the deployment reaches a stage where the Azs-BGPNAT01 VM has deployed, you will probably notice that the deployment process enters into a loop where the VM will be deployed, deleted and then redeployed. To remedy this, run these commands to create a new NAT switch; then go back and modify the Azs-BGPNAT01 NIC to use it (NATSwitch from PublicSwitch):

New-VMSwitch -Name “NATSwitch” -SwitchType Internal -Verbose 

$NIC=Get-NetAdapter|Out-GridView -PassThru 

New-NetIPAddress -IPAddress 172.16.0.1 -PrefixLength 24 -InterfaceIndex $NIC.ifIndex

New-NetNat -Name “NATSwitch” -InternalIPInterfaceAddressPrefix “172.16.0.0/24” –Verbose

  • Deploying Azure Stack development Kit Action has successfully completed

Honestly, and from my experience with the Azure Stack deployment, the road to this screenshot will not be easy. I am sure though, that for the first time you will appreciate the green line ending after a long process.

Troubleshooting

During our installation, we faced several errors. One notable error was a script failure on steps 160.60 and 160.61 and sometimes 160.62 (and that is telling you how many times I tried to deploy the Azure Stack just to write this blog post). To remedy this error, run this command:

Invoke-EceAction -RolePath Cloud -ActionType Deployment -Start 60.160 –Verbose

If the same error continues to appear after you have run that command, reboot, and then run the .\InstallAzureStackPOC.ps1 -Rerun –Verbose command. Follow that command with this command after script failure: Invoke-EceAction -RolePath Cloud -ActionType Deployment -Start 60 –Verbose

Accessing the Azure Stack Portal

After the installation has completed, you will be able to access the Azure Pack Portal using the two URLs below.

Note: The email address used for the portal will be the same as your Azure subscription that you used during the deployment.

Admin Portal use: https://adminportal.local.azurestack.external

Tenant Portal use: https://portal.local.azurestack.external

Summary

As you can see, this deployment of the Microsoft Azure Stack in a minimised configuration is not something easy or straightforward. Many of the issues you will experience during your deployment will be caused by deploying the Stack on a non-standard, uncertified, unsupported configuration.

As technical IT people, we must learn about new technologies and experience the technology hands-on; but, it is clear that when Microsoft developed the Stack, they clearly never thought about all the technical people out here where we live, with our limited budgets, that must skill up to influence the adoption and support of the Stack.

I hope my blog post has helped you to do your own the deployment faster and more efficiently. More importantly, that it will save you some money to concentrate on learning a new skill. I hope I have helped you to take the first step on your Azure Stack learning path. Please share if you find it informative.

Our next blog post when we discuss the Azure Stack, it will be a recording of the deployment process to speed up the knowledge transfer.

Thank you for visiting my blog site and please share.

What do you think?

What do you think?

2 Comments:
November 23, 2017

If you face the below error during the deployment:

Caught error Connecting to remote server “YourStackServerHostName” failed with the following error message : The WinRM client cannot process the request.

run the below command to fix:
winrm set winrm/config/client/auth ‘@{CredSSP=”true”}’

April 25, 2018

Error about line 1889 add -ExcludeVersion to the helper file: C:\CloudDeployment\Common\Helpers.psm1

Line: 1895 and 1899

if ($Version)
{
C:\tools\NuGet.exe install $NugetName -Source $NugetStorePath -OutputDirectory $DestinationPath -packagesavemode “nuspec” -Prerelease -Version $Version -ExcludeVersion
}
else
{
C:\tools\NuGet.exe install $NugetName -Source $NugetStorePath -OutputDirectory $DestinationPath -packagesavemode “nuspec” -Prerelease -ExcludeVersion
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe to Our Newsletter

Table of Contents

Related Insights