I'm quite new to hyperv and I am having problems setting up network access for my VMs. The host has two physical network ports and I've assigned one to an external virtual switch.

I've then setup two CentOS VMs to connect via the external switch.

The issue I'm having is that only one VM at a time is able to connect to the external network at a time.

  • VM1 by itslef works fine
  • VM2 by itself works fine
  • VM1 and VM2 together = race condition where the first one to get an ip address wins.

I can get it working with the VMs using an internal switch, however the IP addresses are only visible from the host (they are internally assigned IPs) and I can't then get to the VMs from outside of the host.

Any ideas or reccommendation anyone?

Many Thanks, Vackar

  • Badly configured VM's. Are they cloned? Copied? So that they share the same MAC address?
    – TomTom
    Feb 18 '15 at 18:35
  • Are you using DHCP as the IP configuration method for your guests? If so, do you have connectivity when switching to manual IP configuration? Further, do you have fancy stuff in your network environment which would prevent a single swith port from learning more than X (e.g. X=1) mac addresses as a security measure?
    – the-wabbit
    Feb 18 '15 at 21:18
  • Yes the VMs have been cloned, but I've changed their mac addresses and they obtain ip addresses via DHCP. Switching to static IP addresses doesn't seem to make any difference either. I'll check with IP dept if there is some kind of mac address security, but I'd be surprised if there was. Thanks for the advice, Vackar Feb 19 '15 at 9:10

Just checked and it turns out switches need to be white listed on the network, so yes 'thewabbit' you were correct the one mac-address per physical port rule. Workaround looks like having to use NAT port forwarding from the pubic IP address to the internal ones - not ideal but should do the trick.

Thanks again for the advice, Vackar

  • If you've figured out how to use NAT on the virtual switch I'd love to hear how you did it.
    – gnarbarian
    Aug 13 '15 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.