Bugzilla – Bug 907
vzctl start errors out with "Unable to set capability: Invalid argument"
Last modified: 2015-04-01 14:42:58 EDT
There are numerous bug reports on the issue. The problem is vzctl can't start VE, saying something like:
thorpe@oblivion ~ # vzctl start 10100
Starting VE ...
VE is mounted
Unable to set capability: Invalid argument
Unable to set capability
VE start failed
VE is unmounted
The problem is caused by changed value of LINUX_CAPABILITY_VERSION (defined in /usr/include/linux/capability.h).
Apparently, vzctl tries to make a setcap syscall with LINUX_CAPABILITY_VERSION set in header (see src/lib/cap.c, function set_cap()). If vzctl is compiled with linux/capability.h from a recent kernel (>2.6.24), LINUX_CAPABILITY VERSION is newer than the one our 2.6.18 kernel understands, thus the error.
The fix (found in libcap-2 sources) is to call capget which will fill in header.version.
Fixed in git:
Will appear in vzctl >= 3.0.23
Bug was fixed more than one year ago and there were no complains from reporter after fix. We believe bug fix helped and mark bug as closed.