On Thu, Feb 4, 2021 at 1:11 PM George Papathanail
<papathanai...@gmail.com> wrote:
>
> Thank you Rayomond,
>
> I followed these steps:
>
> 1) sudo lxc-start -n c2 -d --logfile=logs
> 2) ovs-vsctl add-br switch0
> ip add add 192.168.100.1/24 dev switch0
>
> I have these two scripts:
> BRIDGE=switch0 ovs-vsctl --may-exist add-br $BRIDGE ovs-vsctl --if-exists 
> del-port $BRIDGE $5 ovs-vsctl --may-exist add-port $BRIDGE $5
>
> # cat /etc/lxc/ifdown #!/bin/bash ovsBr=switch0 ovs-vsctl --if-exists 
> del-port ${ovsBr} $5
>
>
> I managed to attach the lxc interface to the ovs-bridge
> sudo ovs-vsctl show
> 8cd3e1a6-eaa9-4341-b5c8-677e381c8306 Bridge switch0 Port vethlQXvGc Interface 
> vethlQXvGc Port switch0 Interface switch0 type: internal ovs_version: "2.13.1"
> The problem now is that the container did not take IP. P.S I only have one 
> physical interface so I did not bind it with the bridge.
>
>
>
> Στις Πέμ, 4 Φεβ 2021 στις 8:28 π.μ., ο/η Raymond Burkholder 
> <r...@oneunified.net> έγραψε:
>>
>> Pretty simple:
>>
>> 1) read the man page on lxc.container.conf
>> 2) build one or two interface up/down files
>>
>> Don't guarantee this works without a bit of extra massaging, but should be 
>> enough to get started:
>>
>> # cat /etc/lxc/scripts/ovs.port.up.sh
>> #!/bin/bash
>> logger "lxc_name=${LXC_NAME}"
>> logger "lxc_config=${LXC_CONFIG_FILE}"
>> logger "values = $1 $2 $3 $4 $5"
>> logger "vlan=${VLAN} $5"
>> BRIDGE=ovsbr0
>> ovs-vsctl --may-exist add-br $BRIDGE
>> ovs-vsctl --may-exist add-port $BRIDGE $5
>> if [ "$VLAN" != "" ]; then
>>   ovs-vsctl set port $5 tag=$VLAN
>>   fi
>>
>>
>> There might be other tidbits at:
>> https://blog.raymond.burkholder.net/index.php?/categories/7-LXC
>>
>>
>> On 2/3/21 10:12 AM, George Papathanail wrote:
>>
>> Hello everyone, I'm trying to connect LXC with Openvswitch and to have a 
>> setup like this:
>>
>>
>>
>> I'm kindly asking for your input, or if there is a tutorial please let me 
>> know

From what I have read, LXD  supports OVN. Maybe you can try with OVN
if you prefer ?

https://discuss.linuxcontainers.org/t/lxd-4-5-has-been-released/8824

Thanks
Numan

>>
>> Thank you in advance
>>
>> _______________________________________________
>> discuss mailing list
>> disc...@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>>
>>
>> _______________________________________________
>> discuss mailing list
>> disc...@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>
> _______________________________________________
> discuss mailing list
> disc...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to