• No results found

Changing networking configuration options

This section discusses how to change the networking configuration of a XenServer host. This includes:

• changing the hostname

• adding or removing DNS servers

• changing IP addresses

• changing which NIC is used as the management interface

• adding a new physical NIC to the server Hostname

The system hostname is defined in the pool-wide database and modified using the xe host-set-hostname-live CLI command as follows:

xe host-set-hostname-live uuid=<host_uuid> host-name=example

The underlying control domain hostname changes dynamically to reflect the new hostname.

DNS servers

To add or remove DNS servers in the IP addressing configuration of a XenServer host, use the pif-reconfigure-ip command. For example, for a PIF with a static IP:

pif-reconfigure-ip uuid=<pif_uuid> mode=static DNS=<new_dns_ip>

Changing IP address configuration for a standalone host

Network interface configuration can be changed using the xe CLI. The underlying network configuration scripts should not be modified directly.

To modify the IP address configuration of a PIF, use the pif-reconfigure-ip CLI command. See the section called “pif-reconfigure-ip” for details on the parameters of the pif-reconfigure-ip command.

Note:

See the section called “Changing IP address configuration in resource pools” for details on changing host IP addresses in resource pools.

Changing IP address configuration in resource pools

XenServer hosts in resource pools have a single management IP address used for management and communication to and from other hosts in the pool. The steps required to change the IP address of a host's management interface are different for master and other hosts.

Note:

Caution should be used when changing the IP address of a server, and other networking parameters.

Depending upon the network topology and the change being made, connections to network storage may be lost. If this happens the storage must be replugged using the Repair Storage function in XenCenter, or the pbd-plug command using the CLI. For this reason, it may be advisable to migrate VMs away from the server before changing its IP configuration.

Changing the IP address of a pool member host

1. Use the pif-reconfigure-ip CLI command to set the IP address as desired. See Appendix A, Command line interface for details on the parameters of the pif-reconfigure-ip command:

xe pif-reconfigure-ip uuid=<pif_uuid> mode=DHCP

2. Use the host-list CLI command to confirm that the member host has successfully reconnected to the master host by checking that all the other XenServer hosts in the pool are visible:

xe host-list

Changing the IP address of the master XenServer host requires additional steps because each of the member hosts uses the advertised IP address of the pool master for communication and will not know how to contact the master when its IP address changes.

Whenever possible, use a dedicated IP address that is not likely to change for the lifetime of the pool for pool masters.

To change the IP address of a pool master host

1. Use the pif-reconfigure-ip CLI command to set the IP address as desired. See Appendix A, Command line interface for details on the parameters of the pif-reconfigure-ip command:

xe pif-reconfigure-ip uuid=<pif_uuid> mode=DHCP

2. When the IP address of the pool master host is changed, all member hosts will enter into an emergency mode when they fail to contact the master host.

3. On the master XenServer host, use the pool-recover-slaves command to force the master to contact each of the member hosts and inform them of the new master IP address:

xe pool-recover-slaves

Management interface

When XenServer is installed on a host with multiple NICs, one NIC is selected for use as the management interface. The management interface is used for XenCenter connections to the host and for host-to-host communication.

To change the NIC used for the management interface

1. Use the pif-list command to determine which PIF corresponds to the NIC to be used as the management interface. The UUID of each PIF is returned.

xe pif-list

2. Use the pif-param-list command to verify the IP addressing configuration for the PIF that will be used for the management interface. If necessary, use the pif-reconfigure-ip command to configure IP addressing for the PIF to be used. See Appendix A, Command line interface for more detail on the options available for the pif-reconfigure-ip command.

xe pif-param-list uuid=<pif_uuid>

3. Use the host-management-reconfigure CLI command to change the PIF used for the management interface. If this host is part of a resource pool, this command must be issued on the member host console:

xe host-management-reconfigure pif-uuid=<pif_uuid>

Warning:

Putting the management interface on a VLAN network is not supported.

Disabling management access

To disable remote access to the management console entirely, use the host-management-disable CLI command.

Warning:

Once the management interface is disabled, you will have to log in on the physical host console to perform management tasks and external interfaces such as XenCenter will no longer work.

Adding a new physical NIC

Install a new physical NIC on a XenServer host in the usual manner. Then, after restarting the server, run the xe CLI command pif-scan to cause a new PIF object to be created for the new NIC.