Editing Vzctl for upstream kernel
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | Since [[Download/vzctl/4.0|version 4.0]], vzctl tool can be used with upstream (non-OpenVZ) Linux kernels (that essentially means any recent 3.x kernel). 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 features may be present with limited functionality, while some are not present at all. We appreciate all bug reports, please file to [http://bugzilla.openvz.org/enter_bug.cgi?component=vzctl bugzilla]. | ||
− | + | {{Warning|Running vzctl on upstream kernels is considered an experimental feature. See [[#Limitatons]] below.}} | |
− | |||
− | |||
− | |||
− | |||
− | Running vzctl on upstream kernels is considered an experimental feature. See [[# | ||
== Installation == | == Installation == | ||
Line 58: | Line 54: | ||
== Limitations == | == Limitations == | ||
− | + | The following vzctl commands are not working at all: | |
− | |||
− | The following vzctl commands are not working at all | ||
− | |||
* <code>quotaon</code>/<code>quotaoff</code>/<code>quotainit</code> (vzquota-specific) | * <code>quotaon</code>/<code>quotaoff</code>/<code>quotainit</code> (vzquota-specific) | ||
* <code>convert</code>, <code>compact</code>, <code>snapshot*</code> (ploop-specific) | * <code>convert</code>, <code>compact</code>, <code>snapshot*</code> (ploop-specific) | ||
* <code>console</code> (needs a virtual /dev/console, /dev/ttyN device) | * <code>console</code> (needs a virtual /dev/console, /dev/ttyN device) | ||
− | * <code>chkpnt</code>, <code>restore</code> (currently need OpenVZ-kernel-specific checkpointing, [http:// | + | * <code>enter</code>, <code>exec</code> and <code>runscript</code> (need pidns entering support) |
+ | * <code>chkpnt</code>, <code>restore</code> (currently need OpenVZ-kernel-specific checkpointing, [http://crui.org/ CRIU] will be supported later) | ||
+ | |||
+ | The following commands have severe limitations: | ||
+ | * <code>stop</code>. 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. | ||
The following binaries are not ported to work on top of upstream kernel: | The following binaries are not ported to work on top of upstream kernel: | ||
Line 84: | Line 81: | ||
=== Resource management === | === Resource management === | ||
− | + | Setting resources like <code>--ram</code> and <code>--cpuunits</code> 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.cfs_quota_us | ||
* cpu.shares | * cpu.shares | ||
Line 92: | Line 89: | ||
* memory.kmem.limit_in_bytes | * memory.kmem.limit_in_bytes | ||
* memory.kmem.tcp.limit_in_bytes | * memory.kmem.tcp.limit_in_bytes | ||
+ | |||
== Building == | == Building == | ||
− | |||
− | |||
=== Dependencies === | === Dependencies === | ||
Line 110: | Line 106: | ||
If you are living on the bleeding edge, get vzctl sources from git. Then run autogen.sh to recreate auto* files: | If you are living on the bleeding edge, get vzctl sources from git. Then run autogen.sh to recreate auto* files: | ||
− | git clone | + | git clone git://git.openvz.org/pub/vzctl |
cd vzctl | cd vzctl | ||
./autogen.sh | ./autogen.sh | ||
Line 116: | Line 112: | ||
=== Compile === | === Compile === | ||
− | Usual | + | Usual ./confi |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | t makes sense to add <code>--without-ploop</code> (unless you want ploop compiled it) because otherwise you will need ploop lib headers. | |
− | + | $ ./configure --with-cgroup --without-ploop |