How to clone from a template with a proper network interface?

Sraw

New Member
May 31, 2018
2
0
1
25
When I create a VM of Centos6.9, and then I convert it to a template.

After that, I clone a VM from this template, but the problem is the name of network interface.

As Proxmox generates a new MAC address, in `/etc/udev/rules.d/70-persistent-net.rules`, there is a new device named `eth1` with the new generated MAC address. But in `/etc/sysconfig/network-scripts`, there is only device eth0.

If I delete `70-persistent-net.rules` and reboot the VM, it will be regenerated and the device name will be `eth0`, then everything works well.

So my question is, how to clone from a template and let the new cloned VM have the proper network interface settings?
 
You can remove the 70-persistent-net.rules from de template.
Actually, I have tried but failed. Then I try `ln -s /dev/null /path/to/70-persistent-net.rules` and it works.

Although it works, I am still confusing about it... Why just deleting doesn't work but create a soft link to `null` can work. :/