Change the Host Name or IP Address

You can change the host name, the IP address, and the virtual IP address after XCO is deployed.

Before you begin

Review the following host name requirements:
  • Host name changes are supported in single-node and multi-node deployments.
  • IP address changes are supported in single-node deployments.
  • Virtual IP address (VIP) changes are supported in multi-node deployments.
  • Host names must be unique and consist of numeric characters and lowercase alphabetic characters. Do not use uppercase alphabetic characters.
  • Hyphens are the only special characters allowed. No other special characters are allowed by Kubernetes for cluster formation or by the K3s service.

About this task

Follow this procedure to change the host name, IP address, and virtual IP address.

Procedure

  1. To change the host name, take the following steps.
    1. On a server installation, run the following Linux command to change the host name of the system:
      hostnamectl set-hostname <new name>
      • Update the new host name in /etc/hosts.
      • In a TPVM deployment, run the following SLX command to change the host name of the system.
        device(config-tpvm-TPVM)# hostname <new name>
    2. Run the following command as a root user or as a user with sudo privileges.
      Important

      Important

      Do not reboot the system before running this command.
      sudo bash efa-change-hostname <old host name>
      
      Reading host name of the system
      Restarting mariadb service
      Restarting k3s service
      Checking k3s for the new host name
      Host is in ready state in k3s
      Setting current host as active node
      Deleting old host name references
      Waiting for EFA containers to start
      Successfully updated host name in EFA
      In a single-node deployment, XCO is inactive during this step. In a multi-node deployment, XCO stays active when the command is run on the standby node but becomes inactive if the command is run on the active node.
  2. To change the IP address of a single-node deployment, take the following steps.
    1. Run the following command as a root user or as a user with sudo privileges.
      sudo bash efa-change-ip
      
      Updating IP in EFA
      Restarting k3s service
      Updating all files with new IP
      Deleting EFA services: gonotification-service gofabric-service gotenant-service
      goauth-service gorbac-service goinventory-service govcenter-service gohyperv-service goraslog-service efa-api-docs gosystem-service
      Waiting for EFA containers to start
      Successfully updated IP in EFA
      XCO is not operational during this step.
      In a TPVM deployment, you can run the command from /apps/bin/.
      In a single-node deployment of XCO on TPVM, changing the IP address of a node is not supported for all the IP mode (IPv4, IPv6, and Dual IP modes) deployment types.
    2. After the IP address is updated, run source /etc/profile or open a new XCO session to log in.
  3. To change the VIP of a multi-node deployment, complete the following steps:
    1. Change the directory.
      • On TPVM-based deployment
        cd /apps/bin/
      • On Server-based deployment
        cd /usr/local/bin
    2. Run the following command:
      sudo bash efa-change-vip <New-VIP>
    Note

    Note

    After the Virtual IP address (VIP) update is successful, it takes a few minutes to update new VIP in all the registered devices in XCO.