Add virtual interface to your VM
The Virtual Machines provided by the Cloud Infrastructure usually come with only one interface (eth0). Nonetheless, in some corner cases, additional interfaces can be a requirement to be able to run some applications inside the VM (license servers, traffic separation, etc).
We describe two different options to add interfaces into a VM. 1. The recipe to add a new virtual interface to a VM. 2. Request to add multiples interfaces to a VM.
The recipe to add a new virtual interface to a VM.
Rename eth0 to eth1
cd /etc/sysconfig/network-scripts/ mv ifcfg-eth0 ifcfg-eth1 vim ifcfg-eth1 (replace all eth0 with eth1) vim /etc/udev/rules.d/70-persistent-net.rules (and replace eth0 with eth1) reboot
Add a new interface and rename it to eth0
ip link add type veth ip link set dev veth0 addr e6:02:03:04:05:06 ip ad ip link set dev veth0 name eth0
After this you should be able to have two interfaces in your VM, eth1 as your main one and eth0 as your virtual one with the desired MAC address.
Send a request to Cloud-Infrastructure to add multiples interfaces to a VM.
In order to do this please open a ticket to the Cloud team via the CERN Service Desk
In this case the VM will have both eth0 and eth1 available.