CLOUDSTACK-10023: Windows VMs with Multiple Nics fail to access internet #2213
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.
REPRO STEPS:
Create a Windows VM with Multiple NICs
Ensure that only one of the NICs can actually access internet (set that as default NIC in ACS)
Try to access internet
EXPECTED BEHAVIOR:
Windows VM should be able to access internet
ACTUAL BEHAVIOR:
Windows VM is not able to access internet
Windows will experience issue if we have multiple default gateway assigned as explained in "Multiple Default Gateways Can Cause Connectivity Problems" (https://support.microsoft.com/en-us/kb/159168).
You may want to make Windows to select certain gateway always, we can change interface metrics:
Go to your Network adapter properties
Select Internet Protocol v4.
Click the Advanced button on General tab.
Uncheck Automatic metric.
Enter a number higher than 10 to the Interface metric field.
The default automatic metric for interfaces is 10. The lower the metric, the higher the preference to use it. So, we have to enter metric higher than 10 for the interfaces you don't want to use. This is because if Windows has multiple interfaces connected to several networks that use DHCP, it installs default gateways for all those interfaces. By default, Windows sets the metric of the default gateways to the same, effectively leading to random selection of default gateway.
Window stand point the above mentioned issue can be resolved by setting metric for NICs inside guest OS