Centos 6/7 network issues after moving VM to another Hyper-V server

Well moved VM ok it start OK but networking was all changed to DHCP etc. So I went through some basic steps:
nmcli d
nmcli c modify eth0 ipv4.addresses 192.168.1.10/24
nmcli c modify eth0 ipv4.gateway 192.168.1.1
nmcli c modify eth0 ipv4.dns 192.168.1.5
nmcli c modify eth0 ipv4.method manual
nmcli c down eth0; nmcli c up eth0
nmcli d show eth0

And still nothing. I then looked closely at the uuid and of course that changed during the move to new virtual server. Running the command:
dmidecode | grep -i uuid

this gives new uuid to replace in the /etc/sysconfig/network-scripts/ifcfg-eth0 file and now the restart of the network kicks in again.

One more thing – it is possible that under some circumstances (steps that you execute out of order) the ID of the card may change as well so always check!

 

Cheers

 

Print Friendly, PDF & Email

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.