dockur / windows

Windows inside a Docker container.
MIT License
17.54k stars 1.5k forks source link

[Question]: Multiple network interfaces #511

Closed ttocsr closed 4 days ago

ttocsr commented 4 months ago

Is your question not already answered in the FAQ?

Is this a general question and not a technical issue?

Question

Is it possible to pass multiple network interfaces from the host via macvlan to the VM? I've tried creating two macvlan networks pointing to the two physical network interfaces on the host I want to pass to the container. When I attach to the shell of the container the interfaces are there. Is it possible to get them to come up in the VM?

kroese commented 4 months ago

I have not build-in support for that, but you can pass extra QEMU parameters via your compose file. So if you know exactly which command you need, you can add it yourself. For example:

environment:
  ARGUMENTS: "-netdev user,id=hostnet1 -device virtio-net-pci,romfile=,netdev=hostnet1,id=net1"

will add a second network adapter with user-mode networking (see https://wiki.qemu.org/Documentation/Networking ).