Skip to main content

Reset host networking from the CLI in an emergency

VKB-1170How-to
📦 Applies to
XCP-ng
🗓️ Created
2025-08-20
🔄 Updated
2026-08-12

Environment​

An XCP-ng host whose management network is misconfigured and unreachable from XO. Run this from the host console: it reconfigures the management interface, so an SSH session over that interface will drop.

Procedure​

Static address, no VLAN:

root@xcp-ng
# xe-reset-networking --device=eth0 --mode=static --novlan --ip=10.10.10.10 --netmask=255.255.255.0 --gateway=10.10.10.1 --dns=10.10.10.1

DHCP on a VLAN:

root@xcp-ng
# xe-reset-networking --device=eth0 --mode=dhcp --vlan=100

Useful options:

OptionMeaning
-m, --master=ADDRESSthe master's address, for a slave
--device=DEVICEdevice name of the new management interface
--mode=MODEnone, dhcp or static, default dhcp
--mode-v6=MODE_V6none, dhcp, autoconf or static, default none
--novlanno VLAN on the new management interface
--vlan=VLANVLAN id for the new management interface
--ip, --netmask, --gateway, --dnsstatic configuration

Verification​

The host reboots as part of the reset. Once it is back, confirm the management interface and that the pool sees it:

root@xcp-ng
# xe pif-list management=true params=IP,device,VLAN
# xe host-list params=name-label,enabled

On a slave, pass --master so it rejoins the pool rather than coming back isolated.