OpenVZ

In this guide provides instructions on setting up a basic virtual server using the OpenVZ Technology.

Emerge
Install the package:

Kernel
After you've built and installed the kernel (steps not covered in this article), update the boot loader and reboot to see if the kernel boots correctly.

Host environment
To maintain your virtual servers you need the package which contains all necessary programs and many useful features:

Configuration
The vzctl packages has installed an init script called. It will help you to start/stop virtual servers on boot/shutdown:

Template tarball
Since many hardware related commands are not available inside a virtual server, there has been a patched version of baselayout known as baselayout-vserver. However all required changes have been integrated into normal baselayout-2, eliminating the need for seperate vserver stages, profiles and baselayout. The only (temporary) drawback is that baselayout-2 is still considered to be in alpha stage and there are no stages with baselayout-2 available on the mirrors yet.

As soon as baselayout-2 is stable you can use a precompiled stage3/4 from one of our mirrors. In the meantime please download a stage3/4 from here.

Convert the stage tarball:

Create VPS

Test the virtual server
You should be able to start and enter the vserver by using the commands below: