Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

nova lxc cgroup /dev/kvm

well, i install openstack with lxc(nova-compute-lxc),when i launch a lxc vm,i can not mknod /dev/kvm in the lxc instance. Then, i check the cgroup in /sys/fs/cgroup root@superstack:/sys/fs/cgroup/devices/libvirt/lxc/instance-00000035# cat devices.list c 1:3 rwm c 1:5 rwm c 1:7 rwm c 1:8 rwm c 1:9 rwm c 5:0 rwm c 5:2 rwm c 136:* rwm

as we can see,there is no "c 10:232 rwm" record, and i can execute this command echo "c 10:232 rwm" >> devices.allow then i can "mknod -m 666 /dev/kvm c 10 232" in the lxc instance but when i reboot the lxc, the record "c 10:232 rwm" disappeared.

i want to know where to conifg the default cgroup for lxc

#i know how to config cgroup for kvm/qemu

vi /etc/libvirt/qemu.conf ...... cgroup_device_acl = [ "/dev/null", "/dev/full", "/dev/zero", "/dev/random", "/dev/urandom", "/dev/ptmx", "/dev/kvm", "/dev/kqemu", "/dev/rtc", "/dev/hpet","/dev/net/tun", ] ......

service libvirt-bin restart

#

but when i configed the /etc/libvirt/lxc.conf like qemu.conf, it did't do the good job like qemu.conf

i guess when i "nova boot lxc", it did't read this configuration,so i do following jobs

#

mv /etc/libvirt/lxc.conf{,.bak} service libvirt-bin restart nova boot .....

and i can boot the lxc instance and see the same cgroup