Differences between revisions 20 and 21
Revision 20 as of 2008-07-14 09:12:44
Size: 3604
Editor: FranklinPiat
Comment: Vserver is back in 2.6.25
Revision 21 as of 2009-02-26 03:52:33
Size: 3603
Comment: Fix typo
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
Carefull, the vserver root directory (usually {{{/var/lib/vservers}}}) must be {{{dev, suid}}}. Careful, the vserver root directory (usually {{{/var/lib/vservers}}}) must be {{{dev, suid}}}.

Linux-VServer provides an open-source virtualization system for computers running GNU/Linux. This is accomplished by kernel level isolation. It allows to run multiple virtual units at once. Those units are sufficiently isolated to guarantee the required security, but utilize available resources efficiently, as they run on the same kernel.

For all related information visit : http://linux-vserver.org/

Vservers on Debian Etch

Preparing the host

aptitude install linux-image-2.6-vserver-<subarch> util-vserver vserver-debiantools

Creating a guest

{{{newvserver --hostname host --domain domain.tld --ip 10.0.0.1\

Careful, the vserver root directory (usually /var/lib/vservers) must be dev, suid.

You can share directories among guests or with the host using the /etc/vservers/<vservername>/fstab file. As an example, I like to share a common home directories across my guests, thus I added the following line to the vserver fstab :

/home   /home           auto    rbind                   0 0

(the mount point is from the guest's point of view, not from the host's)

By default, /tmp is a RAM based 16 Mb filesystem. If you want it to be on the filesystem or change the size of the RAM filesystem, simply change (or delete) the entry in /etc/vservers/<vservername>/fstab.

Easing administration

ssmtp, vapt-get, approx, vserver-stat.

/!\ ssmtp fails on bigger emails and time-outs quite fast. It might be better sometimes to use nullmailer or postfix with [http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client null-client] configuration.

Adding /proc interfaces

NB: Unhiding interfaces in /proc is effective for all the guests on you host.

Copy the default vprochunhide-files file and edit it to suit your needs. Beware that classic tools such as top or netstat rely on a lot of things located in /proc to work properly.

# mkdir /etc/vservers/.defaults/apps/vprocunhide
# cp /usr/lib/util-vserver/defaults/vprocunhide-files\
    /etc/vservers/.defaults/apps/vprocunhide/files
# vi /etc/vservers/.defaults/apps/vprocunhide/files

Then, for the changes to take effect, issue the following command :

# /usr/lib/util-vserver/vprocunhide

Enabling sound in a guest

Sound in a guest (assuming sound is available on the host) is just a matter of making the appropriate devices available in in the guest.

# cp -a /dev/snd /var/lib/vservers/<soundguest>/dev/

If you have multiple sound cards, device files are identified using C<N> where N is the card number. It is handy to name the unique card available in a guest as C0 in order to avoid specifying a /etc/asoundrc file in the guest.

Starting X in a guest

Best clues are at [http://oldwiki.linux-vserver.org/Vservers+and+X]

References

See also