[backport] Add DHCP setting for VIF IP configuration#7124
Merged
psafont merged 1 commit intoJun 11, 2026
Conversation
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
approved these changes
Jun 11, 2026
last-genius
approved these changes
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)