Re: Configuring LXC containers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/10/24 09:39, Patrick O'Callaghan wrote:
I'd like to play with LXC but I find the docs not very newbie-friendly.
I'm trying to follow a guide at:

https://brandonrozek.com/blog/lxc-fedora-38/

(basically because it mentions Fedora). I followed the steps closely
and rebooted, but I get the following error:

    $ systemd-run --unit=my-unit --user --scope -p "Delegate=yes" -- lxc-start test
    Running scope as unit: my-unit.scope
    lxc-start: test: lxccontainer.c: wait_on_daemonized_start: 877 Received container state "ABORTING" instead of "RUNNING"
    lxc-start: test: tools/lxc_start.c: main: 306 The container failed to start
    lxc-start: test: tools/lxc_start.c: main: 309 To get more details, run the container in foreground mode
    lxc-start: test: tools/lxc_start.c: main: 311 Additional information can be obtained by setting the --logfile and --logpriority options
Any insights would be welcome. (Just in case, I tried running with
SElinux turned off, but it made no difference.)

I use lxc all the time.

The last two lines are key. Add these flags: -F -o logfile. The default loglevel is ERROR. If you want more detail include -l LEVEL.

e.g. lxc-start -n containerName -F -o containerName.log -l WARN

My experience has been that there is a disconnect between the container and the host's bridge usually caused by misconfigured network options in the config file or perhaps the default bridge is not up.

Here's a section from my Archlinux config. This particular bridge is named WWW. The veth.pair isn't necessary but it puts a name on the interface and makes it easier to identify with "ip link list (ip l l )". The generated names, eth-VLXWORL eg. aren't helpful at all. Same thing about hwaddr. If you don't provide a MAC one will be provided for you.

 # Network configuration
 lxc.net.0.type = veth
 lxc.net.0.link = WWW
 lxc.net.0.flags = up

 # not required
 lxc.net.0.veth.pair = WWW-rch
 lxc.net.0.hwaddr = 00:16:3e:00:05:10

hth, :m

--
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux