XenServer

Troubleshoot networking

If you are experiencing problems with configuring networking, first ensure that you have not directly changed any of the control domain ifcfg-* files. The control domain host agent manages the ifcfg files directly, and any changes are overwritten.

Diagnosing network corruption

Some network card models require firmware upgrades from the vendor to work reliably under load, or when certain optimizations are turned on. If you see corrupted traffic to VMs, try to obtain the latest firmware from your vendor and then use it to update your hardware.

If the problem still persists, then you can use the CLI to disable receive or transmit offload optimizations on the physical interface.

Warning:

Disabling receive or transmit offload optimizations can result in a performance loss and increased CPU usage.

First, determine the UUID of the physical interface. You can filter on the device field as follows:

xe pif-list device=eth0
<!--NeedCopy-->

Next, set the following parameter on the PIF to disable TX offload:

xe pif-param-set uuid=pif_uuid other-config:ethtool-tx=off
<!--NeedCopy-->

Finally, replug the PIF or restart the host for the change to take effect.

Emergency network reset

Incorrect networking settings can cause loss of network connectivity. When there is no network connectivity, XenServer host can become inaccessible through XenCenter or remote SSH. Emergency Network Reset provides a simple mechanism to recover and reset a host’s networking.

The Emergency network reset feature is available from the CLI using the xe-reset-networking command, and within the Network and Management Interface section of xsconsole.

Incorrect settings that cause a loss of network connectivity include renaming network interfaces, creating bonds or VLANs, or mistakes when changing the management interface. For example, typing the wrong IP address. You may also want to run this utility in the following scenarios:

  • When a rolling pool upgrade, manual upgrade, hotfix installation, or driver installation causes a lack of network connectivity, or

  • If a pool coordinator or host in a resource pool is unable to contact with other hosts.

Use the xe-reset-networking utility only in an emergency because it deletes the configuration for all PIFs, bonds, VLANs, and tunnels associated with the host. Guest Networks and VIFs are preserved. As part of this utility, VMs are shut down forcefully. Before running this command, cleanly shut down the VMs where possible. Before you apply a reset, you can change the management interface and specify which IP configuration, DHCP, or Static can be used.

If the pool coordinator requires a network reset, reset the network on the pool coordinator first before applying a network reset on pool members. Apply the network reset on all remaining hosts in the pool to ensure that the pool’s networking configuration is homogeneous. Network homogeneity is an important factor for live migration.

Note:

If the pool coordinator’s IP address (the management interface) changes as a result of a network reset or xe host-management-reconfigure, apply the network reset command to other hosts in the pool. This is to ensure that the pool members can reconnect to the pool coordinator on its new IP address. In this situation, the IP address of the pool coordinator must be specified.

Network reset is NOT supported when High Availability is enabled. To reset network configuration in this scenario, you must first manually disable high availability, and then run the network reset command.

Verifying the network reset

After you specify the configuration mode to be used after the network reset, xsconsole and the CLI display settings that will be applied after host reboot. It is a final chance to modify before applying the emergency network reset command. After restart, the new network configuration can be verified in XenCenter and xsconsole. In XenCenter, with the host selected, select the Networking tab to see the new network configuration. The Network and Management Interface section in xsconsole display this information.

Note:

Run emergency network reset on other pool members to replicate bonds, VLANs, or tunnels from the pool coordinator’s new configuration.

Using the CLI for network reset

The following table shows the available optional parameters which can be used by running the xe-reset-networking command.

Warning:

Users are responsible to ensure the validity of parameters for the xe-reset-networking command, and to check the parameters carefully. If you specify invalid parameters, network connectivity and configuration can be lost. In this situation, we advise that you rerun the command xe-reset-networking without using any parameters.

Resetting the networking configuration of a whole pool must begin on the pool coordinator, followed by network reset on all remaining hosts in the pool.

Parameter Required/Optional Description
-m, --master Optional IP address of the pool coordinator’s management interface. Defaults to the last known pool coordinator’s IP address.
--device Optional Device name of the management interface. Defaults to the device name specified during installation.
--mode=static Optional Enables the following four networking parameters for static IP configuration for the management interface. If not specified, networking is configured using DHCP.
--ip Required, if mode=static IP address for the host’s management interface. Only valid if mode=static.
--netmask Required, if mode=static Netmask for the management interface. Only valid if mode=static.
--gateway Optional Gateway for the management interface. Only valid if mode=static.
--dns Optional DNS Server for the management interface. Only valid if mode=static.
--vlan Optional VLAN tag for the management interface. Defaults to the VLAN tag specified during installation.

Pool cooordinator command-line examples

Examples of commands that can be applied on a pool coordinator:

To reset networking for DHCP configuration:

xe-reset-networking
<!--NeedCopy-->

To reset networking for Static IP configuration:

xe-reset-networking --mode= static --ip=ip-address \
    --netmask=netmask --gateway=gateway \
    --dns=dns
<!--NeedCopy-->

To reset networking for DHCP configuration if another interface became the management interface after initial setup:

xe-reset-networking --device=device-name
<!--NeedCopy-->

To reset networking for Static IP configuration if another interface became the management interface after initial setup:

xe-reset-networking --device=device-name --mode=static \
    --ip=ip-address --netmask=netmask \
    --gateway=gateway --dns=dns
<!--NeedCopy-->

To reset networking for management interface on VLAN:

xe-reset-networking --vlan=VLAN TAG
<!--NeedCopy-->

Note:

The reset-network command can also be used along with the IP configuration settings.

Pool member command-line examples

All previous examples also apply to pool members. Additionally, the pool coordinator’s IP address can be specified (which is necessary if it has changed.)

To reset networking for DHCP configuration:

xe-reset-networking
<!--NeedCopy-->

To reset networking for DHCP if the pool coordinator’s IP address was changed:

xe-reset-networking --master=pool-coordinator-ip-address
<!--NeedCopy-->

To reset networking for Static IP configuration, assuming the pool coordinator’s IP address didn’t change:

xe-reset-networking --mode=static --ip=ip-address --netmask=netmask \
    --gateway=gateway --dns=dns
<!--NeedCopy-->

To reset networking for DHCP configuration if the management interface and the pool coordinator’s IP address was changed after initial setup:

xe-reset-networking --device=device-name --master=pool-coordinator-ip-address
<!--NeedCopy-->
Troubleshoot networking