-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HyperV improvements for DHCP and default switch #3578
base: main
Are you sure you want to change the base?
Conversation
This PR has a dependency on #3573 |
service: Service = self.node.tools[Service] | ||
|
||
# Install DHCP server | ||
self.node.tools[WindowsFeatureManagement].install_feature("DHCP") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When is it needed? Hyper-V can assign IP addresses to VMs, it doens't need the DHCP server. When using the DHCP server, it's need to be careful, because it may conflict with lab DHCP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Lab, nested VMs will get IPs from LAN DHCP using external Hyper-V Switch.
In Azure Windows Hyper-V hosts, We need to setup our own DHCP server with Internal Switch.
This will be used only in "HyperVPreparationTransformer" not in common Hyper-V environment setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Lab, nested VMs will get IPs from LAN DHCP using external Hyper-V Switch.
In Azure Windows Hyper-V hosts, We need to setup our own DHCP server with Internal Switch.
This will be used only in "HyperVPreparationTransformer" not in common Hyper-V environment setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Azure Windows Hyper-V hosts, We need to setup our own DHCP server with Internal Switch.
Can you include a reference of official public document on how it works in the code comment? I need to take a look, and the code needs to be documented by comments also. My understanding is that the internal network is managed by HyperV, including IP address assignment. And the external switch doesn't work, if no extra IP address is assigned in the subnet on Azure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the reference doc to the PR description. Repasting it here as well.
" My understanding is that the internal network is managed by HyperV, including IP address assignment." - This may be true on Windows desktop versions but I found DHCP config needed on Win server 2025.
Hyperv improvements for DHCP and default switch Added below new functionality: 1 get_default_internal_switch 2 configure_dhcp
a2981fe
to
e0f68ab
Compare
Co-authored-by: Chi Song <[email protected]>
Added below new functionality:
1. get_default_internal_switch
2. configure_dhcp
These changes improve the HyperV tool by adding new functionality to get the default internal switch and configure DHCP to set HyperV environment in an Azure Windows Server Host.
Reference doc:
https://techcommunity.microsoft.com/blog/itopstalkblog/how-to-setup-nested-virtualization-for-azure-vmvhd/1115338