rancher / old-vm

(OBSOLETE) Package and Run Virtual Machines as Docker Containers
Apache License 2.0
645 stars 133 forks source link

Bridge vm / container to physical host interface? #52

Closed pwFoo closed 9 years ago

pwFoo commented 9 years ago

Is there a tutorial how to bridge a vm / container to a physical interface or add a second network interface? It isn't only rancher vm related, but that could be my first use case.

sheng-liang commented 9 years ago

I added instructions to bridge to the host interface: https://github.com/rancherio/vm/blob/master/docs/networking.md

It is possible to add a second network interface as well, however that requires adding a second interface into the container and changing the start script significantly. It is much more involved.

pwFoo commented 9 years ago

Hi @sheng-liang, thanks for instructions for bridged network! It sounds additional interface is to complex.

My server have 3 network cards. That's why it would be interesting to bridge container / vm container to the second hardware interface instead of eth0. But it looks like docker only handles one interface?

sheng-liang commented 9 years ago

Right. You can always manually program a second or third interface into a container, but Docker would not know anything about it.

pwFoo commented 9 years ago

I have no experience with container networking, so I have to google and read about how to do it. Thanks for answering my questions here :)