vmware cloned network

Issues related to configuring your network
eddieho98
Posts: 4
Joined: 2014/07/13 00:57:34

vmware cloned network

Postby eddieho98 » 2014/07/13 01:02:57

Hi all,
I just installed CentOS 7 on a vmware vm. Then I cloned to a new vm using vmware vCenter Converter. After that, I can't start ethernet. I have already fixed the file /etc/sysconfig/network-scripts/ifcfg-eno4333458 with mac address from vmware player. I still can't start the network device.
Previous advice on CentOS 6 talks about a file /etc/udev/rules.d/70-persistent-net.rules but there is no such a file on CentOS 7.

Any advice on how to re-create the ethernet device? I have to use clone for many types of dev/test purposes.
Thanks,
Eddie

Hellboy
Posts: 116
Joined: 2010/07/18 09:46:18

Re: vmware cloned network

Postby Hellboy » 2014/07/13 08:45:21

When cloning vm's you have to do some more work:

- delete /etc/udev/rules.d/70-persistent-net.rules
- remove HWADDR in de network configuration files in /etc/sysconfig/network-scripts
- remove ssh host keys in /etc/sshd

Reboot en reconfigure your hosts.

eddieho98
Posts: 4
Joined: 2014/07/13 00:57:34

Re: vmware cloned network

Postby eddieho98 » 2014/07/13 11:29:13

Hi,
As I said before, I can't see any /etc/sysconfig/network-scripts/70-persistent-net.rules. This is the only file I have in /etc/udev/rules.d/ of CentOS 7:
98-kexec.rules
There is no /etc/sysconfig/network-scripts/HWADDR as well.

On the other hand, CentOS 6.5 has these files:
ls /etc/udev/rules.d
60-fprint-autosuspend.rules 90-hal.rules
60-pcmcia.rules 97-bluetooth-serial.rules
60-raw.rules 98-kexec.rules
70-persistent-cd.rules 99-fuse.rules
70-persistent-net.rules 99-vmware-scsi-udev.rules
90-alsa.rules

If I run this on CentOS 7:
ifup eno4333458
It says no device found but I am sure the mac address inside /etc/sysconfig/network-scripts/ifcfg-eno4333458 is matching what I can see from vmware.

I have been using this process of cloning in the last 2 years for CentOS. It seems that there has been some changes to handle mac address change. I suppose changing a network card will face the same issue.
Regards,
Eddie

eddieho98
Posts: 4
Joined: 2014/07/13 00:57:34

Re: vmware cloned network

Postby eddieho98 » 2014/07/13 11:30:51

I did follow your advice to remove ssh host keys and rebooted but it didn't help.
When you mean "reconfigure the host", do you mean running any particular command?

Please advise.
Thanks,
Eddie

Hellboy
Posts: 116
Joined: 2010/07/18 09:46:18

Re: vmware cloned network

Postby Hellboy » 2014/07/14 08:05:30

You can also use sys-unconfig. If you have networkmanager active in Centos 7,maybe you need to remove your connections and then clone the machine.

Zinfander
Posts: 1
Joined: 2014/12/03 20:28:40

Re: vmware cloned network

Postby Zinfander » 2014/12/03 20:31:45

I,

I have been experiencing the same issue as you described, did you, by chance, found a solution to it?

Adm@Avn
Posts: 1
Joined: 2014/12/30 09:18:24

Re: vmware cloned network

Postby Adm@Avn » 2014/12/30 09:33:34

Use the network manager ( nmtui ) to solve this. After cloning you will found two network connections at the network manager. One named "Wired Connection 1" and the other one named "ens160". Edit the Wired Connection and note the MAC address. Then delete the Wired Connection. After that edit the ens160 connection and change the MAC address to the address you have noted. Exit network manager and restart network service or the machine. The MAC address you need you will also found at the properties of your VM if you choose the Network adapter settings.

eddieho98
Posts: 4
Joined: 2014/07/13 00:57:34

Re: vmware cloned network

Postby eddieho98 » 2014/12/30 14:35:00

The problem should be at vmware vCenter Converter. Even the latest v5.5.3 released after Red Hat 7 has the same issue.

The solution is to add this line to .vmx file of the vm:
ethernet0.virtualDev = "e1000"

without this line for CentOS (Redhat) 7, directory /sys/class/net of cloned CentOS only has a one file "lo" but no network card device for the network interface. Even manually add/remove interface from vmware player cannot fix the problem.

Then follow other steps such as
1. generate a new mac address from vmware
2. edit the file /etc/sysconfig/network-scripts/ifcfg-eno* to have matching MAC address as previous step

restart network will see ethernet interface working. In fact, step 2 is not required but I just did it to keep consistent configuration.

Hope this helps.
Cheers,
Eddie

agapitorojas
Posts: 1
Joined: 2015/02/11 20:49:00

Re: vmware cloned network

Postby agapitorojas » 2015/02/11 20:58:04

I had the same problem here. Add the new MAC address in the ifcfg-* file solved it.

jimbo8098
Posts: 11
Joined: 2015/01/30 03:06:11

Re: vmware cloned network

Postby jimbo8098 » 2015/02/21 16:16:05

Glad to see you guys spotted that!

That's all it was. It seems like you got confused by what Hellboy said above and looked for the HWADDR file in /etc/sysconfig/network-scripts/ but really, he meant that you needed to change the HWADDR line inside your existing /etc/sysconfig/network-scripts/ config file.

I've never actually seen the persistent routes cause a problem with our Xen platform (which uses similar cloning techniques) but now that Hellboy mentions it, he is right, that could indeed have caused the problem


Return to “CentOS 7 - Networking Support”

Who is online

Users browsing this forum: No registered users and 2 guests