0

I have a qemu-aarch64 commandline that uses a network in bridged mode like this.

qemu-system-aarch64 -nographic -machine virt -m 1G -smp 4 \
    -cpu cortex-a53 \
    -kernel ${illumos_dir}/usr/src/psm/stand/boot/aarch64/virt/inetboot.bin \
    -append "-D /virtio_mmio@a003e00" \
    -netdev bridge,id=net0,br=${IFACE} \
    -device virtio-net-device,netdev=net0,mac=52:54:00:70:0a:e4 \
    -device virtio-blk-device,drive=hd0 \
    -drive file=${disk_img},format=raw,id=hd0,if=none \
    -semihosting-config enable=on,target=native \
    -gdb tcp::1234

Inside of the container I can not use -netdev bridge,id=net0,br=${IFACE} because of failed to add interface 'tap0' to bridge 'eth0': Operation not supported so I am looking for a -netdev commandline that works inside a container but that allows -append "-D /virtio_mmio@a003e00" to still work. Best would be if somebody can tell me how to get this commandline working with this -netdev arg.

I start the container with docker-compose

  qemu_aarch64:
    build: "./qemu-installer"
    networks:
      - "illumosaarchdev"
    volumes:
      - "./:/data:rw"
    cap_add:
      - ALL
    depends_on:
      - nfs_root
      - tftp
      - dhcp
    devices:
      - "/dev/net/tun:/dev/net/tun"
Toasterson
  • 115
  • 1
  • 2
  • 11
  • How are you starting the container? – larsks Aug 27 '22 at 22:52
  • With docker-compose. I added a snippet of it. – Toasterson Aug 27 '22 at 23:16
  • Git repo with configs and shel script is here https://github.com/toasterson/illumos-aarch64-devenv – Toasterson Aug 27 '22 at 23:26
  • Is `br0` a bridge device that exists on your host (outside of the container)? Because you're not exposing your host network devices inside the container. – larsks Aug 27 '22 at 23:54
  • the br0 device is just an example. the device gets deteced by the entrypoint script inside the container and usually ends up being eth0 – Toasterson Aug 28 '22 at 00:01
  • In that case I'm confused, because `eth0` isn't a bridge, so you couldn't use it as the argument for the `br=` parameter. The "operation not supported" error makes a lot of sense in that context. – larsks Aug 28 '22 at 00:03
  • Would I need an additional command to setup the docker interface as bridge? – Toasterson Aug 28 '22 at 00:08
  • @larsks In this case, `eth0` is actually a bridge... as the error message suggests. But this question has absolutely nothing to do with programming... found this one: https://superuser.com/questions/1526529/qemu-kvm-error-unable-to-add-bridge-tap0-port-vnet0-operation-not-supported – Martin Zeitler Aug 28 '22 at 00:55
  • The pointers in those replies did not help, I know I can use networkmode tap and user but as the interface is not bridgable anymore I can not use bridge inside the container. So I will need to switch network. – Toasterson Aug 28 '22 at 02:20

0 Answers0