Generate xe CLI commands for XCP-ng VLAN networks and NIC bonds as a ready-to-run shell script.
XCP-ng is an open-source hypervisor based on the Xen Project, managed via the XAPI toolstack and the <code>xe</code> command-line interface. Network configuration in XCP-ng involves three main objects: PIFs (Physical Interface bindings to host NICs), Networks (virtual switches VMs attach to), and VLANs (tagged subnetworks created on top of a PIF). Bonds aggregate multiple PIFs for redundancy or increased throughput.
Select the operation type (VLAN Network, NIC Bond, or Management Network reconfiguration), fill in the network name, VLAN ID or bond member PIFs, and optional MTU. The tool generates a shell script of <code>xe</code> commands using shell variables to capture UUIDs from each step. UUID placeholders are clearly marked where they must be substituted with values from the target host.
PIF UUIDs are host-specific. Run xe pif-list host-uuid=$(xe host-list --minimal) on the target host to find the correct UUID for each physical interface. The Step by Step tab includes comments explaining each command and common pitfalls such as the IP= uppercase requirement for pif-reconfigure-ip and the need to call xe bond-set-mode after bond creation.