Skip to content

[backport] Add DHCP setting for VIF IP configuration#7124

Merged
psafont merged 1 commit into
xapi-project:26.1-lcmfrom
xcp-ng:dnt/vif-config-dhcp-backport
Jun 11, 2026
Merged

[backport] Add DHCP setting for VIF IP configuration#7124
psafont merged 1 commit into
xapi-project:26.1-lcmfrom
xcp-ng:dnt/vif-config-dhcp-backport

Conversation

@dinhngtu

Copy link
Copy Markdown
Contributor

XAPI exposes a VIF.configure_ipv4/v6 message to instruct guest agents to configure the VM's IP settings on the host's behalf.

This feature currently works by setting /local/domain//xenserver/ device/vif//static-ip-setting/enabled to one of the following values:

enabled=0: None (unconfigured), so IP settings are decided by the VM
itself
enabled=1: Static, using the address and gateway values in the same key

From the modes above, there's no way to go from a static IP config back to DHCP, and therefore, someone wanting to switch back to DHCP would need to log into the VM and make the changes there.

Add a new VIF configuration mode that specifies enabled=2. This mode instructs the guest to configure its VIF to use DHCP (on IPv4) or any appropriate method to obtain an IP address automatically (on IPv6).

Backport of #7118.
(cherry picked from commit d045710)

XAPI exposes a VIF.configure_ipv4/v6 message to instruct guest agents to
configure the VM's IP settings on the host's behalf.

This feature currently works by setting /local/domain/<domid>/xenserver/
device/vif/<N>/static-ip-setting/enabled to one of the following values:

enabled=0: None (unconfigured), so IP settings are decided by the VM
           itself
enabled=1: Static, using the address and gateway values in the same key

From the modes above, there's no way to go from a static IP config back
to DHCP, and therefore, someone wanting to switch back to DHCP would
need to log into the VM and make the changes there.

Add a new VIF configuration mode that specifies enabled=2. This mode
instructs the guest to configure its VIF to use DHCP (on IPv4) or any
appropriate method to obtain an IP address automatically (on IPv6).

Signed-off-by: Tu Dinh <ngoc-tu.dinh@vates.tech>
(cherry picked from commit d045710)
@psafont psafont added this pull request to the merge queue Jun 11, 2026
Merged via the queue into xapi-project:26.1-lcm with commit 49a31fa Jun 11, 2026
14 checks passed
@dinhngtu dinhngtu deleted the dnt/vif-config-dhcp-backport branch June 11, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants