Forum Discussion
JasonYeung
Oct 17, 2025Brass Contributor
Creating Azure SQL VM with same name as VM
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: I want to move this resourc...
Kidd_Ip
Oct 18, 2025MVP
You may try this to recreate the SQL VM resource and link it to your existing VM (with SQL Server already installed):
- Ensure SQL Server is installed on the VM and properly configured.
- Use PowerShell or Azure CLI to register the SQL VM resource manually:
- This avoids using the marketplace image and lets you reuse the original OS disk.
Register-AzSqlVM -ResourceGroupName "YourRG" -Name "YourVMName" -LicenseType PAYG
-
- This command links the SQL VM metadata to your existing VM without creating new disks.
- If the name conflict persists, you may need to:
- Temporarily rename the VM or SQL VM resource.
- Register the SQL VM resource.
- Rename it back after successful registration.