BBVA/kvm

Rename kvm-macvlanN with random id

methadata opened this issue · 0 comments

We have discovered that when launching a second KVM container, the macvtap/macvlan devices creation fails, because container says that

RTNETLINK answers: File exists
Cannot find device "kvm-macvtap0"
cat: /sys/class/net/kvm-macvtap0/address: No such file or directory
cat: /sys/devices/virtual/net/kvm-macvtap0/tap*/dev: No such file or directory  

Although this is something that needs further investigation (why does a vNIC device in a container affects to a different one in another container?), the proposed workaround is to ad a random id to the vNIC name, so it will be named like kvm-macvtapf50d