[Lxc-users] copy from OEL template does not work
Tamas Papp
tompos at martos.bme.hu
Thu Aug 15 18:04:21 UTC 2013
On 08/15/2013 07:26 PM, Tony Su wrote:
> Also,
> Without an error message more informative than a simple segfault, who knows?
There is no more.
> Recommend:
> Search your Host syslogs for a more informative error message
> If not in a message, post the Container config file somewhere where
> someone can inspect (eg Pastbin)
I think, in this case the simplest way would be to create an own container.
Anyway, it's a default config file:
# Template used to create this container: /usr/share/lxc/templates/lxc-oracle
# Parameters passed to the template:
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br-eth0
lxc.rootfs = /tank/lxc/jcc-vmc01/rootfs
# Container configuration for Oracle Linux 6.4
lxc.arch = x86_64
lxc.utsname = jcc-vmc01
lxc.devttydir = lxc
lxc.tty = 4
lxc.pts = 1024
lxc.mount = /tank/lxc/jcc-vmc01/fstab
lxc.hook.clone = /usr/share/lxc/hooks/clonehostname
# Uncomment these if you don't run anything that needs the capability, and
# would like the container to run with less privilege.
#
# Dropping sys_admin disables container root from doing a lot of things
# that could be bad like re-mounting lxc fstab entries rw for example,
# but also disables some useful things like being able to nfs mount, and
# things that are already namespaced with ns_capable() kernel checks, like
# hostname(1).
# lxc.cap.drop = sys_admin
# lxc.cap.drop = net_raw # breaks dhcp/ping
# lxc.cap.drop = setgid # breaks login (initgroups/setgroups)
# lxc.cap.drop = dac_read_search # breaks login (pam unix_chkpwd)
# lxc.cap.drop = setuid # breaks sshd,nfs statd
# lxc.cap.drop = audit_control # breaks sshd (set_loginuid failed)
# lxc.cap.drop = audit_write
#
lxc.cap.drop = mac_admin mac_override setfcap setpcap
lxc.cap.drop = sys_module sys_nice sys_pacct
lxc.cap.drop = sys_rawio sys_time
lxc.cap.drop = sys_resource
# Networking
lxc.network.name = eth0
lxc.network.mtu = 1500
lxc.network.hwaddr = fe:9c:0f:5c:e3:ed
# Control Group devices: all denied except those whitelisted
lxc.cgroup.devices.deny = a
lxc.cgroup.devices.allow = c 1:3 rwm # /dev/null
lxc.cgroup.devices.allow = c 1:5 rwm # /dev/zero
lxc.cgroup.devices.allow = c 1:7 rwm # /dev/full
lxc.cgroup.devices.allow = c 5:0 rwm # /dev/tty
lxc.cgroup.devices.allow = c 1:8 rwm # /dev/random
lxc.cgroup.devices.allow = c 1:9 rwm # /dev/urandom
lxc.cgroup.devices.allow = c 136:* rwm # /dev/tty[1-4] ptys and lxc console
lxc.cgroup.devices.allow = c 5:2 rwm # /dev/ptmx pty master
BTW copying from the container to other hosts works fine.
tamas
More information about the lxc-users
mailing list