Deploying the Azure Stack Technical Preview 2 – Part 1


We’re finally here, and luckily for me, Microsoft has published an updated version of the  Azure Stack – Technical Preview 2.  I was unhappy with the performance of my original configuration (relying far too heavily on iSCSI), so I blew away my first (successful) deployment and reconfigured my server configuration.

Briefly, a quick overview of what I’ve done differently this time:

  • Dedicated iSCSI storage & host controller (iSCSI Target Server) – 2 dedicated hard disks
  • Installed two 2.5” 256GB SATA SSDs into the M910 Blade

I’m using an Evaluation Edition of Windows Server 2016 as the initial host operating system, but it doesn’t make a difference, as you’ll be booting into a host OS image as part of the deployment later.


Prepping the Stack

1. Prepare the host machine

The requirements are the same as they were for Technical Preview 1 (as in, they remain unchanged). 
For my configuration, I need to add support for iSCSI disks (one of the downsides of using a server blade). 

2. Run the deployment requirements check tool


You can run this both before and after booting into the CloudBuilder OS.  In my case, I ran it against a pre-prepped clean OS.

For my scenario, iSCSI is a factor, so I made a small change to the script to support iSCSI:


Obviously this means I’ll need to tinker later to support the disk configuration I need.


3. Create an Azure AD account that is the directory administrator  (specifically, service administrator) for at least one Azure Active Directory.

image image


I found that you need to use Global Admin, the installer didn’t like Service Admin for some reason.

To ensure the password is reset, navigate to and authenticate to ensure the password is changed on first use.

Keep the credentials handy for the deployment.

Deploying the Stack

1. Obtain the Azure Stack file (zip archive)

Once you’ve obtained the archive, extract the files and then run MicrosoftAzureStackPOC.exe.

image image

Choose a location for the files to be extracted to and continue.  This might take some time. 
When it finishes, you need to move the CloudBuilder.vhdx into the C:\.

2. Prepping the deployment

There’s some files you’ll benefit from, and you can just grab them directly from your host OS by running the following script in an elevated PowerShell console:

# Variables
$Uri = ''
$LocalPath = 'c:\Microsoft Azure Stack POC’

# Create folder
New-Item $LocalPath -type directory

# Download files
Invoke-WebRequest ($uri + 'BootMenuNoKVM.ps1') -OutFile ($LocalPath + '\BootMenuNoKVM.ps1')
Invoke-WebRequest ($uri + 'PrepareBootFromVHD.ps1') -OutFile ($LocalPath + '\PrepareBootFromVHD.ps1')
Invoke-WebRequest ($uri + 'Unattend.xml') -OutFile ($LocalPath + '\Unattend.xml')
Invoke-WebRequest ($uri + 'unattend_NoKVM.xml') -OutFile ($LocalPath + '\unattend_NoKVM.xml')

Then, I executed by running the following command in an elevated PowerShell console:

.\PrepareBootFromVHD.ps1 -CloudBuilderDiskPath C:\CloudBuilder.vhdx -ApplyUnattend

You are asked to supply a local Administrator password.  After a brief time, the system reboots.  Thankfully, you can still select the native OS you started with (in case things go awry):


Then we’re ready to go.


3. Time to tinker (skip if this doesn’t apply to you)

I’ve booted into the CloudBuilder OS, but to get it into a supported state (adding ISCSI disks), I’ll need to play around a little.  I added iSCSI support and disabled all but one NIC. Rerunning the modified prerequisites script, and it’s green:


Here’s my disk and NIC configurations:

image image

To add iSCSI support, I had to make two small changes in the following PowerShell file: C:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1:


Kicking it off

As the instructions say.. open an elevated PowerShell console and plug in the relevant details.  In my case,  I added my credentials and kicked off the script.  It seems you need to use an Azure identity which is a Global Admin, not a Service Admin.

cd C:\CloudDeployment\Configuration
$adminpass = ConvertTo-SecureString "<LOCAL ADMIN PASSWORD>" -AsPlainText -Force
$aadpass = ConvertTo-SecureString "<AAD GLOBAL ADMIN ACCOUNT PASSWORD>" -AsPlainText -Force
$aadcred = New-Object System.Management.Automation.PSCredential ("<AAD GLOBAL ADMIN ACCOUNT>", $aadpass)
.\InstallAzureStackPOC.ps1 -AdminPassword $adminpass -AADAdminCredential $aadcred


Check back soon to see how it went…


Get-AzureAdTenantDetails : The account you entered is not an administrator of any Azure Active Directory tenant.

The Azure credentials you are using may not (yet) be recognized as a Global Admin.  Try alternative credentials, or retry in a little while.
For more information on creating an account against an Azure AD Tenancy, read this:

Further Reading

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.