[Python] How can I change the netplan config to have two networks cards containers? Linux LXC

Discussão em 'Python' iniciado por Stack, Maio 5, 2025.

  1. Stack

    Stack Membro Participativo

    I have a problem connecting a container, in my case a balancer, to two eths network cards. I know I need to change a configuration file from inside the container. The file is in /etc/netplan/50-cloud-init.yaml from within the container. Changing it manually from terminal does connect well, but when I have to automate it from a Python program, I get errors that I don’t know why I happen when I restart the container. I don’t know if I should change some other file so that this doesn’t happen, but my code has no logic glitches. If anyone knew how to solve the problem, I would be very grateful.

    Code of the function in Python

    Continue reading...

Compartilhe esta Página