Deploying the Azure Stack Technical Preview 2 (Part 1)
The Azure Stack's latest technical preview is here. Let's take a look at configuring and deploying the stack and dip our toes into tenancy and a bit of troubleshooting.
Join the DZone community and get the full member experience.Join For Free
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.
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 https://portal.azure.com 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.
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 are 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 = 'https://raw.githubusercontent.com/Azure/AzureStack-Tools/master/Deployment/' $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 are my disk and NIC configurations:
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.
Published at DZone with permission of Rob Sanders, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.