@Sreekanth Kannan Welcome to Microsoft Q&A Forum, Thank you for posting the query here!
It sounds like you have a good plan for migrating your Microsoft File Server Hyper-V VM to new hardware and renaming it. You are correct that the Azure Files configuration should not be affected by the migration itself, as long as the Azure Files Agent continues to run on the new hardware and the VHD file is still in the same location.
However, you are also correct that the Azure File Sync Agent is mapped to the hostname of the server, so you will need to update the mapping after you rename the server. Here are the steps you can follow:
Before you rename the server, stop the Azure File Sync Agent service on the old server.
Rename the server and make sure that the new name is resolvable by DNS.
On the new server, install the Azure File Sync Agent and configure it to use the same storage account and sync group as the old server.
Start the Azure File Sync Agent service on the new server.
Open the Azure portal and navigate to the sync group that is associated with the old server.
Click on the "Endpoints" tab and remove the old server endpoint.
Click on the "Add endpoint" button and add the new server endpoint.
Verify that the sync group is syncing correctly to the new server.
In addition to the above steps, you may also need to update any scripts or applications that reference the old server name to use the new server name instead.
Overall, your approach seems reasonable and should work as long as you follow the steps above. However, I would recommend testing the migration and renaming process in a non-production environment first to make sure that everything works as expected before doing it in production.
Rename a sync group
A sync group cannot be renamed. Its name is part of the URL with which the child resources cloud endpoint and server endpoints are stored and managed. Choose the name carefully when you create the resource.
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.