Hi

I'm trying to script the creation on various LXC containers. Therefor I would like to execute a script that finalizes the container. But the script fails when it tries to interact with systemd, the error message reads "Failed to connect to bus: No such file or directory"

A minimal example, without a script, results in the same error:

container.attach_wait(
        lxc.attach_run_command,
        [ "/bin/systemctl", "enable", "systemd-networkd.service" ],
        env_policy=lxc.LXC_ATTACH_CLEAR_ENV)

When I execute the same command via lxc-attach it succeeds:

lxc-attach -n test --clear-env -- /usr/bin/strace /bin/systemctl enable systemd-networkd.service

Am I missing an option for attach_wait?

I'm using LXC 2.0.7 and the according python3 bindings.

Best regards,
        Alexander
_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to