Guide to install LXC and LXC-Web Console with bridge support

how to setup LXC virtualization enviroment with management WebUI

LXC is simple way to virtualize mano linux distros inaide one machine. This is my setup to install LXC and manage containers with LXC-web console.

I also added steps to install bridge adapter so containers can get public IP if necessary.

Start by installing the lxc and bridge-utils

1
sudo apt-get install lxc bridge-utils

then assign the network configurations at /etc/network/interfaces

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0

Then the file /etc/lxc/default.conf

REMEMBER TO SWITCH RIGHT INTERFACE NAME!!

1
2
3
4
5
6
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.hwaddr = 00:16:3e:xx:xx:xx
lxc.network.mtu = 1500

Then install the LXC-web console by using the script

1
sudo wget http://lxc-webpanel.github.io/tools/install.sh -O - | sudo bash

the default user and pw is admin/admin

The LXC-web console is now running you on http://your-ip-address:5000/

Built with Hugo
Theme Stack designed by Jimmy