Closed ghost closed 6 years ago
Hmm, so this is what my script essentially calls for registration:
Login-AzureRmAccount -EnvironmentName "AzureCloud" -SubscriptionId $azureRegSubId `
-TenantId $azureRegTenantID -Credential $azureRegCreds -ErrorAction Stop | Out-Null
# Register the Azure Stack resource provider in your Azure subscription
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.AzureStack
# Import the registration module that was downloaded with the GitHub tools
Import-Module $modulePath\Registration\RegisterWithAzure.psm1 -Force -Verbose
#Register Azure Stack
$AzureContext = Get-AzureRmContext
$asdkHostName = ($env:computername).ToLower()
Set-AzsRegistration -PrivilegedEndpointCredential $cloudAdminCreds -PrivilegedEndpoint `
AzS-ERCS01 -RegistrationName "asdkreg-$asdkHostName-$runTime" `
-BillingModel Development -ErrorAction Stop
This is essentially the same as what you ran manually.
If you look on your C:\, under MASlogs, you may find the registration specific logs that could help diagnose further. If this system has been previously registered, it may have caused the issue, but when you ran manually and used a different registration name, that may have overcome the issue.
Either way, to move on in the process, edit your ConfigASDKProgressLog.CSV and mark the Register line item as Complete, and then save it and replace the old one. Rerun the script and it should bypass that section again.
Searching for "microsoft.azure.commands.common.authentication.abstractions.iazurecontextcontainer": the typeconverter was ignored because it already occurs" online seems to indicate issues with PowerShell and AzureRM, so it may be outside of my script that something has an issue.
Hey, I have done multiple deployments with this configuration and it seems to be working correct again.
So it seems to be a problem with the PowerShell modules.
Tnx
Thanks Laborman - I agree. I've rolled back the script to use PS 1.4.0 and the earlier AzureRMProfile and things seem to deploy more smoothly. I'll do more testing with 1.5.0 etc, in the coming weeks.
Thanks again for the help. Matt
VERBOSE: [5:30 AM]::[HOSTCONFIGURATION]:: Host configuration is now complete. VERBOSE: [5:30 AM]::[REGISTRATION]:: Starting Azure Stack registration to Azure
ProviderNamespace : Microsoft.AzureStack RegistrationState : Registered ResourceTypes : {operations, registrations, registrations/products, registrations/customerSubscriptions} Locations : {Global, West Central US} ZoneMappings :
VERBOSE: Loading module from path 'C:\AzureStack-Tools-master\Registration\RegisterWithAzure.psm1'. VERBOSE: Cannot verify the Microsoft .NET Framework version 4.5.2 because it is not included in the list of permitted versions. VERBOSE: Populating RepositorySourceLocation property for module AzureRM.profile. VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.profile\5.5.2\AzureRM.Profile.psm1'. VERBOSE: Cannot verify the Microsoft .NET Framework version 4.5.2 because it is not included in the list of permitted versions. VERBOSE: Populating RepositorySourceLocation property for module AzureRM.profile. VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.profile\3.4.1.\Microsoft.Azure.Commands.Profil e.dll'. VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.profile\3.4.1\AzureRM.Profile.psm1'. VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\AzureRM.Profile.psd1'. VERBOSE: Cannot verify the Microsoft .NET Framework version 4.5.2 because it is not included in the list of permitted versions. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Authentication.Abstractions.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Authentication.Abstractions.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Authentication.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Authentication.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\3.4.1\Microsoft.Azure.Commands.Comm on.Authentication.ResourceManager.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\3.4.1\Microsoft.Azure.Commands.Comm on.Authentication.ResourceManager.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Authorization.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Authorization.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Compute.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Compute.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Graph.RBAC.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Graph.RBAC.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Network.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Network.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Reso urceManager.Common.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Reso urceManager.Common.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.WindowsAzure.Comman ds.Common.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.WindowsAzure.Comman ds.Common.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.WindowsAzure.Comman ds.Common.Storage.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.WindowsAzure.Comman ds.Common.Storage.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Storage.Management.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Storage.Management.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.KeyVault.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.KeyVault.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.WebSites.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.WebSites.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Hyak.Common.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Hyak.Common.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.ApplicationInsights .dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.ApplicationInsights .dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Common.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Common.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Common.NetFra mework.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Common.NetFra mework.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.KeyVault.Core .dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.KeyVault.Core .dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.IdentityModel.Clien ts.ActiveDirectory.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.IdentityModel.Clien ts.ActiveDirectory.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.IdentityModel.Clien ts.ActiveDirectory.WindowsForms.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.IdentityModel.Clien ts.ActiveDirectory.WindowsForms.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Rest.ClientRuntime. dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Rest.ClientRuntime. dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Rest.ClientRuntime. Azure.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Rest.ClientRuntime. Azure.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Rest.ClientRuntime. Azure.Authentication.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Rest.ClientRuntime. Azure.Authentication.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Threading.Tasks.dll '. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Threading.Tasks.dll '. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Threading.Tasks.Ext ensions.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Threading.Tasks.Ext ensions.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Threading.Tasks.Ext ensions.Desktop.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Threading.Tasks.Ext ensions.Desktop.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.WindowsAzure.Manage ment.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.WindowsAzure.Manage ment.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Newtonsoft.Json.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Newtonsoft.Json.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Newtonsoft.Json.10.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Newtonsoft.Json.10.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\System.Net.Http.Extensions.dl l'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\System.Net.Http.Extensions.dl l'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\System.Net.Http.Primitives.dl l'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\System.Net.Http.Primitives.dl l'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Aks.dll'. VERBOSE: Loading 'Assembly' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Commands.Comm on.Aks.dll'. VERBOSE: Loading 'TypesToProcess' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Command s.Profile.types.ps1xml'. VERBOSE: Loading 'FormatsToProcess' from path 'C:\Program Files\WindowsPowerShell\Modules\AzureRM.Profile\5.5.2\Microsoft.Azure.Comma nds.Profile.format.ps1xml'. VERBOSE: [5:30 AM]::[REGISTRATION]:: ASDK Configuration Stage: Registration Failed
Stage Status
ExtractZip Skipped
InstallPowerShell Complete
DownloadTools Complete
HostConfiguration Complete
Registration Failed
UbuntuImage Incomplete WindowsImage Incomplete MySQLGalleryItem Incomplete SQLServerGalleryItem Incomplete VMExtensions Incomplete MySQLRP Incomplete SQLServerRP Incomplete MySQLSKUQuota Incomplete SQLServerSKUQuota Incomplete UploadScripts Incomplete MySQLDBVM Incomplete SQLServerDBVM Incomplete MySQLAddHosting Incomplete SQLServerAddHosting Incomplete AppServiceFileServer Incomplete AppServiceSQLServer Incomplete DownloadAppService Incomplete GenerateAppServiceCerts Incomplete CreateServicePrincipal Incomplete GrantAzureADAppPermissions Incomplete InstallAppService Incomplete RegisterNewRPs Incomplete CreatePlansOffers Incomplete InstallHostApps Incomplete CreateOutput Incomplete
VERBOSE: [5:30 AM]::[REGISTRATION]:: The following error occurred while loading the extended type data file: Error in TypeData "Micro soft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer": The TypeConverter was ignored because it already occu rs. Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer": The member SerializationDepth is already present. Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache": The member PropertySerializationSet is al ready present. Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache": The member SerializationMethod is already present. Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache": The member PropertySerializationSet is already present. Error in TypeData "Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache": The member SerializationMethod is a lready present. Error in TypeData "Microsoft.Azure.Commands.Profile.Models.PSAzureContext": The member SerializationDepth is already present. Error in TypeData "Microsoft.Azure.Commands.Profile.Models.PSAzureProfile": The member SerializationDepth is already present. .Exception.Message
But when i do: Add-AzureRmAccount -EnvironmentName "AzureCloud" Get-AzureRmSubscription -SubscriptionID '***' | Select-AzureRmSubscription Register-AzureRmResourceProvider -ProviderNamespace Microsoft.AzureStack
CD C:\AzureStack-Tools-master\Registration
Import-Module .\RegisterWithAzure.psm1
$CloudAdminCred = Get-Credential -UserName "AZURESTACK\CloudAdmin" -Message "Enter the cloud domain credentials to access the privileged endpoint." $RegistrationName = "ASDK_TEST_21-09" Set-AzsRegistration
-PrivilegedEndpointCredential $CloudAdminCred
-PrivilegedEndpoint "AzS-ERCS01"-BillingModel Development
-RegistrationName $RegistrationNameIt works!