sandia-minimega / minimega

minimega
GNU General Public License v3.0
148 stars 66 forks source link

minimega: broken containers #1373

Closed jcrussell closed 4 years ago

jcrussell commented 4 years ago

Describe your environment

  1. minimega version: 2.6
  2. Linux distro/version: debian 10, newer ubuntu
  3. Go compiler version: N/A
  4. VM types: containers

Describe the bug

ERROR namespace.go:452: launch error, host en76.100g -- create tap: set MAC failed: exit status 1: Cannot find device "veth0"

Maybe something change with the ip tool?

jasoncontrib commented 4 years ago

Looks like the created veth has a changed naming convention, minimega expects the new interface to be called veth0, but it's actually mega@if27 on my machine:

2019/10/23 07:13:31 DEBUG ip.go:59: creating veth: mega_tap0 meganet_0
2019/10/23 07:13:31 DEBUG process.go:32: cmd "ip link add mega_tap0 type veth peer mega netns meganet_0" completed in 2.62279ms, output:

2019/10/23 07:13:31 DEBUG process.go:32: cmd "ip netns exec meganet_0 ip link show" completed in 47.48758ms, output:
 1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: mega@if27: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 66:3f:f0:d7:17:8a brd ff:ff:ff:ff:ff:ff link-netnsid 0

2019/10/23 07:13:31 INFO ip.go:16: up interface: mega_tap0
2019/10/23 07:13:31 DEBUG process.go:32: cmd "ip link set mega_tap0 up" completed in 1.29362ms, output:

2019/10/23 07:13:31 DEBUG ip.go:84: setting MAC: meganet_0 veth0 ac:a3:1e:af:12:8d
2019/10/23 07:13:31 DEBUG process.go:32: cmd "ip netns exec meganet_0 ip link set dev veth0 address ac:a3:1e:af:12:8d" completed in 66.172692ms, output:
 Cannot find device "veth0"