zoukankan      html  css  js  c++  java
  • lxc.conf解析&lxc容器能力

    lxd启动容器实际是生成lxc.conf。剩下的就是LXC对容器进行控制了。所以可认为lxc.conf就是lxd和lxc之间主要的接口。lxc.conf详细属性参考:

    http://manpages.ubuntu.com/manpages/yakkety/en/man5/lxc.container.conf.5.html

    本文对常用的部分属性做解释说明:

    通过lxc.conf的了解可得如下能力:

    lxc.conf的配置示例:

    lxc.utsname = complex

    lxc.network.type = veth

    lxc.network.flags = up

    lxc.network.link = br0

    lxc.network.hwaddr = 4a:49:43:49:79:bf

    lxc.network.ipv4 = 10.2.3.5/24 10.2.3.255

    lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597

    lxc.network.ipv6 = 2003:db8:1:0:214:5432:feab:3588

    lxc.network.type = macvlan

    lxc.network.flags = up

    lxc.network.link = eth0

    lxc.network.hwaddr = 4a:49:43:49:79:bd

    lxc.network.ipv4 = 10.2.3.4/24

    lxc.network.ipv4 = 192.168.10.125/24

    lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596

    lxc.network.type = phys

    lxc.network.flags = up

    lxc.network.link = dummy0

    lxc.network.hwaddr = 4a:49:43:49:79:ff

    lxc.network.ipv4 = 10.2.3.6/24

    lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3297

    lxc.cgroup.cpuset.cpus = 0,1

    lxc.cgroup.cpu.shares = 1234

    lxc.cgroup.devices.deny = a

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

    lxc.cgroup.devices.allow = b 8:0 rw

    lxc.mount = /etc/fstab.complex

    lxc.mount.entry = /lib /root/myrootfs/lib none ro,bind 0 0

    lxc.rootfs = /mnt/rootfs.complex

    lxc.cap.drop = sys_module mknod setuid net_raw

    lxc.cap.drop = mac_override

  • 相关阅读:
    判断二叉树是否BST
    树基础训练(一)
    Trie 简介
    二叉树的一些补充
    红黑树
    平衡二叉树(AVL)介绍及其实现
    二叉查找树(BST)的实现
    二叉树基本知识
    微信小程序提示框
    urllib3使用指南
  • 原文地址:https://www.cnblogs.com/hrbeu05/p/6502023.html
Copyright © 2011-2022 走看看