User Tools

Site Tools


user:kkrauss1:portfolio:dnsaddvm05

Adding a VM server to the lair DNS

Preparation

  • The first thing we want to do is log into the VM server, using the IP address
  • Log into the vm server and type 'ifconfig' and hit enter
  • Take note of the mac address. It is listed as HWaddr

DNS setup

  • The router and DNS are on the same machine in the lair, so we need to log into the router(Matt will supply the information on how to do so)
  • Once you are logged into the router/dns we want to edit 3 files using sudo and an editor of your choice

/etc/dhcpd.conf

  • Once you have opened the file, you will actually see a plethora of information in its header, I strongly suggest reading it.
  • Scroll down until you see “HPC Class Virtual Machine Servers”
  • You will see a list of the current virtual servers on the dns, to add yours add this text:
host vmserver##.student.lab {
        hardware ethernet "Mac address(HWaddr);
        fixed-address vmserver##.student.lab;
}
  • Remember to change ## to your VM server number and input the mac address you notated earlier in “Mac address(HWaddr)”
  • Save the changes and move onto the next file

/var/named/master/10.80.3

  • This file is what will allow an ip address to be converted to a host name.
  • Once you have opened the file you will see a number underneath ns1.student.lab., this number is actually a date with a two digit revision number at the end. If the date listed is not the current date you want to change it so that it is. If it is the current date, increase the revision number by 1.
  • Now scroll down the list and fine an open ip address, it will be commented out with a ; in front of it to indicate it is free.
  • Now find “; student VM servers”
  • Now add this line:
"##"              IN              PTR             vmserver##.student.lab.
  • Make sure to replace the first ## with the free ip you chose to use and the second ## with your sever number
  • Save the changed and move onto the final file

/var/named/master/student.lab

  • This file will allow a host name to be converted to an ip address
  • Once you have opened the file you will see a number underneath ns1.student.lab., this number is actually a date with a two digit revision number at the end. If the date listed is not the current date you want to change it so that it is. If it is the current date, increase the revision number by 1.
  • Scroll down and find “; student VM servers”
  • Add this line:
vmserver##              A               10.80.3.##
  • Again do not forget to replace the ##'s with your server number and ip address
  • Save your changes

Finishing up

  • All edits that need to be made are complete so now we want to restart the DNS server so the new changes take effect
  • Type: “sudo update-services ” and hit enter
  • If everything went ok with the update/restart we can try to log into our VM server with its host name.
  • If you cannot log in via a host name right away, do not fret, there is another server in the lair that might cause things not to work right away, simply wait for a little bit.

References

  • Matt Haas was my only reference on this one
user/kkrauss1/portfolio/dnsaddvm05.txt · Last modified: 2012/03/20 15:28 by kkrauss1