没有合适的资源?快使用搜索试试~ 我知道了~
ubuntu16.04下的Lxc介绍
需积分: 46 17 下载量 62 浏览量
2018-01-22
21:54:54
上传
评论
收藏 365KB PDF 举报
温馨提示
试读
9页
lxc容器技术介绍。ubuntu16.04下的LXC安装、配置、用法等。
资源推荐
资源详情
资源评论
PartnersSupportCommunityUbuntu.com
Search
Ubuntu 16.04» Ubuntu 服务器指南» 虚拟化»
LXC
Containers are a lightweight virtualization technology. They are more akin to an enhanced chroot than to full
virtualization like Qemu or VMware, both because they do not emulate hardware and because containers share the same operating system as
the host. Containers are similar to Solaris zones or BSD jails. Linux-vserver and OpenVZ are two pre-existing, independently developed
implementations of containers-like functionality for Linux. In fact, containers came about as a result of the work to upstream the vserver and
OpenVZ functionality.
There are two user-space implementations of containers, each exploiting the same kernel features. Libvirt allows the use of containers through
the LXC driver by connecting to 'lxc:///'. This can be very convenient as it supports the same usage as its other drivers. The other implementation,
called simply 'LXC', is not compatible with libvirt, but is more flexible with more userspace tools. It is possible to switch between the two, though
there are peculiarities which can cause confusion.
In this document we will mainly describe the lxc package. Use of libvirt-lxc is not generally recommended due to a lack of Apparmor protection
for libvirt-lxc containers.
In this document, a container name will be shown as CN, C1, or C2.
安装
Basic usage
Global configuration
联网
LXC startup
Backing Stores
Templates
Autostart
Apparmor
Control Groups
Cloning
Lifecycle management hooks
Consoles
疑难解答
LXC API
安全性
资源
安装
The lxc package can be installed using
sudo apt install lxc
This will pull in the required and recommended dependencies, as well as set up a network bridge for containers to use. If you wish to use
unprivileged containers, you will need to ensure that users have sufficient allocated subuids and subgids, and will likely want to allow users to
connect containers to a bridge (see Basic unprivileged usage).
Basic usage
LXC can be used in two distinct ways - privileged, by running the lxc commands as the root user; or unprivileged, by running the lxc commands as
a non-root user. (The starting of unprivileged containers by the root user is possible, but not described here.) Unprivileged containers are more
limited, for instance being unable to create device nodes or mount block-backed filesystems. However they are less dangerous to the host, as
the root userid in the container is mapped to a non-root userid on the host.
Basic privileged usage
To create a privileged container, you can simply do:
Official Documentation Community Help Wiki Contribute
上一页 下一页
资源评论
stilwellsun
- 粉丝: 7
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功