Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.21k stars 3.81k forks source link

Get internal error response(500) when execute the Start-AzStorageBlobIncrementalCopy cmd #15375

Closed ruoyu-shen closed 3 years ago

ruoyu-shen commented 3 years ago

Description

I am trying to do a test that copy from incremental snapshots for managed disk to a page blob in a storage account, but I get some internal errors when I created disk from the VHD file(page blob) and copy from the second incremental snapshot for managed disk.

Steps to reproduce

Steps for create disk from the copied VHD file(page blob)
1. Create a VM with Premium SSD LRS (named SourceDisk).
2. Create snapshot1,2,3 in 3 different time points.
3. Create a new storage account(named snapshotstorage1).
4. Create a blob container(named snapshots) in the snapshotstorage1.
5. $storagecontext = $(New-AzStorageContext -StorageAccountName snapshotstorage1 -StorageAccountKey $account_key
6. Start-AzStorageBlobIncrementalCopy -AbsoluteUri $snapshot1_sas -DestContext $storagecontext -DestContainer snapshots -DestBlob incrementalsnapshot.vhd
7. $DiskConfig = $(New-AzDiskConfig -SkuName Premium_LRS -Location 'East US' -DiskSizeGB 128 -OsType Windows -SourceUri $vhd_url -HyperVGeneration V2 -CreateOption Import -StorageAccountId snapshotstorage1)
8. New-AzDisk -ResourceGroupName $resourcegroup -DiskName 'FromSnapshot1' -Disk $DiskConfig

Steps for incremental copy the second managed disk snapshot
The same steps 1-6
7. Start-AzStorageBlobIncrementalCopy -AbsoluteUri $snapshot2_sas -DestContext $storagecontext -DestContainer snapshots -DestBlob incrementalsnapshot.vhd

Environment data

Name                           Value
----                           -----
PSVersion                      5.1.19041.1023
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1023
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module versions

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     2.2.6      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}
Script     1.5.0      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJobOutputRecord, Im...
Script     4.10.0     Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...}
Script     1.1.0      Az.CosmosDB                         {Get-AzCosmosDBSqlContainer, Get-AzCosmosDBSqlContainerThroughput, Get-AzCosmosDBSqlDatabase, Get-AzCosmosDBS...
Script     1.11.4     Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}
Script     1.0.0      Az.Migrate                          {Get-AzMigrateDiscoveredServer, Get-AzMigrateJob, Get-AzMigrateProject, Get-AzMigrateReplicationFabric...}
Script     3.4.1      Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, ...
Script     3.3.0      Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}
Script     3.4.0      Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script     2.4.0      Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...}
Script     1.4.7      PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     2.4.0      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}
Script     2.2.5      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}
Script     1.1.1      Az.Advisor                          {Get-AzAdvisorRecommendation, Enable-AzAdvisorRecommendation, Disable-AzAdvisorRecommendation, Get-AzAdvisorC...
Script     2.1.1      Az.Aks                              {Get-AzAksCluster, New-AzAksCluster, Remove-AzAksCluster, Import-AzAksCredential...}
Script     2.0.2      Az.Aks                              {Get-AzAksCluster, New-AzAksCluster, Remove-AzAksCluster, Import-AzAksCredential...}
Script     1.1.4      Az.AnalysisServices                 {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServicesServer, Remove-AzAn...
Script     2.2.0      Az.ApiManagement                    {Add-AzApiManagementApiToGateway, Add-AzApiManagementApiToProduct, Add-AzApiManagementProductToGroup, Add-AzA...
Script     1.0.0      Az.AppConfiguration                 {Get-AzAppConfigurationStore, Get-AzAppConfigurationStoreKey, New-AzAppConfigurationStore, New-AzAppConfigura...
Script     1.1.1      Az.ApplicationInsights              {Get-AzApplicationInsights, New-AzApplicationInsights, Remove-AzApplicationInsights, Update-AzApplicationInsi...
Script     1.1.0      Az.ApplicationInsights              {Get-AzApplicationInsights, New-AzApplicationInsights, Remove-AzApplicationInsights, Update-AzApplicationInsi...
Script     1.7.0      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJobOutputRecord, Im...
Script     1.4.3      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJobOutputRecord, Im...
Script     3.1.0      Az.Batch                            {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAccountKey, New-AzBatchAccount...}
Script     2.0.0      Az.Billing                          {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollmentAccount, Get-AzConsumptionBudget...}
Script     1.7.1      Az.Cdn                              {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...}
Script     1.6.0      Az.Cdn                              {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...}
Script     1.8.0      Az.CognitiveServices                {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServicesAccountSku, Get-Az...
Script     4.14.0     Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...}
Script     4.9.0      Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...}
Script     2.1.0      Az.ContainerInstance                {Add-AzContainerInstanceOutput, Get-AzContainerGroup, Get-AzContainerInstanceCachedImage, Get-AzContainerInst...
Script     1.0.3      Az.ContainerInstance                {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzContainerGroup, Get-AzContainerInstanceLog}
Script     2.2.3      Az.ContainerRegistry                {New-AzContainerRegistry, Get-AzContainerRegistry, Update-AzContainerRegistry, Remove-AzContainerRegistry...}
Script     2.2.1      Az.ContainerRegistry                {New-AzContainerRegistry, Get-AzContainerRegistry, Update-AzContainerRegistry, Remove-AzContainerRegistry...}
Script     2.2.0      Az.ContainerRegistry                {New-AzContainerRegistry, Get-AzContainerRegistry, Update-AzContainerRegistry, Remove-AzContainerRegistry...}
Script     1.2.0      Az.CosmosDB                         {Get-AzCosmosDBSqlContainer, Get-AzCosmosDBSqlContainerThroughput, Get-AzCosmosDBSqlDatabase, Get-AzCosmosDBS...
Script     1.0.0      Az.CosmosDB                         {Get-AzCosmosDBSqlContainer, Get-AzCosmosDBSqlContainerThroughput, Get-AzCosmosDBSqlDatabase, Get-AzCosmosDBS...
Script     1.1.0      Az.DataBoxEdge                      {Get-AzDataBoxEdgeJob, Get-AzDataBoxEdgeDevice, Invoke-AzDataBoxEdgeDevice, New-AzDataBoxEdgeDevice...}
Script     1.1.0      Az.Databricks                       {Get-AzDatabricksVNetPeering, Get-AzDatabricksWorkspace, New-AzDatabricksVNetPeering, New-AzDatabricksWorkspa...
Script     1.12.1     Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}
Script     1.11.3     Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}
Script     1.0.2      Az.DataLakeAnalytics                {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalyticsCatalogCredential, Remove-AzDataLakeAnalyticsCatal...
Script     1.3.0      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreFirewal...
Script     1.0.0      Az.DataShare                        {New-AzDataShareAccount, Get-AzDataShareAccount, Remove-AzDataShareAccount, New-AzDataShare...}
Script     1.1.0      Az.DeploymentManager                {Get-AzDeploymentManagerArtifactSource, New-AzDeploymentManagerArtifactSource, Set-AzDeploymentManagerArtifac...
Script     3.0.0      Az.DesktopVirtualization            {Disconnect-AzWvdUserSession, Expand-AzWvdMsixImage, Get-AzWvdApplication, Get-AzWvdApplicationGroup...}
Script     2.1.1      Az.DesktopVirtualization            {Disconnect-AzWvdUserSession, Expand-AzWvdMsixImage, Get-AzWvdApplication, Get-AzWvdApplicationGroup...}
Script     1.0.2      Az.DevTestLabs                      {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolicy, Get-AzDtlAutoStartPolicy, Get-AzDtlVMsPerLabPoli...
Script     1.1.2      Az.Dns                              {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRecordSet, Set-AzDnsRecordSet...}
Script     1.3.0      Az.EventGrid                        {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGridTopic, New-AzEventGridTopicKey...}
Script     1.8.0      Az.EventHub                         {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEventHubNamespace...}
Script     1.7.1      Az.EventHub                         {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEventHubNamespace...}
Script     1.8.0      Az.FrontDoor                        {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove-AzFrontDoor...}
Script     1.7.0      Az.FrontDoor                        {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove-AzFrontDoor...}
Script     3.0.0      Az.Functions                        {Get-AzFunctionApp, Get-AzFunctionAppAvailableLocation, Get-AzFunctionAppPlan, Get-AzFunctionAppSetting...}
Script     2.0.0      Az.Functions                        {Get-AzFunctionApp, Get-AzFunctionAppAvailableLocation, Get-AzFunctionAppPlan, Get-AzFunctionAppSetting...}
Script     4.3.0      Az.HDInsight                        {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsightStreamingMapReduc...
Script     4.2.0      Az.HDInsight                        {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsightStreamingMapReduc...
Script     1.3.1      Az.HealthcareApis                   {New-AzHealthcareApisService, Remove-AzHealthcareApisService, Set-AzHealthcareApisService, Get-AzHealthcareAp...
Script     1.2.0      Az.HealthcareApis                   {New-AzHealthcareApisService, Remove-AzHealthcareApisService, Set-AzHealthcareApisService, Get-AzHealthcareAp...
Script     2.7.3      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...}
Script     2.7.2      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...}
Script     3.4.5      Az.KeyVault                         {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-AzKeyVault...
Script     3.4.0      Az.KeyVault                         {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-AzKeyVault...
Script     2.0.0      Az.Kusto                            {Add-AzKustoClusterLanguageExtension, Add-AzKustoDatabasePrincipal, Get-AzKustoAttachedDatabaseConfiguration,...
Script     1.0.1      Az.Kusto                            {Add-AzKustoClusterLanguageExtension, Add-AzKustoDatabasePrincipal, Get-AzKustoAttachedDatabaseConfiguration,...
Script     1.5.0      Az.LogicApp                         {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccountAssembly, Get-AzIntegrationAccountBatchConfigurat...
Script     1.1.3      Az.MachineLearning                  {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssociation, Get-AzMlCommitmentPlanUsageHistory, Remove-Az...
Script     1.1.1      Az.Maintenance                      {Get-AzApplyUpdate, Get-AzConfigurationAssignment, Get-AzMaintenanceConfiguration, Get-AzMaintenanceUpdate...}
Script     1.1.0      Az.Maintenance                      {Get-AzApplyUpdate, Get-AzConfigurationAssignment, Get-AzMaintenanceConfiguration, Get-AzMaintenanceUpdate...}
Script     0.7.3      Az.ManagedServiceIdentity           {New-AzUserAssignedIdentity, Get-AzUserAssignedIdentity, Remove-AzUserAssignedIdentity}
Script     2.0.0      Az.ManagedServices                  {Get-AzManagedServicesAssignment, New-AzManagedServicesAssignment, Remove-AzManagedServicesAssignment, Get-Az...
Script     1.0.2      Az.MarketplaceOrdering              {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}
Script     1.1.1      Az.Media                            {Sync-AzMediaServiceStorageKey, Set-AzMediaServiceKey, Get-AzMediaServiceKey, Get-AzMediaServiceNameAvailabil...
Script     1.0.2      Az.Migrate                          {Get-AzMigrateDiscoveredServer, Get-AzMigrateJob, Get-AzMigrateProject, Get-AzMigrateReplicationFabric...}
Script     2.5.0      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...}
Script     2.4.0      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...}
Script     4.9.0      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificate, New-Az...
Script     4.6.0      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificate, New-Az...
Script     1.1.1      Az.NotificationHubs                 {Get-AzNotificationHub, Get-AzNotificationHubAuthorizationRule, Get-AzNotificationHubListKey, Get-AzNotificat...
Script     2.3.0      Az.OperationalInsights              {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLogDataSource, Disable-A...
Script     1.4.1      Az.PolicyInsights                   {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...}
Script     1.1.2      Az.PowerBIEmbedded                  {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollectionAcces...
Script     1.0.3      Az.PrivateDns                       {Get-AzPrivateDnsZone, Remove-AzPrivateDnsZone, Set-AzPrivateDnsZone, New-AzPrivateDnsZone...}
Script     4.2.0      Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, ...
Script     3.4.0      Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, ...
Script     1.4.0      Az.RedisCache                       {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheScheduleEntry, Get-AzRedisCachePatchSchedule, New-AzRedisC...
Script     1.0.0      Az.RedisEnterpriseCache             {Export-AzRedisEnterpriseCache, Get-AzRedisEnterpriseCache, Get-AzRedisEnterpriseCacheDatabase, Get-AzRedisEn...
Script     1.0.3      Az.Relay                            {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNamespace, Remove-AzRelayNamespace...}
Script     1.0.0      Az.ResourceMover                    {Add-AzResourceMoverMoveResource, Get-AzResourceMoverMoveCollection, Get-AzResourceMoverMoveResource, Get-AzR...
Script     4.2.0      Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}
Script     3.2.1      Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}
Script     1.0.0      Az.SecurityInsights                 {Get-AzSentinelAlertRuleAction, New-AzSentinelAlertRuleAction, Remove-AzSentinelAlertRuleAction, Update-AzSen...
Script     1.5.0      Az.ServiceBus                       {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzServiceBusNamespac...
Script     1.4.1      Az.ServiceBus                       {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzServiceBusNamespac...
Script     3.0.0      Az.ServiceFabric                    {Add-AzServiceFabricClientCertificate, Add-AzServiceFabricNode, Add-AzServiceFabricNodeType, Get-AzServiceFab...
Script     2.2.2      Az.ServiceFabric                    {Add-AzServiceFabricClientCertificate, Add-AzServiceFabricClusterCertificate, Add-AzServiceFabricNode, Add-Az...
Script     1.3.0      Az.SignalR                          {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSignalRKey...}
Script     1.2.0      Az.SignalR                          {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSignalRKey...}
Script     3.2.0      Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set-AzSqlDat...
Script     2.16.0     Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set-AzSqlDat...
Script     1.1.0      Az.SqlVirtualMachine                {New-AzSqlVM, Get-AzSqlVM, Update-AzSqlVM, Remove-AzSqlVM...}
Script     3.8.0      Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script     3.3.0      Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script     1.5.0      Az.StorageSync                      {Invoke-AzStorageSyncCompatibilityCheck, New-AzStorageSyncService, Get-AzStorageSyncService, Set-AzStorageSyn...
Script     1.4.0      Az.StorageSync                      {Invoke-AzStorageSyncCompatibilityCheck, New-AzStorageSyncService, Get-AzStorageSyncService, Set-AzStorageSyn...
Script     2.0.0      Az.StreamAnalytics                  {Get-AzStreamAnalyticsCluster, Get-AzStreamAnalyticsClusterStreamingJob, Get-AzStreamAnalyticsDefaultFunction...
Script     1.0.1      Az.StreamAnalytics                  {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefaultFunctionDefinition, New-AzStreamAnalyticsFunction...
Script     1.0.0      Az.Support                          {Get-AzSupportService, Get-AzSupportProblemClassification, Get-AzSupportTicket, Get-AzSupportTicketCommunicat...
Script     1.0.4      Az.TrafficManager                   {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTrafficManagerCustomHeaderFromEndpoint, Add-AzTrafficMa...
Script     2.7.0      Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...}
Script     2.3.0      Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...}
Script     1.0.1      Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}
Binary     1.0.193... Microsoft.RDInfra.RDPowershell      {Get-RdsContext, Set-RdsContext, Add-RdsAccount, Get-RdsTenant...}
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script     3.4.0      Pester                              {Describe, Context, It, Should...}
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}
Script     2.0.0      PSReadline                          {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remove-PSReadLineKeyHandler, Get-PSReadLineOption...}

Debug output

**Create disk from the copied VHD file**
DEBUG: 2:59:46 PM - NewAzureRmDisk begin processing with ParameterSet 'DefaultParameter'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: 2:59:48 PM - using account id 'ruoshen@microsoft.com'...

Confirm
Are you sure you want to perform this action?
Performing the operation "New" on target "FromSnapshot1".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: [Common.Authentication]: Authenticating using Account: 'ruoshen@microsoft.com', environment: 'AzureCloud', tenant: '72f988bf-86f1-41af-91ab-2d7cd011db47'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:  ExpiresOn:
2021-06-30T07:44:40.0000000+00:00
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:  ExpiresOn:
2021-06-30T07:44:40.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: '72f988bf-86f1-41af-91ab-2d7cd011db47', UserId: 'ruoshen@microsoft.com'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/$SubscriptionId/resourceGroups/$resourcegroup/providers/Microsoft.Compute/disks/$DiskName?api-version=2020
-09-30

Headers:
x-ms-client-request-id        : 6ed7605b-127a-40d5-a51b-e1010ab8a7ee
accept-language               : en-US

Body:
{
  "sku": {
    "name": "Premium_LRS"
  },
  "properties": {
    "osType": "Windows",
    "hyperVGeneration": "V2",
    "creationData": {
      "createOption": "Import",
      "storageAccountId": "$AccountId",
      "sourceUri": "$VHD_URL"
    },
    "diskSizeGB": 128
  },
  "location": "East US",
  "tags": {}
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
InternalServerError

Headers:
Pragma                        : no-cache
Retry-After                   : 180
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-served-by                : f7156c21-45b7-46e6-b930-65fcfb2c73ea_132345932634047111
x-ms-request-id               : deb10b8f-8d85-40a4-815d-6e9e78f4000a
Cache-Control                 : no-cache
Server                        : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-failure-cause            : service
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-correlation-request-id   : 6ba51f43-ccea-444a-b20d-b45762d48906
x-ms-routing-request-id       : JAPANEAST:20210630T070019Z:6ba51f43-ccea-444a-b20d-b45762d48906
X-Content-Type-Options        : nosniff
Date                          : Wed, 30 Jun 2021 07:00:18 GMT
Connection                    : close

Body:
{
  "error": {
    "code": "InternalOperationError",
    "message": "An internal error occurred in the operation."
  }
}

DEBUG: AzureQoSEvent: CommandName - New-AzDisk; IsSuccess - True; Duration - 00:00:33.0785069
DEBUG: Finish sending metric.
DEBUG: 3:00:20 PM - NewAzureRmDisk end processing.

Confirm
An internal error occurred in the operation.
ErrorCode: InternalOperationError
ErrorMessage: An internal error occurred in the operation.
ErrorTarget:
StatusCode: 500
ReasonPhrase: Internal Server Error
OperationID : deb10b8f-8d85-40a4-815d-6e9e78f4000a
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
New-AzDisk : An internal error occurred in the operation.
ErrorCode: InternalOperationError
ErrorMessage: An internal error occurred in the operation.
ErrorTarget:
StatusCode: 500
ReasonPhrase: Internal Server Error
OperationID : deb10b8f-8d85-40a4-815d-6e9e78f4000a
At line:1 char:1
+ New-AzDisk -ResourceGroupName 'Skywalkers' -DiskName 'FromSnapshot1'  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzDisk], ComputeCloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.Automation.NewAzureRmDisk

DEBUG: AzureQoSEvent: CommandName - New-AzDisk; IsSuccess - False; Duration - 00:00:33.0785069; Exception - Microsoft.Azure.Commands.Compute.Common.ComputeCloudException:
 An internal error occurred in the operation.
ErrorCode: InternalOperationError
ErrorMessage: An internal error occurred in the operation.
ErrorTarget:
StatusCode: 500
ReasonPhrase: Internal Server Error
OperationID : deb10b8f-8d85-40a4-815d-6e9e78f4000a ---> Microsoft.Rest.Azure.CloudException: An internal error occurred in the operation.
   at Microsoft.Azure.Management.Compute.DisksOperations.<BeginCreateOrUpdateWithHttpMessagesAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Management.Compute.DisksOperations.<CreateOrUpdateWithHttpMessagesAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Management.Compute.DisksOperationsExtensions.<CreateOrUpdateAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Azure.Management.Compute.DisksOperationsExtensions.CreateOrUpdate(IDisksOperations operations, String resourceGroupName, String diskName, Disk disk)
   at Microsoft.Azure.Commands.Compute.Automation.NewAzureRmDisk.<ExecuteCmdlet>b__0_0()
   at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
   --- End of inner exception stack trace ---
   at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
   at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 3:01:02 PM - NewAzureRmDisk end processing.

**Incremental copy the second managed disk snapshot**
cmdlet Start-AzStorageBlobIncrementalCopy at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
DestContainer: snapshots
DestBlob: incrementalsnapshot.vhd
DEBUG: 2:52:53 PM - Init Operation Context for 'StartAzureStorageBlobIncrementalCopy' with client request id
Azure-Storage-PowerShell-a4b83c79-b4c7-40b4-871e-acb546be23b6. If you want to get more details, please add "-Debug" to your command.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: 2:52:55 PM - StartAzureStorageBlobIncrementalCopy begin processing with ParameterSet 'UriPipeline'.
DEBUG: 2:52:55 PM - Use storage account 'snapshotstorage1' from storage context.

Confirm
Are you sure you want to perform this action?
Performing the operation "Copy" on target
"https://md-prt4c0nm4zmb.z28.blob.storage.azure.net/q1s2jcw4jww3/abcd?snapshot=2021-06-29T10%3A25%3A10.2191954Z&sv=2018-11-09&sr=bs&si=e4a860be423f450f9a6a2358f6726e36222
3d3668f3a41319c33325e40359b15&sig=OmQsg1d7j74eSCjaLWdkJ3cO0bloOk2v3KCifjvEfmI%3D".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: 2:52:56 PM - Start 3th remote call, method: , destination:
https://md-prt4c0nm4zmb.z28.blob.storage.azure.net/q1s2jcw4jww3/abcd?sv=2018-11-09&sr=bs&si=e4a860be423f450f9a6a2358f6726e362223d3668f3a41319c33325e40359b15&sig=OmQsg1d7j
74eSCjaLWdkJ3cO0bloOk2v3KCifjvEfmI=&api-version=2019-07-07&snapshot=2021-06-29T10:25:10.2191954Z.

Confirm
Server encountered an internal error. Please try again after some time. HTTP Status Code: 500 - HTTP Error Message: Server encountered an internal error. Please try again
 after some time.
ErrorCode: InternalError
ErrorMessage: Server encountered an internal error. Please try again after some time.
RequestId:b0f37a66-c01e-008a-807c-6dccd7000000
Time:2021-06-30T06:53:28.9773794Z
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
Start-AzStorageBlobIncrementalCopy : Server encountered an internal error. Please try again after some time. HTTP Status Code: 500 - HTTP Error Message: Server
encountered an internal error. Please try again after some time.
ErrorCode: InternalError
ErrorMessage: Server encountered an internal error. Please try again after some time.
RequestId:b0f37a66-c01e-008a-807c-6dccd7000000
Time:2021-06-30T06:53:28.9773794Z
At line:1 char:1
+ Start-AzStorageBlobIncrementalCopy -AbsoluteUri "https://md-prt4c0nm4 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Start-AzStorageBlobIncrementalCopy], StorageException
    + FullyQualifiedErrorId : StorageException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.StartAzureStorageBlobIncrementalCopy

DEBUG: 2:53:50 PM - StartAzureStorageBlobIncrementalCopy end processing, Start 7 remote calls. Finish 7 remote calls. Elapsed time 12134719.03 ms. Client operation id:
Azure-Storage-PowerShell-a4b83c79-b4c7-40b4-871e-acb546be23b6.
DEBUG: AzureQoSEvent: CommandName - Start-AzStorageBlobIncrementalCopy; IsSuccess - False; Duration - 00:00:54.4453415; Exception -
Microsoft.Azure.Storage.StorageException: Server encountered an internal error. Please try again after some time. HTTP Status Code: 500 - HTTP Error Message: Server
encountered an internal error. Please try again after some time.
ErrorCode: InternalError
ErrorMessage: Server encountered an internal error. Please try again after some time.
RequestId:b0f37a66-c01e-008a-807c-6dccd7000000
Time:2021-06-30T06:53:28.9773794Z ---> Microsoft.Azure.Storage.StorageException: Server encountered an internal error. Please try again after some time.
   at Microsoft.Azure.Storage.Core.Executor.Executor.<ExecuteAsync>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.StartAzureStorageBlobIncrementalCopy.<StartCopyFromUri>d__60.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.StartAzureStorageBlobIncrementalCopy.<StartCopyAsync>d__63.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.WindowsAzure.Commands.Storage.Common.LimitedConcurrencyTaskScheduler.<RunConcurrentTask>d__26.MoveNext()
   --- End of inner exception stack trace ---
Request Information
RequestID:b0f37a66-c01e-008a-807c-6dccd7000000
RequestDate:Wed, 30 Jun 2021 14:53:29 GMT
StatusMessage:Server encountered an internal error. Please try again after some time.
ErrorCode:InternalError
ErrorMessage:Server encountered an internal error. Please try again after some time.
RequestId:b0f37a66-c01e-008a-807c-6dccd7000000
Time:2021-06-30T06:53:28.9773794Z
;
DEBUG: Finish sending metric.
DEBUG: 2:53:51 PM - StartAzureStorageBlobIncrementalCopy end processing.

Error output

blueww commented 3 years ago

@ruoyu-shen

There's a SAS issue is specific to incremental copy and the fact that we are returning snapshot SAS. So unfortunately, user cannot use incremental copy (from managed snapshots) until the issue is fixed. As a work around user can obtain the diff using GetPageRangeDiff and copy the modified ranges using insert page. This is the link that shows how to use getPageRange with incremental snapshots: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-incremental-snapshots

So this is a know server issue, not Powershell issue.

As we discussed offline, I will close this issue. Feel free to contact us again if you need more assistance on Azure PowerShell.