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:
- To identify the management NIC on a given host run, run the following command:
xe pif-list host-name-label= management=true
- To add the static search domain entry to the resolv.conf:
xe pif-param-set uuid= other-config:domain=searchdomain.net
- Reboot the XenServer Host.
- 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: