Facing a strange issue, help / advice appreciated
It seems API-related but no detail is provided in the API response beyond this "Internal server error"
PS C:\tmp\AZM_tests\working> $PSVersionTable.PSVersion
Major Minor Patch PreReleaseLabel BuildLabel
7 6 1
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force -AllowClobber
Import-Module Az
Install-Module -Name Az.Migrate -Scope CurrentUser -Repository PSGallery -Force -AllowClobber
Import-Module Az.Migrate
Connect-AzAccount `
-Tenant "<tenant-id>" `
-Subscription "<sub-id>" `
-UseDeviceAuthentication
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
PS C:\tmp\AZM_tests\working> $ResourceGroupName = "rg-azm-test"
PS C:\tmp\AZM_tests\working> $Location = "canadacentral"
PS C:\tmp\AZM_tests\working> $ProjectName = "Prj-AZM-test"
PS C:\tmp\AZM_tests\working> $SubscriptionId = "<sub-id>"
PS C:\tmp\AZM_tests\working> $MigrateProject = New-AzMigrateProject `
>> -Name $ProjectName `
>> -ResourceGroupName $ResourceGroupName `
>> -Location $Location -Debug -SubscriptionId "<sub-id>"
DEBUG: 8:21:38 AM - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 8:21:38 AM - [ConfigManager] Got nothing from [DisableInstanceDiscovery], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 8:21:38 AM - [ConfigManager] Got [False] from [EnableLoginByWam], Module = [], Cmdlet = [].
Set-AzMigrateProject_PutExpanded: C:\Users\Mro\Documents\PowerShell\Modules\Az.Migrate\3.0.0\Migrate.Autorest\custom\New-AzMigrateProject.ps1:78:16
Line |
78 | … return Set-AzMigrateProject -Name $Name -ResourceGroupName $Reso …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Encountered internal server error. Please try again.
DEBUG: AzureQoSEvent: Module: Az.Migrate:3.0.0; CommandName: New-AzMigrateProject; PSVersion: 7.6.1; IsSuccess: False; Duration: 00:00:02.8711822; SanitizeDuration: 00:00:00; Exception: InternalException;
PS C:\tmp\AZM_tests\working> $errorRecord = Resolve-AzError -Last
PS C:\tmp\AZM_tests\working> $errorRecord.Exception
StatusCode : InternalServerError
Code : InternalServerError
RequestMessage : Method: PUT, RequestUri: 'https://management.azure.com/subscriptions/<sub-id>/resourceGroups/rg-azm-test/providers/Microsoft.Migrate/migrateProjects/Prj-AZM-test?api-ver
sion=2018-09-01-preview', Version: 1.1, Content: <null>, Headers:
{
Authorization: Bearer <auth-bearer>
}
ResponseHeaders : {[Cache-Control, System.String[]], [Pragma, System.String[]], [Strict-Transport-Security, System.String[]], [x-ms-request-id, System.String[]]…}
ResponseBody : {"error":{"code":"InternalServerError","message":"Encountered internal server error. Please try again."}}
ClientRequestId :
RequestId : 40ac14e1-7e34-4431-ade0-3985fd99725d
Message : Encountered internal server error. Please try again.
Action :
TargetSite : Void MoveNext()
Data : {}
InnerException :
HelpLink :
Source : Az.Migrate.private
HResult : -2146233088
StackTrace : at Microsoft.Azure.PowerShell.Cmdlets.Migrate.Migrate.MigrateProjectsPutMigrateProject_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onCreated, IEventListener eventListener, ISendAsyncsender)
at Microsoft.Azure.PowerShell.Cmdlets.Migrate.Migrate.MigrateProjectsPutMigrateProject_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onCreated, IEventListener eventListener, ISendAsyncsender)
at Microsoft.Azure.PowerShell.Cmdlets.Migrate.Migrate.MigrateProjectsPutMigrateProject(String subscriptionId, String resourceGroupName, String migrateProjectName, String acceptLanguage,
IMigrateProject body, Func`3 onOk, Func`3 onCreated, IEventListener eventListener, ISendAsync sender, SerializationMode serializationMode)
at Microsoft.Azure.PowerShell.Cmdlets.Migrate.Cmdlets.SetAzMigrateProject_PutExpanded.ProcessRecordAsync()
PS C:\tmp\AZM_tests\working>