Upgrading VServer from 2.0 to 2.2

After upgrading from Linux VServer 2.0 to 2.2 I got an error message after trying to start a vserver:

ncontext: vc_net_create(): Invalid argument

Since version 2.2 the dynamic context feature is disabled by default and marked as deprecated. So you’ll have to assign a context to your vservers manually.
I wrote a script that’ll do the labor for us. Paste it in /usr/local/sbin and call it with the name of the vserver as argument; I have tested this on Debian.

By the way: I read about the problem in the Linux VServer FAQ.