For the general case let's say that the virtual adapter for eth0 has been removed and replaced with another one. Either due to cloning or, more recently, a rash of MAC address conflicts. [Yes, a rash of them.]
Usually I simply
rm /etc/udev/rules.d/70-persistent-net-rules and check that nothing in /etc/sysconfig/network* contains a reference to a MAC address and reboot, but this is Linux and there must be a way to avoid rebooting.
Is there a command I can run to pick up the new NIC?
In addition to @dawud's answer below I ran into an issue on my test VM where it had already booted with the new device in place and had it named
eth1 in which case
udevadm does not seem to 'release' the device. In this case I did the following:
- Get the MAC address of the device from VSphere.
/etc/iftabwith the line
eth0 mac ##:##:##:##:##:##substituting in the MAC address.
ifrenamedoes not seem to like it when this file does not exist/contain the name of the destination interface.
ifrename -i eth1 -n eth0
service network restartand eth0 started up normally.
rm /etc/iftabso there's one less place for a MAC to live.