IPs - Glowstudent777/xcpng-install-guide GitHub Wiki

Switching from DHCP to Static & Vice Versa

XO Lite / XCP-ng

Either SSH into the host or access the host machines interface. For SSH users use the command xsconsole.

Navigate to Network and Management Interface > Configure Management Interface. Select the NIC, usually eth0, and select the desired IP mode.

VMs

Either SSH into the host or access the host machines interface. For host access users go to the Local Command Shell option.

Run xe vm-list to get a list of VMs and their corresponding UUIDs. Take note of the UUID of the machines to change the IP mode of.

To configure IPv4 settings for the virtual machine, set IPv4 settings as below:

vif-configure-ipv4 uuid=[UUID] mode=[static | DHCP | none] address=[IP] gateway=[gateway IP]

For example:

vid-configure-ipv4 uuid=[UUID] mode=static address=" 192.168.1.10/24" gateway="192.168.1.1"

To clean IPv4 settings use:

vif-configure-ipv4 uuid=[UUID] mode=none