SHARE
TWEET

lxc config

savemanos May 14th, 2013 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # /var/lib/lxc/myfirstcontainer/config
  2.  
  3. ## Container
  4. lxc.utsname                             = myfirstcontainer
  5. lxc.rootfs                              = /var/lib/lxc/myfirstcontainer/rootfs
  6. #lxc.console                            = /var/log/lxc/myfirstcontainer.console
  7. lxc.tty                                 = 2
  8. lxc.pts                                 = 1024
  9.  
  10. ## Capabilities
  11. lxc.cap.drop                            = mac_admin
  12. lxc.cap.drop                            = mac_override
  13.  
  14.  
  15. ## Devices
  16. # Allow all devices
  17. #lxc.cgroup.devices.allow               = a
  18. # Deny all devices
  19. lxc.cgroup.devices.deny                 = a
  20. # Allow to mknod all devices (but not using them)
  21. lxc.cgroup.devices.allow                = c *:* m
  22. lxc.cgroup.devices.allow                = b *:* m
  23. # Consoles
  24. # /dev/console
  25. lxc.cgroup.devices.allow                = c 5:1 rwm
  26. # /dev/tty0
  27. lxc.cgroup.devices.allow                = c 4:0 rwm
  28. # /dev/tty1
  29. lxc.cgroup.devices.allow                = c 4:1 rwm
  30. # /dev/tty2
  31. lxc.cgroup.devices.allow                = c 4:2 rwm
  32. # /dev/fuse
  33. lxc.cgroup.devices.allow                = c 10:229 rwm
  34. # /dev/null
  35. lxc.cgroup.devices.allow                = c 1:3 rwm
  36. # /dev/ptmx
  37. lxc.cgroup.devices.allow                = c 5:2 rwm
  38. # /dev/pts/*
  39. lxc.cgroup.devices.allow                = c 136:* rwm
  40. # /dev/random
  41. lxc.cgroup.devices.allow                = c 1:8 rwm
  42. # /dev/rtc
  43. lxc.cgroup.devices.allow                = c 254:0 rwm
  44. # /dev/tty
  45. lxc.cgroup.devices.allow                = c 5:0 rwm
  46. # /dev/urandom
  47. lxc.cgroup.devices.allow                = c 1:9 rwm
  48. # /dev/zero
  49. lxc.cgroup.devices.allow                = c 1:5 rwm
  50.  
  51. ## Filesystem
  52. lxc.mount.entry                         = proc /var/lib/lxc/myfirstcontainer/rootfs/proc proc nodev,noexec,nosuid 0 0
  53. lxc.mount.entry                         = sysfs /var/lib/lxc/myfirstcontainer/rootfs/sys sysfs defaults,ro 0 0
RAW Paste Data
Top