Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Usage on Arch Linux hosts

Maurice Meyer edited this page Feb 9, 2018 · 21 revisions

LXC installation

The lxc package is available in the Arch community repository.

Network configuration

You must have a working network bridge with DHCP configured for LXC in order for vagrant-lxc to work. If you already have a bridge, see the LXC documentation on how to configure LXC to use it. Otherwise, follow the instructions below to enable the default LXC bridge.

https://wiki.archlinux.org/index.php/Linux_Containers

Install the following packages:

sudo pacman -Syu dnsmasq net-tools bridge-utils

Ensure lxc-net is enabled:

echo "USE_LXC_BRIDGE=true" | sudo tee -a /etc/default/lxc-net

Modify lxc default template configuration to use the bridge

sudo vim /etc/lxc/default.conf
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx

Start the lxc-net service:

sudo systemctl start lxc-net

Verification

Check that there are no errors in the logs for lxc-net:

sudo systemctl status lxc-net

Check that lxcbr0 has an IP address:

ip addr show lxcbr0

Clone this wiki locally