In my previous post, I’ve discussed how you can get your hands on the Microsoft Azure Stack Development Kit (ASDK) – now, I’ll show you how to install it.
As I’ve mentioned there already, we will install the ASDK inside of a Hyper-V virtual machine with nested virtualization enabled (a scenario that is not officially supported, but will give you an opportunity to work with ASDK in your lab, if you don’t have all the required hardware).
So… let’s start.
The things you’ll need, as per official article:
- Hyper-V (2016) host
- 12-core CPU
- 96+GB of RAM
- ~200GB free space for CloudBuilder.vhdx (OS)
- 4 x 250+ GB free space for data disks
- Internet/NTP access (time is important!) through a single network adapter (without proxy!)
Once you’ve downloaded and extracted the ASDK bits, you’ll get the CloudBuilder.vhdx file, which we will use for the boot disk of our newly created virtual machine.
But first, we will expand it a bit (I’ve expanded it to 200GB). Don’t forget to expand the partition inside as well!
One other thing we need to ensure is to enable nested virtualization for this virtual machine (allowing us to run Hyper-V inside this virtual machine):
Get-VM -Name "AzS-ASDK" | Set-VMProcessor -ExposeVirtualizationExtensions $true
And now we are ready to start our virtual machine, hosting the ASDK.
Once started, virtual machine will finish its configuration (specialization phase of Windows installation), so let it finish and then configure password, computer name and IP address.
After this initial configuration, we configure the NTP settings by using the following:
reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider /v Enabled /t reg_dword /d 0
w32tm /config /manualpeerlist:dom1.corp.tklabs.eu /syncfromflags:MANUAL
net stop w32time
net start w32time
w32tm /resync /force
w32tm /query /source
Now we are ready to use the asdk-prechecker.ps1 script, to check if everything is OK:
And…. we are ready for the installation!
Now we need to run the asdk-installer.ps1 script, which will actually start the wizard which will help with entering the required IP adresses and checking the network connection – as a result, we will get the final commands to kick-off the installation:
$adminpass = ConvertTo-SecureString 'xxxxxxxxxxxx' -AsPlainText -Force
.\InstallAzureStackPOC.ps1 -AdminPassword $adminpass -UseADFS -NatIPv4Subnet 192.168.111.0/24 -NatIPv4Address 192.168.111.8 -NatIPv4DefaultGateway 192.168.111.1 -DNSForwarder 192.168.111.6 -TimeServer 192.168.111.6
One more thing needs to be configured for our virtual ASDK installation to succeed inside in nested enviroment – when the extraction process starts, we need to edit the C:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1 file by changing the every “-not $IsVirtualizedDeployment” to “$IsVirtualizedDeployment” (that is, remove the “-not“):
Final thing to do is to wait for the whole process to complete (~4,5 hours on my hardware), and the result looks like this:
And there is another (shortened) video of the installation process:
And now we can start playing with our own ASDK!