mattmcspirit / azurestack

Azure Stack Resources
80 stars 41 forks source link

Azure Stack 1809 / PS 1.5.0 / 2018-03-01-hybrid #48

Closed eszych closed 6 years ago

eszych commented 6 years ago

Even that you write your script will not work with it, I changed to PS Modules 1.5.0 and Profile 2018-03-01-hybrid by changing the lines: 950 Use-AzureRmProfile -Profile 2018-03-01-hybrid -Force -ErrorAction Stop 951 Install-Module -Name AzureStack -RequiredVersion 1.5.0 -Force -ErrorAction Stop

Ubuntu Image download failed - reason being that the registration could not be found, even if it was successfully registered. To fix that I changed line 1331: 1331 $Registration = ((Get-AzureRmResource | Where-Object { (($.ResourceType -eq "Microsoft.AzureStack/registrations") -and ($.Name -like "asdkreg-$asdkHostName*")) }) | Select-Object -First 1 -ErrorAction SilentlyContinue -Verbose).Name

Replace $asdkStorageAccount.PrimaryEndpoints.Blob.AbsoluteUri with $asdkStorageAccount.PrimaryEndpoints.Blob Should replace at three occurences: For Ubuntu Image: $ubuntuServerURI = '{0}{1}/{2}' -f $asdkStorageAccount.PrimaryEndpoints.Blob.AbsoluteUri, $asdkImagesContainerName, $UbuntuServerVHD.Name For Server Core Image: $serverCoreURI = '{0}{1}/{2}' -f $asdkStorageAccount.PrimaryEndpoints.Blob.AbsoluteUri, $asdkImagesContainerName, $serverCoreVHD.Name For Server Full Image: $serverFullURI = '{0}{1}/{2}' -f $asdkStorageAccount.PrimaryEndpoints.Blob.AbsoluteUri, $asdkImagesContainerName, $serverFullVHD.Name

eszych commented 6 years ago

There is another line, where the ASDK registration is checked, when the Windows Images are created. I missed that one first. Need to change it accordingly to: $Registration = ((Get-AzureRmResource | Where-Object { (($.ResourceType -eq "Microsoft.AzureStack/registrations") -and ($.Name -like "asdkreg-$asdkHostName*")) }) | Select-Object -First 1 -ErrorAction SilentlyContinue -Verbose).Name

mattmcspirit commented 6 years ago

Thanks for your help! Keep the items coming, and I'll make sure they are in my next major build, which is still a few days away. Thanks!

mattmcspirit commented 6 years ago

This is all fixed in the next release - closing for now! Thanks!