Storage Mover - AZSM1042 - CLAIM TARGET FAILURE]

Phil 271 Reputation points
2025-02-27T09:02:27.8533333+00:00

Hello together,

i have an Issue with the Storage Mover.
i tried to synchronize an onPrem Fileshare with an Storage Accoun File Share.

The Storage Mover displays the error “AZSM1042 -CLAIM TARGET FAILURE]” when executing the job.

The FileShare is onboarded with an private Endpoint.
The necessary Right for the Identity are configured on the FIle Share Level.

Here is the complete error message:

Job failed state transition: (Started,Claimed -> Failed,Claimed). Message: Failed to claim target container Container in xxx: [CLAIM TARGET FAILURE] Unexpected error occurred while attempting claim on target container: Put "https://xxx.file.core.windows.net/xxx/__AZURE_STORAGE_MOVER_MARKER": EOF

What has already been tried:

  1. The STorage Account was changed to Public Endpoint for an test.
  2. An attempt was made to specify the fileshare directly as the destination and not a subfolder

The Microsoft Docs Troublehsooting Steps does not really help.

There it is described that it is a temporary error and otherwise you should open a Microsoft ticket.

Any Ideas?

Thanks.

Best Regards,
Phil

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,414 questions
{count} votes

Accepted answer
  1. Venkatesan S 585 Reputation points Microsoft External Staff
    2025-03-03T09:48:09.6133333+00:00

    Hi Phil

    Welcome to Microsoft Q&A

    Since you’ve already verified permissions, tested with a public endpoint, and still face the same issue, let’s go deeper.

    1. Test manual uploading via Azcopy :

    Command:

    azcopy copy "C:\testfile.txt" "https://<storage-account>.file.core.windows.net/<share-name>/testfile.txt?<SAS token>" --from-to=LocalFile --recursive
    

    If this fails, it’s a connectivity issue rather than a Storage Mover issue.

    1. Check which Storage Mover identity can claim the Azure File Share first. Then, connect using the Storage Mover identity that can claim the target file share.

    Command:

     Connect-AzAccount -Identity$storage
     Context = New-AzStorageContext -StorageAccountName "<your-storage-account>" -UseConnectedAccount
     New-AzStorageFile -ShareName "<your-file-share>" -Path "testfile.txt" -Context $storageContext
    

    If this fails, it’s a storage-level issue, not a Storage Mover issue.

    1. Check Storage Mover Logs.

    Command:

    StorageMoverJobRunLogs
    | where TimeGenerated > ago(3d) 
    | where StatusCode != "AZSM0000"   // Filter out success logs
    | project TimeGenerated, JobRunName, StatusCode, Message
    | order by TimeGenerated desc
    

    The above query will list all job failures in the last 3 days, including the error code.

    1. If you have a specific Job Run ID, replace [job run ID] and check errors:

    Command:

    StorageMoverCopyLogsFailed 
    | where TimeGenerated > ago(30d) 
    | where JobRunName == "[job run ID]"
    | project TimeGenerated, JobRunName, StatusCode, Message
    | order by TimeGenerated desc
    
    1. Run this PowerShell command to check the file share quota and used capacity:

    Command:

    $accountName = "xxxx"
    $accountKey = "xxxx"
    $shareName = "xxx"
    $ctx = New-AzStorageContext -StorageAccountName $accountName -StorageAccountKey $accountKey
    $share = Get-AzStorageShare -Name $shareName -Context $ctx
    $client = $share.ShareClient
    $stats = $client.GetStatistics()
    $usedBytes = $stats.Value.ShareUsageInBytes
    $usedGB = [math]::Round([float]($usedBytes / 1GB), 2)
    $quotaGB = [float]$share.Quota
    Write-Host "Quota: $quotaGB GB"
    Write-Host "Used Space: $usedGB GB"
    

    Reference:

    Hope this answer helps! please let us know if you have any further queries. I’m happy to assist you further.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.     


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.