Difference between revisions of "Vzctl for upstream kernel"
(more subsections) |
(more subsections) |
||
Line 43: | Line 43: | ||
* vzubc | * vzubc | ||
− | == Building | + | == Building == |
− | + | === Dependencies === | |
− | + | The following software needs to be installed on your system: | |
− | |||
− | |||
* iproute2 >= 3.0.0 (runtime only) | * iproute2 >= 3.0.0 (runtime only) | ||
* libcg >= 0.38 | * libcg >= 0.38 | ||
+ | |||
+ | === Compile === | ||
+ | |||
+ | Upstream support is not enabled by default. To build it into vzctl, one needs to specify the <code>--with-cgroup</code> switch to <code>configure</code>. Also, it makes sense to add --without-ploop (unless you want ploop compiled it) because otherwise you will need ploop lib headers. | ||
+ | |||
+ | $ ./configure --with-cgroup --without-ploop | ||
+ | |||
+ | == Using == | ||
For supported features, usage is expected to be the same as standard vzctl tool. | For supported features, usage is expected to be the same as standard vzctl tool. | ||
− | == Networking == | + | === Networking === |
Networking is available through the switches --netdev_add, --netif_add, and their respective deletion counterparts. | Networking is available through the switches --netdev_add, --netif_add, and their respective deletion counterparts. | ||
IP mode networking (--ipadd / --ipdel) is currently not supported. | IP mode networking (--ipadd / --ipdel) is currently not supported. |
Revision as of 13:02, 15 August 2012
Warning: Running vzctl on upstream kernels is considered an experimental feature. |
With this release vzctl tool is expected to run with Upstream Linux kernels. At the moment, it provides just basic functionality. It is currently possible to create and start a container with the same steps as one would use for a normal OpenVZ container. Other functionality may be present with limited functionality, while some are not present at all.
Contents
Limitations
The following vzctl commands are not working at all:
quotaon
/quotaoff
/quotainit
(vzquota-specific)convert
,compact
,snapshot*
(ploop-specific)console
(need a virtual /dev/console, /dev/ttyN device)enter
,exec
andrunscript
(need pidns entering support)chkpnt
,restore
(currently need OpenVZ-kernel-specific checkpointing, CRIU will be supported later)
The following commands have severe limitations:
stop
. A container can be stopped from inside (say if one is connected to CT over ssh) in case the underlying kernel supports rebooting a PID namespace (> 3.4). Using vzctl, the "stop" command is not supported, unless accompanied by the --fast switch, which will simply forceably kill all processes in the container.
/proc and /sys
Software that depend on information supplied by the proc filesystem may not work correctly, since there is not a full solution for full /proc virtualization. For instance, /proc/stat is not yet virtualized, and top will show distorted values.
Resource management
Setting resources like --physpages and --cpuunits work, but there their effect is dependent on what the current kernel supports, through the cgroups subsystem. When a particular cgroup file is present, it will be used. Currently, vzctl will search for the following files:
- cpu.cfs_quota_us
- cpu.shares
- cpuset.cpus
- memory.limit_in_bytes
- memory.memsw.limit_in_bytes
- memory.kmem.limit_in_bytes
- memory.kmem.tcp.limit_in_bytes
Other binaries
Pretty much everything else other than vzctl is not working. That includes:
- vzlist
- vzcalc
- vzcfgvalidate
- vzcpucheck
- vzmemcheck
- vzmigrate
- vzeventd
- vzpid
- vzsplit
- vzubc
Building
Dependencies
The following software needs to be installed on your system:
- iproute2 >= 3.0.0 (runtime only)
- libcg >= 0.38
Compile
Upstream support is not enabled by default. To build it into vzctl, one needs to specify the --with-cgroup
switch to configure
. Also, it makes sense to add --without-ploop (unless you want ploop compiled it) because otherwise you will need ploop lib headers.
$ ./configure --with-cgroup --without-ploop
Using
For supported features, usage is expected to be the same as standard vzctl tool.
Networking
Networking is available through the switches --netdev_add, --netif_add, and their respective deletion counterparts.
IP mode networking (--ipadd / --ipdel) is currently not supported.