Can't change DNS name for a new VM

adminje 0 Reputation points
2023-05-26T06:27:52.2433333+00:00

I am not sure if this question is about "Azure DNS", but anyway since I am forced to use a predefined tag. I am working at a university, and we have a Microsoft Azure Account. I use this account to set up a GitLab server. Unfortunately I had to kill the server vm completely and setup a new one. All the data is still there, and I could use the new server with a new optional DNS name (just one word is different, gitlab2 instead of gitlab). However, I would like to change the DNS name back from gitlab2 to gitlab again. But Azure doesn't let me do this, it says "DNS-Namenbezeichnung nicht verfügbar. Verwenden Sie eine andere Bezeichnung." which means that gitlab is not available, use another one. But gitlab was in use for the old server, so it shouldn't be in use anymore. A collegue adviced me to wait 48 hours, but this deadline is over now, and it is still refusing it. How long do I have to wait for the old DNS entry to really be vanished? Or do I have to explicitely delete this name?

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
631 questions
{count} votes

2 answers

Sort by: Most helpful
  1. TP 83,221 Reputation points
    2023-05-27T11:42:53.9233333+00:00

    Hi Johannes,

    In the Azure portal, please check if you have an existing public IP address for your previous VM, using link below:

    https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Network%2FPublicIpAddresses

    If the public IP address for your old VM is there, what you can do is click on the public IP address for your new VM, click Dissociate, then when that is finished saving go back and click on the old public IP address, click Associate, choose Network Interface, and select the network interface for your new VM.

    Essentially what you are doing in above paragraph is removing the new public IP address from the network interface of your VM and then linking the old public IP address to it instead. Note that this will affect any connections you may have to your VM so if you have something important going on you may want to wait or you could complete while VM is Stopped.

    Please let me know your findings/results, whether positive or negative.

    Thanks.

    -TP


  2. GitaraniSharma-MSFT 49,356 Reputation points Microsoft Employee
    2023-05-27T12:05:02.8233333+00:00

    Hello @adminje ,

    I understand that you are trying to add a previously used DNS label to the Public IP of your Azure VM and it is failing with following error "DNS name label is in use".

    I requested you to do a nslookup or Resolve-DnsName on that DNS FQDN and check if you see any IP address mapped to it.

    NOTE: Use the FQDN such as gitlab.location.cloudapp.azure.com where location should be replaced with the region.

    If any IP address is mapped, we will validate if that IP is still available in your subscription or has been taken by another customer.

    You found an IP address mapped and I requested you to search that Public IP address "20.107.92.179" in your Azure Portal and see if you have any existing resource with this IP address.

    You can directly search the IP in your Azure Portal as below and if it is available in your subscription, it should list a resource:

    enter image description here

    If you find the Public IP address in your subscription, you can either associate it with your new VM or remove the DNS label from this Public IP and add the label in your new Public IP.

    However, if you don't find the Public IP address in your subscription, then it would be difficult to find out who owns this IP without the help from the support team. Even the support team will not share the details of other customer due to privacy concerns and will only share the resource name/type at best which is using the DNS label.

    You found the IP in your subscription and were able to disassociate it from the attached resource and associate it to your new VM and the issue has now been resolved.

    Kindly let us know if you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.