Subject: Re: [vserver] PEBKACs I can't see with quotas and (unrelated) vserver init PID
From: Jeff Jansen <jeff.jansen@kkoncepts.net>
Date: Thu, 29 Jul 2010 16:15:58 +0800

Grzegorz Nosek <grzegorz.nosek@gmail.com> wrote on 2010-Jul-29:
> BTW, I now see the guest is missing CAP_SYS_RESOURCE -- that would be
> the reason, wouldn't it? Can I add it to a running guest? vattribute
> --help does not really suggest a way to do it.

Yes, you can add capacities to a running vserver:

vattribute --xid VS_NAME --set --bcap|--ccap CAPACITY

So assuming your vserver is named VSERVER, you would run

vattribute --xid VSERVER --set --bcap SYS_RESOURCE

You remove capacities with a tilde before the capacity name.  So to remove
SYS_RESOURCE you'd run:

vattribute --xid VSERVER --set --bcap ~SYS_RESOURCE

> BTW2, echo SYS_RESOURCE >> /etc/vservers/<guest>/bcapabilites is the
> proper way to enable it, right?

Yes, that will enable it on start of the vserver.  But vattribute add/removes
without restarting.

HTH

Jeff Jansen