XCAT Change the hostname of an existing node

From Define Wiki
Jump to navigation Jump to search

Remove the old names from the services

makedns -d <noderange>
makedhcp -d <noderange>
makegocons -d <noderange>

# node range works as follows
makedns -d stu-hcb[4-5]-n[1-4]
Handling stu-hcb5-n2 in /etc/hosts.
Handling stu-hcb5-n4 in /etc/hosts.
Handling stu-hcb4-n3 in /etc/hosts.
Handling stu-hcb5-n1 in /etc/hosts.
Handling stu-hcb4-n4 in /etc/hosts.
Handling stu-hcb5-n3 in /etc/hosts.
Handling stu-hcb4-n2 in /etc/hosts.
Handling stu-hcb4-n1 in /etc/hosts.

Rename the node

# node1 being the old name / node2 being the new name
chdef -t node -o node1 -n node2

Regenerate the configuration files for services with the new names

makehosts
makedns -n
makedhcp -a
makegocons