Ask Your Question
0

nova lxc cgroup /dev/kvm

asked 2012-11-21 04:33:34 -0500

jing gravatar image

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2012-12-02 12:26:31 -0500

jing gravatar image

i think i have solved this problem,when the host boot i changed /sys/fs/cgroup/devices/libvirt/lxc/device.allow with /etc/rc.local

cat /etc/rc.lcoal ...... echo "c 10:232 rwm" >> /sys/fs/cgroup/devices/libvirt/lxc/device.allow ......

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-11-21 04:33:34 -0500

Seen: 141 times

Last updated: Dec 02 '12