Menu
blog.headdesk.me
blog.headdesk.me

LXC and CentOS 7

Posted on 2015/03/132015/06/21

LXC has quickly become my favorate test bed. Starting a CentOS 7 container is however slightly complicated.

First, edit the centos lxc config and remove setpcap

[code]
# /usr/share/lxc/config/centos.common.conf
– lxc.cap.drop = mac_admin mac_override setfcap setpcap
+ lxc.cap.drop = mac_admin mac_override setfcap
[/code]

Deploy your container

[code]
$ lxc-create -t centos -n c7m2 — –release 7
[/code]

Then remove the tmpfs mount on the container’s fstab

[code]
# /var/lib/lxc/c7m2/rootfs/etc/fstab
– none /dev/shm tmpfs nosuid,nodev 0 0
[/code]

Then disable apparmor in container’s config

[code]
# /var/lib/lxc/c7m2/config
+ lxc.aa_profile = unconfined
[/code]

References:

  • https://github.com/lxc/lxc/pull/342
  • https://github.com/SolidCharity/LightBuildServer/issues/68

Loading

facebookShare on Facebook
TwitterTweet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Full text search

Recent Posts

  • Upgrade RockyLinux 8 to 9
  • Terraform and segregated permissions
  • LVM Compression and Deduplication
  • Edit gpg encrypted file with vim
  • Lelit Elizabeth PL92T Pressure Tuning
  • aws (8)
  • coffee (1)
  • headfi (1)
  • linux (6)
  • others (59)
  • security (2)
  • tech (36)
  • wordpress (2)

Loading

apache apigateway aws awscli azure backup cloud coffee docker ec2 EL8 ElasticBeanstalk enpass espresso featured kernel lelit linux lvm meltdown MFA nat gateway nginx php proliant python rdp Redhat RHEL rpm Ryzen s2s scp serverless site-to-site smartarray snapshot spectre tech terraform transit gateway ubuntu ubuntu upgrade vpn wordpress

©2023 blog.headdesk.me | Powered by SuperbThemes & WordPress