Creating Azure SQL VM with same name as VM

Jason Yeung 86 Reputation points
2025-10-17T22:42:58.76+00:00

Hi,

Currently we have a resource group, which contains a Virtual Machine and SQL Virtual Machine (and a few other resources). The VM and SQL VM has the same name:

001_old resource group masked

I want to move this resource group (and its resources) to another subscription. We tried using Resource Mover, but we couldn't as there are backups. I tried the steps in the following link:

https://petri.com/copy-azure-vm-using-managed-disk-snapshots/

I was successful in moving 5 of the 6 resources to the new subscription, but was unable to move the SQL virtual machine:

002_new resource group masked

I tried to create a SQL virtual machine, but it says I can't create one with the same name:

005_create Azure SQL error duplicate name - masked

I found that in order to create a VM and SQL VM's with the same name, in the above image, I have to choose an image that has SQL Server and Windows. But this doesn't allow me to use the original managed disk (it only has an OS disk) and it also creates a couple of more disks, which are not in the original resource group.

I was wondering if there are recommendations on how to create a SQL VM that has the same name as the VM in the same resource group and are also linked to each other.

Jason

Azure Resource Mover
Azure Resource Mover
An Azure service used for moving multiple resources between Azure regions.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Siva shunmugam Nadessin 3,340 Reputation points Microsoft External Staff Moderator
    2025-10-21T16:55:16.6333333+00:00

    The below query helped in resolving the issue.

    Thanks Jason Yeung for your response.

    New-AzSqlVM -Name "myVMName" -ResourceGroupName "myResourceGroupName" -Location "West US" -LicenseType PAYG
    
    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Suchitra Suregaunkar 4,045 Reputation points Microsoft External Staff Moderator
    2025-10-18T00:15:34.7766667+00:00

    Hello Jason Yeung

    Thank you for posting your query on Microsoft Q&A platform.

    When moving virtual machines configured with Azure Backup, the operation is blocked if restore point collections (snapshots) exist in the Recovery Services vault. To proceed:

    • Delete the restore point collections from the vault. Restore points already copied to the vault can be retained and moved.
    • If Soft Delete is enabled, you cannot move the VM while those restore points are retained. Either disable Soft Delete or wait 14 days after deleting the restore points.

    The below query helped in resolving the issue

    New-AzSqlVM -Name "myVMName" -ResourceGroupName "myResourceGroupName" -Location "West US" -LicenseType PAYG
    
    

    Thanks,

    Suchitra.

    0 comments No comments

Your answer

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