Skip to content

Conversation

@jayakarteek
Copy link
Contributor

@jayakarteek jayakarteek commented Jul 31, 2017

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

if (!nic.isDefaultNic()) {
final GuestOSVO guestOS = _guestOSDao.findById(vm.getGuestOSId());
if (guestOS == null || !guestOS.getDisplayName().toLowerCase().contains("windows")) {
gatewayIp = "0.0.0.0";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jayakarteek I'm not sure it's best to put a 0.0.0.0 as gateway IP

@yadvr
Copy link
Member

yadvr commented Aug 19, 2017

@jayakarteek let's find another way to fix this, I'm -1 on having assumptions about the type of guest VMs

@DaanHoogland
Copy link
Contributor

@jayakarteek please rebase and re-open if still relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants