[lxc-devel] dnsmasq and resolv.conf containers

Laurent Ducos laurent.ducos at biblibre.com
Thu Jan 17 08:36:02 UTC 2013


Hello.

I use lxc and lxc-net on unbuntu 12.10 that works fine.
My problem is about the /etc/resolv.conf file in the container.

I think the file is written by dnsmasq when assigning dhcp lease

Is it possible to tell dnsmasq : wrote "nameserver 8.8.8.8 nameserver 
8.8.4.4" in place of the value of "--listen-address" (dnsmask command 
line) ?
And it is possible the /etc/resolv.conf is not overwritten on each 
restart of the container.

Thanks.


My container configuration :

lxc.network.type=veth

lxc.network.link=lxcbr0

lxc.network.flags=up

lxc.tty = 4

lxc.pts = 1024

lxc.utsname = koha

# uncomment the next line to run the container unconfined:

#lxc.aa_profile = unconfined

lxc.cgroup.devices.deny = a

# /dev/null and zero

lxc.cgroup.devices.allow = c 1:3 rwm

lxc.cgroup.devices.allow = c 1:5 rwm

# consoles

lxc.cgroup.devices.allow = c 5:1 rwm

lxc.cgroup.devices.allow = c 5:0 rwm

lxc.cgroup.devices.allow = c 4:0 rwm

lxc.cgroup.devices.allow = c 4:1 rwm

# /dev/{,u}random

lxc.cgroup.devices.allow = c 1:9 rwm

lxc.cgroup.devices.allow = c 1:8 rwm

lxc.cgroup.devices.allow = c 136:* rwm

lxc.cgroup.devices.allow = c 5:2 rwm

# rtc

lxc.cgroup.devices.allow = c 254:0 rwm

# mounts point

lxc.mount.entry=proc proc proc nodev,noexec,nosuid 0 0

lxc.mount.entry=sysfs sys sysfs defaults  0 0

lxc.rootfs = /dev/lxc/koha

~




More information about the lxc-devel mailing list