Closed tpokorra closed 9 years ago
rpm -Uhv http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-1.noarch.rpm yum install lxc lxc-templates
lxc-checkconfig shows on Jiffybox stock kernel:
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: required
User namespace: missing
Network namespace: missing
Multiple /dev/pts instances: missing
--- Control groups ---
Cgroup: enabled
Cgroup clone_children flag: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled
--- Misc ---
Veth pair device: missing
Macvlan: missing
Vlan: enabled
File capabilities: enabled
uname -a
Linux j99888.servers.jiffybox.net 3.12.20-x86_64-jb1 #3 SMP Wed May 21 10:34:51 CEST 2014 x86_64 x86_64 x86_64 GNU/Linux
Solution: use pvgrub64 kernel.
uname -a now shows:
Linux j99888.servers.jiffybox.net 3.10.0-123.6.3.el7.x86_64 #1 SMP Wed Aug 6 21:12:36 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
and lxc-checkconfig shows all enabled
starting a Debian container shows in the logfile:
lxc_conf - failed to attach 'veth39QYUL' to the bridge 'virbr0' : No such device
yum install bridge-utils libvirt
chkconfig NetworkManager off
chkconfig network on
service NetworkManager stop
service network start
systemctl enable libvirt-guests
systemctl enable libvirtd
systemctl start libvirt-guests
systemctl start libvirtd
virsh iface-bridge eth0 br0
container now starts fine
still a problem with network: cannot connect to outside
yum install yum-utils epel-release
# causes http 416 error?
#yum-config-manager --add-repo https://download.solidcharity.com/repos/tpokorra/lbs/centos/7/lbs-tpokorra-lbs.repo
wget https://download.solidcharity.com/repos/tpokorra/lbs/centos/7/lbs-tpokorra-lbs.repo -O /etc/yum.repos.d/lbs-tpokorra-lbs.repo
yum install lxc-scripts
systemctl enable libvirtd
systemctl start libvirtd
/usr/share/lxc-scripts/initLXC.sh
/usr/share/lxc-scripts/initIPTables.sh
creating Fedora 22 container:
Download of squashfs image complete.
mount: unknown filesystem type 'squashfs'
Mount of LiveOS squashfs image failed! You mush have squashfs support
available to mount image. Unable to continue. Correct and retry
host is a jiffybox: need to change kernel, use Bootmanager 64bit (pvgrub64). then it works
TODO: post a blog post, and update the Readme.md with the installation instructions for CentOS
see also https://der-linux-admin.de/2014/08/centos-7-centos-7-im-lxc-container/ http://libvirt.org/drvlxc.html