3604
Comment: Vserver is back in 2.6.25
|
3603
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\
--dist etch --mirror http://mirror.url --interface ethX}}}
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
[http://www.nongnu.org/util-vserver/doc/conf/configuration.html Configuration reference]
[http://www.howtoforge.com/linux_vserver_debian_etch Linux-Vserver on Debian Testing (Etch), the easy way]
[http://linux-vserver.org/Frequently_Asked_Questions Official Linux Vserver FAQ]
[http://linux-vserver.org/Capabilities_and_Flags Vserver Capabilities and Flags]
[http://wiki.yobi.be/wiki/Vserver_administration Vserver administration]
See also
SystemVirtualization alternatives