I just created a new Linux VM in vCenter 6.0; I spun it up from an .iso file, applied all patches, gave it an IP, etc. It is using the interface name 'ens160'.
I then shut it down and cloned it to a new VM. I powered this new VM on and went to update it's hostname and IP address, but it is not on the network. When I do an "ip addr", it shows that it is trying to use an interface named "ens192", yet in /etc/sysconfig/network-scripts there is still only a file called "ifcfg-ens160" that I've updated.
Did I miss something? Why is my clone trying to use a network interface with a different name than the original, and that it doesn't have a config file for?
Thanks all!
Answering my own question. Apparently it is a known and well documented phenomena that when you clone a VM in vCenter it assigns it a new MAC address, but does not actually update the MAC address in the /etc/sysconfig/network-scripts/ifcfg-xxxx file. I copied down the MAC address listed for the VM as the vCenter showed it, opened a console to the VM, edited the /etc/sysconfig/network-scripts/ifcfg-ens160 file to set the HWADDR value to reflect what vCenter was showing, saved the file, and rebooted the VM. When it came back up - viola - good to go!
Mahalo!
Answering my own question. Apparently it is a known and well documented phenomena that when you clone a VM in vCenter it assigns it a new MAC address, but does not actually update the MAC address in the /etc/sysconfig/network-scripts/ifcfg-xxxx file. I copied down the MAC address listed for the VM as the vCenter showed it, opened a console to the VM, edited the /etc/sysconfig/network-scripts/ifcfg-ens160 file to set the HWADDR value to reflect what vCenter was showing, saved the file, and rebooted the VM. When it came back up - viola - good to go!
Mahalo!
This is why you use customization specs when you're going to clone from a template. Create one for Linux with the necessary parameters and if a static IP is requested, it'll update it automatically.