How to Add a Permanent Search Domain Entry in the Resolv.conf File of a XenServer Host

This post describes how to add a permanent search domain entry in the resolv.cof of a XenServer Host. Because if you try to manually edit resolv.conf to add search domains the entries are not persistent after the XenServer Host reboot.

Instructions

The following are the requirements:

  • XenServer 5.0 and later
  • Access to the command line interface of the XenServer host
  • The Network Interface Cards (NICs) on the XenServer host must be configured with a static IP address

Complete the following procedure:

  1. To identify the management NIC on a given host run, run the following command:
    xe pif-list host-name-label= management=true
  2. To add the static search domain entry to the resolv.conf:
    xe pif-param-set uuid= other-config:domain=searchdomain.net
  3. Reboot the XenServer Host.
  4. The cat /etc/resolv.conf displays the search domain entry.

Note: Multiple search domain entries can be entered separated by commas:

xe pif-param-set uuid= other-config:domain=searchdomain.net,searchdomain2.net

 

Applicable Products

Sources:

CTX118840

I am a Senior System Administrator that work daily with Virtualization,Xenserver, Linux, IT automation, Ansible,Windows, Active Directory, Exchange and a lot more. Here you will find tips and trix from early junior, middle junior and senior to unique information of the topics I mentioned earlier. If you need help with something do not hesitate to contact me I will gladly help.

Tagged with: , ,