Can't change DNS name for a new VM

adminje 0 Reputation points

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

    Hi Johannes,

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

    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.



  2. GitaraniSharma-MSFT 49,356 Reputation points Microsoft Employee

    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 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 "" 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.