2

We have a Windows Server 2012 Failover Cluster with three hosts. We have a Redhat vm in the cluster that can freely migrate between the three hosts. But every time the vm migrates to a different host and reboots for any reason, the ethernet interface in the vm changes and the vm loses connectivity.

The below picture is a screenshot of ifconfig -a command from the first time the vm turns on, with the correct ethernet configuration and ip addresses. enter image description here

The below picture is a screenshot of the file /etc/udev.rules.d/70-persistent-net.rules from the first time the vm turns on. enter image description here

The below picture is a screenshot of ifconfig -a command after the vm migrates to a different host and reboots.

enter image description here

And the picture below is from the same file after the vm migrates to a different host and reboots. enter image description here

We need that the vm keeps the same ethernet configuration eth0 and eth1 every time that move to a different host and roboot. Thank you

2
3

By default in most VM Hosts, the MAC is dynamically assigned and usually changes on reboot or host migration. You can usually set a static MAC for a VM. You may need to change some settings about your VM environment to allow the MAC to migrate in the networking environment such as enabling MAC spoofing and forged transmits.

  1. In Hyper-V or Failover Cluster Manager, edit the settings for your VM.
  2. Go to the "Network Adapter" and expand to the "Advanced Features".
  3. Change the "MAC Address" Radio button to "Static" versus "Dynamic". You'll need to provide the MAC address, but you should be able to put the current one.

For a RHEL/CentOS system, you may need to modify the NIC configuration to allow MAC changes to the NIC. See below.

  1. Open the Redhat vm and edit ifcfg-ethx (x is the interface number) file if needed. Run command "vi /etc/sysconfig/network-script/ifcfg-ethx" and change all lines with HWADDR to #HWADDR

enter image description here

  1. Move 70-persistent-net.rules file to a temp folder to allow regeneration of the file in the next reboot. Create a temp foler "mkdir /home/tmp-net-rules" and move the file "mv /etc/udev/rules.d/70-persistent-net.rules"
  2. Reboot the vm "reboot"
2
  • Hi @duct_tape_coder, thank you for your answer. I was able to fix it with your answer. I also found a couple of other configurations that I had to do inside the RedHat vm in order to make it work completely. I would like to edit your answer to add those configurations as well. – Felix D. Feb 14 '20 at 15:58
  • Go ahead, then mark as answer please =) – duct_tape_coder Feb 15 '20 at 16:13

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.