We run several linux VM's on our Hyper-V cluster. Our old IT manager configured the dns server to resolve the url 'devlabs.ourdomain.com' to a debian squeeze apache webserver hosted on the hyper v cluster with the hostname: devlabs.

We recently created a new Ubuntu vm to replace the original squeeze vm. When we created the new Ubuntu VM we used the same hostname of 'devlabs" to name the new VM.

My problem is that now I am only able to access the new Ubuntu VM by using the IP address.

How can I update our DNS server to point the url 'devlabs.ourdomain.com' to the new VM?

The DNS server is a Debian squeeze VM, the dns installation is the one where you select the server type during installation.

  • Was this old server the DNS server, or what is your dns server for ourdomain.com. You must find the servers that are authoritative for ourdomain.com, and update the record there.
    – Zoredache
    Commented Dec 19, 2012 at 0:44
  • The dns server has not changed, we built a new vm and assigned it the same hostname as the old vm.
    – OpenCoderX
    Commented Dec 19, 2012 at 2:00
  • @opensourcechris : When your other servers need to know the IP address of "devlabs", they will ask the DNS server. You need to make the change on the DNS server. There are other ways to handle this besides DNS (Entries in /etc/hosts , settings in DHCP) but DNS is used 99% of the time. Commented Dec 19, 2012 at 2:13

3 Answers 3


You just have to replace the IP address in the DNS record for devlabs.ourdomain.com. How this is done depends on the kind of DNS server you run, which you don't name.

Another option would be to just give the new server the same IP address as the old had. Of course, the old machine has to be down for this to work without conflicts.

  • The DNS server is a Debian Squeeze VM, with DNS server chosen during installation. I think the new Ubuntu VM has an IP address assigned by dhcp.
    – OpenCoderX
    Commented Dec 19, 2012 at 2:03
  • @opensourcechris : You still need to update the record on the DNS server. Commented Dec 19, 2012 at 2:06
  • By "the kind of DNS server you run" SvenW means which name server software, not which OS. Examples of choices that could run on Ubuntu include BIND, OpenDNS, djbdns, etc. Unless you have made a conscious change otherwise, probably you are running BIND. Commented Dec 20, 2012 at 14:27

If the new server is replacing the old one, I would give it the same IP to avoid possible problems. As you said it is using DHCP, fix the IP in dhcp server using the new MAC address and in this case you don't need to update the DNS server.

To answer your question on how to update the DNS server if you don't use the same IP as the old server, you didn't say which is your DNS server but I bet it is bind so you need to go to /etc/bind and edit the zone file for your domain editing the A record for devlabs with the new IP and update (increase) the serial number of the zone (in the "header" of the file - you can see an example file with comments).

When done restart bind (sudo /etc/init.d/bind9 restart) and have a look at the end of /var/log/syslog to see if the zone loaded without problems.

Obs: you said the server is getting IP from DHCP but be sure the IP is always the same (reserve the IP for its MAC address) because there is no point in updating the DNS if the IP changes.


How can I update our DNS server to point the url 'devlabs.ourdomain.com' to the new VM?

It depends on what DNS server you are using, which you do not specify. On BIND the sequence of events would usually be something like: identify the master name server for the zone. on the master, make a change to the zone master file to change the contents. instruct BIND to reload the zone using "rndc reload myzone.example.org" if you have rndc set up (better), otherwise stop and restart the name server (undesirable.) allow time for propagation of the new zone information to any secondary authoritative servers, which (if properly configured) should receive notifies from the master server to update their information via zone transfer. The sequence is slightly simpler if you are using dynamic updates.

However, keep in mind that even after you have made the change there may be clients out there trying to use the old address for a while. DNS Resource Records all have an associated TTL ("time to live") value which specifies how long they are allowed to be cached by another server. Servers which properly honor this value (alas, not all of them do) should be reliably answering queries with the new value by time (Time of change on last authoritative server) + (TTL in seconds) but until that time other servers that have cached an answer are legitimately allowed to give a client the old value in answer to a query.

Common strategies for mitigating this problem are to reduce the TTL value of Resource Records prior to a change or to operate on both servers until the TTL expires and DNS settles on the new address.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .