http://wiki.linux-vserver.org/api.php?action=feedcontributions&user=82.246.252.16&feedformat=atomLinux-VServer - User contributions [en]2024-03-29T05:03:14ZUser contributionsMediaWiki 1.20.2http://wiki.linux-vserver.org/util-vserver:Cgroupsutil-vserver:Cgroups2009-07-15T06:17:22Z<p>82.246.252.16: /* Making share permanent with util vserver */</p>
<hr />
<div>== Draft - Cgroups and vservers ==<br />
<br />
to make cgroups works with vserver your kernel must have the following settings:<br />
<br />
<pre><br />
CONFIG_CGROUPS=y<br />
# CONFIG_CGROUP_DEBUG is not set<br />
# CONFIG_CGROUP_NS is not set<br />
CONFIG_CGROUP_FREEZER=y<br />
CONFIG_CGROUP_DEVICE=y<br />
CONFIG_CGROUP_SCHED=y<br />
CONFIG_CGROUP_CPUACCT=y<br />
CONFIG_CGROUP_MEM_RES_CTLR=y<br />
</pre><br />
<br />
Or in the menu:<br />
<br />
<pre><br />
[*] Control Group support [ ] Example debug cgroup subsystem<br />
[ ] Namespace cgroup subsystem<br />
[*] control group freezer subsystem<br />
[*] Device controller for cgroups<br />
[*] Cpuset support<br />
[*] Group CPU scheduler<br />
[*] Group scheduling for SCHED_OTHER<br />
[ ] Group scheduling for SCHED_RR/FIFO<br />
Basis for grouping tasks (Control groups) ---><br />
[*] Simple CPU accounting cgroup subsystem<br />
[*] Resource counters<br />
[*] Memory Resource Controller for Control Groups<br />
</pre><br />
You must have the /dev/cgroup mounted with the 'cpu' option. For exemple for cpuset, memory and cpu cgroup handling:<br />
<br />
<pre>(root)> grep cgroup /etc/fstab<br />
cpuset /dev/cgroup cgroup rw,cpuset,cpu,memory 0 0<br />
</pre><br />
<br />
<br/><br />
Then you must create on you guest /etc/vservers/<guest>/cgroup/ all the files put here will be copied to the guest cgroup when created. The doc for cgroup is not on the great flower page but in the source of the latests utils. You can have a default cgroup directory for all guest that can be overrided by each guest's cgroup directory.<br />
<br />
== Draft - Distributing cpu shares with cgroups ==<br />
<br />
From what i gathered in sched-design-CFS.txt [http://people.redhat.com/mingo/cfs-scheduler/sched-design-CFS.txt]<br />
<br />
This is simply done by adjusting the cpu.shares. Just do:<br />
<br />
echo '512' > /dev/cgroup/<guest name>/cpu.shares<br />
<br />
The share you get is equal to the guest's share divided by the sum of the cpu shares of all the guest. So for exemple :<br />
<br />
<pre><br />
vserver guest 1 => 512 <br />
vserver guest 2 => 512<br />
vserver guest 3 => 2048<br />
vserver guest 4 => 512<br />
</pre><br />
<br />
so you have a total of 3584 cpu shares (2048+512+512+512) , then you get :<br />
<br />
<pre><br />
vserver guest 1 => 512 / 3584 = 14% cpu<br />
vserver guest 2 => 512 / 3584 = 14% cpu<br />
vserver guest 3 => 2048 / 3584 = 57% cpu<br />
vserver guest 4 => 512 / 3584 = 14% cpu<br />
</pre><br />
<br/><br />
<br />
<br />
Note that this is fair scheduling and this will not enfore HARD limit (as far as i know).<br />
<br />
== Making share permanent with util vserver ==<br />
<br />
You must use the "cgroup" directory. You can apply defaults to all vservers or choose different settings for each guest:<br />
<br />
* /etc/vservers/.default/cgroup , this directory contains settings applying to all guest when they start<br />
* /etc/vservers/<guestname>/cgroup , this directory contains settings for the guest when it starts.<br />
<br />
<br />
Exemple :<br />
<br />
<pre><br />
mkdir /etc/vservers/.defaults/cgroup<br />
mkdir /etc/vservers/<guestname>/cgroup<br />
echo '2048' > /etc/vservers/<guestname>/cgroup/cpu.shares<br />
# if you use those then enable them if not put 0 instead of 1<br />
echo 1 > /etc/vservers/<guestname>/cgroup/cpuset.cpus<br />
echo 1 > /etc/vservers/<guestname>/cgroup/cpuset.mems<br />
</pre><br />
<br />
Note that /etc/vservers is an exemple, in my Aqueos install i use /usr/local/etc/vservers but /etc/vservers seems to be the defaults for the classic installs.<br />
<br />
Regards,<br />
Ghislain.</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cgroupsutil-vserver:Cgroups2009-07-15T06:16:37Z<p>82.246.252.16: /* Making share permanent with util vserver */</p>
<hr />
<div>== Draft - Cgroups and vservers ==<br />
<br />
to make cgroups works with vserver your kernel must have the following settings:<br />
<br />
<pre><br />
CONFIG_CGROUPS=y<br />
# CONFIG_CGROUP_DEBUG is not set<br />
# CONFIG_CGROUP_NS is not set<br />
CONFIG_CGROUP_FREEZER=y<br />
CONFIG_CGROUP_DEVICE=y<br />
CONFIG_CGROUP_SCHED=y<br />
CONFIG_CGROUP_CPUACCT=y<br />
CONFIG_CGROUP_MEM_RES_CTLR=y<br />
</pre><br />
<br />
Or in the menu:<br />
<br />
<pre><br />
[*] Control Group support [ ] Example debug cgroup subsystem<br />
[ ] Namespace cgroup subsystem<br />
[*] control group freezer subsystem<br />
[*] Device controller for cgroups<br />
[*] Cpuset support<br />
[*] Group CPU scheduler<br />
[*] Group scheduling for SCHED_OTHER<br />
[ ] Group scheduling for SCHED_RR/FIFO<br />
Basis for grouping tasks (Control groups) ---><br />
[*] Simple CPU accounting cgroup subsystem<br />
[*] Resource counters<br />
[*] Memory Resource Controller for Control Groups<br />
</pre><br />
You must have the /dev/cgroup mounted with the 'cpu' option. For exemple for cpuset, memory and cpu cgroup handling:<br />
<br />
<pre>(root)> grep cgroup /etc/fstab<br />
cpuset /dev/cgroup cgroup rw,cpuset,cpu,memory 0 0<br />
</pre><br />
<br />
<br/><br />
Then you must create on you guest /etc/vservers/<guest>/cgroup/ all the files put here will be copied to the guest cgroup when created. The doc for cgroup is not on the great flower page but in the source of the latests utils. You can have a default cgroup directory for all guest that can be overrided by each guest's cgroup directory.<br />
<br />
== Draft - Distributing cpu shares with cgroups ==<br />
<br />
From what i gathered in sched-design-CFS.txt [http://people.redhat.com/mingo/cfs-scheduler/sched-design-CFS.txt]<br />
<br />
This is simply done by adjusting the cpu.shares. Just do:<br />
<br />
echo '512' > /dev/cgroup/<guest name>/cpu.shares<br />
<br />
The share you get is equal to the guest's share divided by the sum of the cpu shares of all the guest. So for exemple :<br />
<br />
<pre><br />
vserver guest 1 => 512 <br />
vserver guest 2 => 512<br />
vserver guest 3 => 2048<br />
vserver guest 4 => 512<br />
</pre><br />
<br />
so you have a total of 3584 cpu shares (2048+512+512+512) , then you get :<br />
<br />
<pre><br />
vserver guest 1 => 512 / 3584 = 14% cpu<br />
vserver guest 2 => 512 / 3584 = 14% cpu<br />
vserver guest 3 => 2048 / 3584 = 57% cpu<br />
vserver guest 4 => 512 / 3584 = 14% cpu<br />
</pre><br />
<br/><br />
<br />
<br />
Note that this is fair scheduling and this will not enfore HARD limit (as far as i know).<br />
<br />
== Making share permanent with util vserver ==<br />
<br />
You must use the "cgroup" directory. You can apply defaults to all vservers or choose different settings for each guest:<br />
<br />
* /etc/vservers/.default/cgroup , this directory contains settings applying to all guest when they start<br />
* /etc/vservers/<guestname>/cgroup , this directory contains settings for the guest when it starts.<br />
<br />
<br />
Exemple :<br />
<br />
<pre><br />
mkdir /etc/vservers/.defaults/cgroup<br />
mkdir /etc/vservers/<guestname>/cgroup<br />
echo '2048' > /etc/vservers/<guestname>/cgroup/cpu.shares<br />
echo 1 > /etc/vservers/<guestname>/cgroup/cpuset.cpus<br />
echo 0 > /etc/vservers/<guestname>/cgroup/cpuset.mems<br />
</pre><br />
<br />
Note that /etc/vservers is an exemple, in my Aqueos install i use /usr/local/etc/vservers but /etc/vservers seems to be the defaults for the classic installs.<br />
<br />
Regards,<br />
Ghislain.</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2009-05-15T07:43:49Z<p>82.246.252.16: /* What are the main vutils commands ? */</p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br/><br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: <pre>sudo vuname --xid 40133 -s -t 'machine=i686'</pre><br />
<br />
: Possible values for TAG are:<br />
:: <pre>context, sysname, nodename, release, version, machine, domainname</pre><br />
<br />
:To make those change permanent you have to modify the files in your /etc/vservers/<vserver-name>/uts/machine file see the great flower page for details.<br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests.<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname.<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags).<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags).<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry).<br />
:# vsched : to change schheduling parameters of live guest.<br />
:# vdevmap : to remap device or give permission to a guest to create/read/open specific devices.<br />
:# vdlimit : to change the directory limits of a live guest.<br />
:: those parameters can be '''setup permanently''' in the configuration files, see the vutil flower page for details ([http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page]).<br />
<br />
<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest.<br />
:# vemerge : to run emerge from the host in one or more guest.<br />
:# vmount : to mount file systems inside guest from the host.<br />
:# vsomething : to run one command to all vserver in one go.<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest).<br />
:# vtop : top in a guest aware way (see all the process of host+guest).<br />
:# vserver-info : gives version and other usefull information about the utils installed.<br />
:# vserver-stat : gives informations about running guests.<br />
<br />
== What are the services that need to be running in a basic setup ?==<br />
<br />
: '''Services to allow on boot''' :<br />
<br />
:# vprocunhide : this one is mandatory to unlock /proc visibility for guest<br />
:# vservers-default: this one will start the vservers on reboot, most users need this one<br />
:# util-vserver : ? do not know what it does.<br />
<br />
: this article in incomplete, please do not hesistate to add your comments !</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Useful_commandsutil-vserver:Useful commands2009-05-15T07:41:45Z<p>82.246.252.16: /* Doign action to ALL vservers */</p>
<hr />
<div>== Starting a virtual server ==<br />
You can start a virtual server with the following command:<br />
<pre><br />
# vserver <name> start<br />
</pre><br />
Where <name> is the name of the virtual server.<br />
<br />
== Coming into a virtual server ==<br />
To enter into a virtual server execute this command:<br />
<pre><br />
# vserver <name> enter<br />
</pre><br />
<br />
== To exit from a virtual server ==<br />
To exit from a virtual server you only need to finish the Shell. For example typing:<br />
<pre><br />
# exit<br />
<br />
or pressing "Ctrl + d"<br />
</pre><br />
In this way you can finish the virtual server Shell.<br />
<br />
== Stopping a virtual server ==<br />
Use the following command:<br />
<pre><br />
# vserver <name> stop<br />
</pre><br />
<br />
== Showing what virtual servers are running and some information about them ==<br />
run this command:<br />
<pre>$ vserver-stat</pre><br />
<br />
Please note that root context is not listed anymore with recent util-vserver.<br />
<br />
== Copying a virtual server and changing its address IP ==<br />
You should visit the [[Building Guest Systems]] section and look for the clone and rsync methods.<br />
<br />
For reference, the (deprecated) vserver-copy method worked as follows.<br />
<br />
<pre><br />
# vserver-copy --stopstart --ip newIP --domain newDomain nameOldServer nameNewServer<br />
</pre><br />
where:<br />
<pre><br />
-s,--stopstart: stops the virtual server before copying and start the new vserver afterwards.<br />
This really only makes sense if you are copying across root hosts and not changing<br />
names or IP addresses.<br />
<br />
-i,--ip address: the new IP address when changing name. Overwrites /etc/hosts. Must be used with -d<br />
<br />
-d,--domain domain: the new DNS domain when changing name. Overwrites /etc/hosts. Must be used with -i<br />
</pre><br />
You can see more information in "man vserver-copy"<br />
<br />
== Deleting a virtual server ==<br />
<pre># vserver <name> delete</pre><br />
<br />
Where <name> should be replaced by the name of virtual server.<br />
<br />
== Putting a virtual server in a specified directory ==<br />
<br />
vserver <name> build ... --rootdir /path/to/vserver ...<br />
<br />
<br />
== Doign one action to ALL vservers in one go ==<br />
<br />
<pre>vsomething [--quiet|-q] [--debug] <cmd> [--] <vserver-name>* [--all] -- <params>+<br />
<br />
Execute <cmd> <vserver> <params>* foreach vserver.<br />
</pre><br />
<br />
<br />
Just launch any command you want to all the vservers in one go, very usefull for hashify for exemple :)<br />
<br />
== Other useful commands ==<br />
'''''vserver-info''''': gives info about the vserver program itself<br />
<br />
'''''vtop''''': a top command that shows the top of *all* vservers<br />
<br />
'''''vpstree''''': a tree ps view of processes of all vservers<br />
<br />
'''''vps''''': a ps that shows processes of all vservers</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Useful_commandsutil-vserver:Useful commands2009-05-15T07:39:53Z<p>82.246.252.16: </p>
<hr />
<div>== Starting a virtual server ==<br />
You can start a virtual server with the following command:<br />
<pre><br />
# vserver <name> start<br />
</pre><br />
Where <name> is the name of the virtual server.<br />
<br />
== Coming into a virtual server ==<br />
To enter into a virtual server execute this command:<br />
<pre><br />
# vserver <name> enter<br />
</pre><br />
<br />
== To exit from a virtual server ==<br />
To exit from a virtual server you only need to finish the Shell. For example typing:<br />
<pre><br />
# exit<br />
<br />
or pressing "Ctrl + d"<br />
</pre><br />
In this way you can finish the virtual server Shell.<br />
<br />
== Stopping a virtual server ==<br />
Use the following command:<br />
<pre><br />
# vserver <name> stop<br />
</pre><br />
<br />
== Showing what virtual servers are running and some information about them ==<br />
run this command:<br />
<pre>$ vserver-stat</pre><br />
<br />
Please note that root context is not listed anymore with recent util-vserver.<br />
<br />
== Copying a virtual server and changing its address IP ==<br />
You should visit the [[Building Guest Systems]] section and look for the clone and rsync methods.<br />
<br />
For reference, the (deprecated) vserver-copy method worked as follows.<br />
<br />
<pre><br />
# vserver-copy --stopstart --ip newIP --domain newDomain nameOldServer nameNewServer<br />
</pre><br />
where:<br />
<pre><br />
-s,--stopstart: stops the virtual server before copying and start the new vserver afterwards.<br />
This really only makes sense if you are copying across root hosts and not changing<br />
names or IP addresses.<br />
<br />
-i,--ip address: the new IP address when changing name. Overwrites /etc/hosts. Must be used with -d<br />
<br />
-d,--domain domain: the new DNS domain when changing name. Overwrites /etc/hosts. Must be used with -i<br />
</pre><br />
You can see more information in "man vserver-copy"<br />
<br />
== Deleting a virtual server ==<br />
<pre># vserver <name> delete</pre><br />
<br />
Where <name> should be replaced by the name of virtual server.<br />
<br />
== Putting a virtual server in a specified directory ==<br />
<br />
vserver <name> build ... --rootdir /path/to/vserver ...<br />
<br />
<br />
== Doign action to ALL vservers ==<br />
<br />
Usage: /usr/sbin/vsomething [--quiet|-q] [--debug] <cmd> [--] <vserver-name>* [--all] -- <params>+<br />
<br />
Execute <cmd> <vserver> <params>* foreach vserver.<br />
<br />
<br />
Just launch any command you want to all the vservers in one go, very usefull for hashify for exemple :)<br />
<br />
<br />
<br />
<br />
<br />
== Other useful commands ==<br />
'''''vserver-info''''': gives info about the vserver program itself<br />
<br />
'''''vtop''''': a top command that shows the top of *all* vservers<br />
<br />
'''''vpstree''''': a tree ps view of processes of all vservers<br />
<br />
'''''vps''''': a ps that shows processes of all vservers</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Documentationutil-vserver:Documentation2009-04-29T06:55:02Z<p>82.246.252.16: </p>
<hr />
<div>{{NeedCompletion}}<br />
<br />
These pages describe how to configure VServer, more particularly the 'util-vserver' tools to manage the vservers.<br />
<br />
(For installing 'util-vserver', check [http://linux-vserver.org/Documentation#Installation Installation])<br />
<br /><br />
<br /><br />
* [http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page] - a reference for the util-vserver configuration<br /><br />
<br /><br />
<br />
* [[util-vserver:Capabilities_and_Flags]]<br />
* [[util-vserver:Logging]]<br />
* [[util-vserver:InitStyles]]<br />
* [[util-vserver:Vhashify]]<br />
* [[util-vserver:Fstab]]<br />
* [[util-vserver:Bash_Completion]]<br />
* [[util-vserver:Howto_virtualize_an_exisiting_Linux_server]]<br />
* [[util-vserver:Useful commands]]<br />
* [[util-vserver:Cheatsheet]] - Usefull vserver utilities for runtime modification of vservers behavior<br />
* [[util-vserver:Cgroups]] - How to use cgroups with utils-vserver ##draft##</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cgroupsutil-vserver:Cgroups2009-04-14T19:47:07Z<p>82.246.252.16: /* Draft - Cgroups and vservers */</p>
<hr />
<div>== Draft - Cgroups and vservers ==<br />
<br />
to make cgroups works with vserver your kernel must have the following settings:<br />
<br />
<pre><br />
CONFIG_CGROUPS=y<br />
# CONFIG_CGROUP_DEBUG is not set<br />
# CONFIG_CGROUP_NS is not set<br />
CONFIG_CGROUP_FREEZER=y<br />
CONFIG_CGROUP_DEVICE=y<br />
CONFIG_CGROUP_SCHED=y<br />
CONFIG_CGROUP_CPUACCT=y<br />
CONFIG_CGROUP_MEM_RES_CTLR=y<br />
</pre><br />
<br />
Or in the menu:<br />
<br />
<pre><br />
[*] Control Group support [ ] Example debug cgroup subsystem<br />
[ ] Namespace cgroup subsystem<br />
[*] control group freezer subsystem<br />
[*] Device controller for cgroups<br />
[*] Cpuset support<br />
[*] Group CPU scheduler<br />
[*] Group scheduling for SCHED_OTHER<br />
[ ] Group scheduling for SCHED_RR/FIFO<br />
Basis for grouping tasks (Control groups) ---><br />
[*] Simple CPU accounting cgroup subsystem<br />
[*] Resource counters<br />
[*] Memory Resource Controller for Control Groups<br />
</pre><br />
You must have the /dev/cgroup mounted with the 'cpu' option. For exemple for cpuset, memory and cpu cgroup handling:<br />
<br />
<pre>(root)> grep cgroup /etc/fstab<br />
cpuset /dev/cgroup cgroup rw,cpuset,cpu,memory 0 0<br />
</pre><br />
<br />
<br/><br />
Then you must create on you guest /etc/vservers/<guest>/cgroup/ all the files put here will be copied to the guest cgroup when created. The doc for cgroup is not on the great flower page but in the source of the latests utils. You can have a default cgroup directory for all guest that can be overrided by each guest's cgroup directory.<br />
<br />
== Draft - Distributing cpu shares with cgroups ==<br />
<br />
From what i gathered in sched-design-CFS.txt [http://people.redhat.com/mingo/cfs-scheduler/sched-design-CFS.txt]<br />
<br />
This is simply done by adjusting the cpu.shares. Just do:<br />
<br />
echo '512' > /dev/cgroup/<guest name>/cpu.shares<br />
<br />
The share you get is equal to the guest's share divided by the sum of the cpu shares of all the guest. So for exemple :<br />
<br />
<pre><br />
vserver guest 1 => 512 <br />
vserver guest 2 => 512<br />
vserver guest 3 => 2048<br />
vserver guest 4 => 512<br />
</pre><br />
<br />
so you have a total of 3584 cpu shares (2048+512+512+512) , then you get :<br />
<br />
<pre><br />
vserver guest 1 => 512 / 3584 = 14% cpu<br />
vserver guest 2 => 512 / 3584 = 14% cpu<br />
vserver guest 3 => 2048 / 3584 = 57% cpu<br />
vserver guest 4 => 512 / 3584 = 14% cpu<br />
</pre><br />
<br/><br />
<br />
<br />
Note that this is fair scheduling and this will not enfore HARD limit (as far as i know).<br />
<br />
== Making share permanent with util vserver ==<br />
<br />
You must use the "cgroup" directory. You can apply defaults to all vservers or choose different settings for each guest:<br />
<br />
* /etc/vservers/.default/cgroup , this directory contains settings applying to all guest when they start<br />
* /etc/vservers/<guestname>/cgroup , this directory contains settings for the guest when it starts.<br />
<br />
<br />
Exemple :<br />
<br />
<pre><br />
mkdir /etc/vservers/<guestname>/cgroup<br />
echo '2048' > /etc/vservers/<guestname>/cgroup/cpu.shares<br />
</pre><br />
<br />
Note that /etc/vservers is an exemple, in my Aqueos install i use /usr/local/etc/vservers but /etc/vservers seems to be the defaults for the classic installs.<br />
<br />
Regards,<br />
Ghislain.</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cgroupsutil-vserver:Cgroups2009-04-14T19:42:44Z<p>82.246.252.16: /* Draft - Distributing cpu shares with cgroups */</p>
<hr />
<div>== Draft - Cgroups and vservers ==<br />
<br />
to make cgroups works with vserver your kernel must have the following settings:<br />
<br />
<pre><br />
CONFIG_CGROUPS=y<br />
# CONFIG_CGROUP_DEBUG is not set<br />
# CONFIG_CGROUP_NS is not set<br />
CONFIG_CGROUP_FREEZER=y<br />
CONFIG_CGROUP_DEVICE=y<br />
CONFIG_CGROUP_SCHED=y<br />
CONFIG_CGROUP_CPUACCT=y<br />
CONFIG_CGROUP_MEM_RES_CTLR=y<br />
</pre><br />
<br />
<br />
Or in the menu:<br />
<br />
<pre><br />
[*] Control Group support [ ] Example debug cgroup subsystem<br />
[ ] Namespace cgroup subsystem<br />
[*] control group freezer subsystem<br />
[*] Device controller for cgroups<br />
[*] Cpuset support<br />
[*] Group CPU scheduler<br />
[*] Group scheduling for SCHED_OTHER<br />
[ ] Group scheduling for SCHED_RR/FIFO<br />
Basis for grouping tasks (Control groups) ---><br />
[*] Simple CPU accounting cgroup subsystem<br />
[*] Resource counters<br />
[*] Memory Resource Controller for Control Groups<br />
</pre><br />
<br/><br />
Then you must create on you guest /etc/vservers/<guest>/cgroup/ all the files put here will be copied to the guest cgroup when created. The doc for cgroup is not on the great flower page but in the source of the latests utils. You can have a default cgroup directory for all guest that can be overrided by each guest's cgroup directory.<br />
<br />
== Draft - Distributing cpu shares with cgroups ==<br />
<br />
From what i gathered in sched-design-CFS.txt [http://people.redhat.com/mingo/cfs-scheduler/sched-design-CFS.txt]<br />
<br />
This is simply done by adjusting the cpu.shares. Just do:<br />
<br />
echo '512' > /dev/cgroup/<guest name>/cpu.shares<br />
<br />
The share you get is equal to the guest's share divided by the sum of the cpu shares of all the guest. So for exemple :<br />
<br />
<pre><br />
vserver guest 1 => 512 <br />
vserver guest 2 => 512<br />
vserver guest 3 => 2048<br />
vserver guest 4 => 512<br />
</pre><br />
<br />
so you have a total of 3584 cpu shares (2048+512+512+512) , then you get :<br />
<br />
<pre><br />
vserver guest 1 => 512 / 3584 = 14% cpu<br />
vserver guest 2 => 512 / 3584 = 14% cpu<br />
vserver guest 3 => 2048 / 3584 = 57% cpu<br />
vserver guest 4 => 512 / 3584 = 14% cpu<br />
</pre><br />
<br/><br />
<br />
<br />
Note that this is fair scheduling and this will not enfore HARD limit (as far as i know).<br />
<br />
== Making share permanent with util vserver ==<br />
<br />
You must use the "cgroup" directory. You can apply defaults to all vservers or choose different settings for each guest:<br />
<br />
* /etc/vservers/.default/cgroup , this directory contains settings applying to all guest when they start<br />
* /etc/vservers/<guestname>/cgroup , this directory contains settings for the guest when it starts.<br />
<br />
<br />
Exemple :<br />
<br />
<pre><br />
mkdir /etc/vservers/<guestname>/cgroup<br />
echo '2048' > /etc/vservers/<guestname>/cgroup/cpu.shares<br />
</pre><br />
<br />
Note that /etc/vservers is an exemple, in my Aqueos install i use /usr/local/etc/vservers but /etc/vservers seems to be the defaults for the classic installs.<br />
<br />
Regards,<br />
Ghislain.</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2009-03-11T08:59:21Z<p>82.246.252.16: /* What are the main vutils commands ? */</p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br/><br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: <pre>sudo vuname --xid 40133 -s -t 'machine=i686'</pre><br />
<br />
: Possible values for TAG are:<br />
:: <pre>context, sysname, nodename, release, version, machine, domainname</pre><br />
<br />
:To make those change permanent you have to modify the files in your /etc/vservers/<vserver-name>/uts/machine file see the great flower page for details.<br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry)<br />
:# vsched : to change schheduling parameters of live guest <br />
:# vdevmap : to remap device or give permission to a guest to create/read/open specific devices<br />
<br />
:: those parameters can be '''setup permanently''' in the configuration files, see the vutil flower page for details ([http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page]).<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest<br />
:# vemerge : to run emerge from the host in one or more guest<br />
:# vmount : to mount file systems inside guest from the host<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest)<br />
:# vtop : top in a guest aware way (see all the process of host+guest)<br />
:# vserver-info : gives version and other usefull information about the utils installed<br />
:# vserver-stat : gives informations about running guests<br />
<br />
== What are the services that need to be running in a basic setup ?==<br />
<br />
: '''Services to allow on boot''' :<br />
<br />
:# vprocunhide : this one is mandatory to unlock /proc visibility for guest<br />
:# vservers-default: this one will start the vservers on reboot, most users need this one<br />
:# util-vserver : ? do not know what it does.<br />
<br />
: this article in incomplete, please do not hesistate to add your comments !</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2009-03-01T17:05:22Z<p>82.246.252.16: /* How to change the machine type live ? */</p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br/><br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: <pre>sudo vuname --xid 40133 -s -t 'machine=i686'</pre><br />
<br />
: Possible values for TAG are:<br />
:: <pre>context, sysname, nodename, release, version, machine, domainname</pre><br />
<br />
:To make those change permanent you have to modify the files in your /etc/vservers/<vserver-name>/uts/machine file see the great flower page for details.<br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry)<br />
:# vsched : to change schheduling parameters of live guest <br />
<br />
:: those parameters can be '''setup permanently''' in the configuration files, see the vutil flower page for details ([http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page]).<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest<br />
:# vemerge : to run emerge from the host in one or more guest<br />
:# vmount : to mount file systems inside guest from the host<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest)<br />
:# vtop : top in a guest aware way (see all the process of host+guest)<br />
:# vserver-info : gives version and other usefull information about the utils installed<br />
:# vserver-stat : gives informations about running guests<br />
<br />
== What are the services that need to be running in a basic setup ?==<br />
<br />
: '''Services to allow on boot''' :<br />
<br />
:# vprocunhide : this one is mandatory to unlock /proc visibility for guest<br />
:# vservers-default: this one will start the vservers on reboot, most users need this one<br />
:# util-vserver : ? do not know what it does.<br />
<br />
: this article in incomplete, please do not hesistate to add your comments !</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2009-03-01T17:03:56Z<p>82.246.252.16: /* How to add an IP address to a live guest ? */</p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br/><br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: <pre>sudo vuname --xid 40133 -s -t 'machine=i686'</pre><br />
<br />
: Possible values for TAG are:<br />
:: <pre>context, sysname, nodename, release, version, machine, domainname</pre><br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry)<br />
:# vsched : to change schheduling parameters of live guest <br />
<br />
:: those parameters can be '''setup permanently''' in the configuration files, see the vutil flower page for details ([http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page]).<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest<br />
:# vemerge : to run emerge from the host in one or more guest<br />
:# vmount : to mount file systems inside guest from the host<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest)<br />
:# vtop : top in a guest aware way (see all the process of host+guest)<br />
:# vserver-info : gives version and other usefull information about the utils installed<br />
:# vserver-stat : gives informations about running guests<br />
<br />
== What are the services that need to be running in a basic setup ?==<br />
<br />
: '''Services to allow on boot''' :<br />
<br />
:# vprocunhide : this one is mandatory to unlock /proc visibility for guest<br />
:# vservers-default: this one will start the vservers on reboot, most users need this one<br />
:# util-vserver : ? do not know what it does.<br />
<br />
: this article in incomplete, please do not hesistate to add your comments !</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2009-03-01T17:03:34Z<p>82.246.252.16: /* How to add an IP address to a live guest ? */</p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br/><br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<pre>To make those change permanent you have to modify the files in your /etc/vservers/<vserver-name>/uts/xxx file.</pre><br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: <pre>sudo vuname --xid 40133 -s -t 'machine=i686'</pre><br />
<br />
: Possible values for TAG are:<br />
:: <pre>context, sysname, nodename, release, version, machine, domainname</pre><br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry)<br />
:# vsched : to change schheduling parameters of live guest <br />
<br />
:: those parameters can be '''setup permanently''' in the configuration files, see the vutil flower page for details ([http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page]).<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest<br />
:# vemerge : to run emerge from the host in one or more guest<br />
:# vmount : to mount file systems inside guest from the host<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest)<br />
:# vtop : top in a guest aware way (see all the process of host+guest)<br />
:# vserver-info : gives version and other usefull information about the utils installed<br />
:# vserver-stat : gives informations about running guests<br />
<br />
== What are the services that need to be running in a basic setup ?==<br />
<br />
: '''Services to allow on boot''' :<br />
<br />
:# vprocunhide : this one is mandatory to unlock /proc visibility for guest<br />
:# vservers-default: this one will start the vservers on reboot, most users need this one<br />
:# util-vserver : ? do not know what it does.<br />
<br />
: this article in incomplete, please do not hesistate to add your comments !</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cgroupsutil-vserver:Cgroups2009-02-27T08:45:01Z<p>82.246.252.16: </p>
<hr />
<div>== Draft - Cgroups and vservers ==<br />
<br />
to make cgroups works with vserver your kernel must have the following settings:<br />
<br />
<pre><br />
CONFIG_CGROUPS=y<br />
# CONFIG_CGROUP_DEBUG is not set<br />
# CONFIG_CGROUP_NS is not set<br />
CONFIG_CGROUP_FREEZER=y<br />
CONFIG_CGROUP_DEVICE=y<br />
CONFIG_CGROUP_SCHED=y<br />
CONFIG_CGROUP_CPUACCT=y<br />
CONFIG_CGROUP_MEM_RES_CTLR=y<br />
</pre><br />
<br />
<br />
Or in the menu:<br />
<br />
<pre><br />
[*] Control Group support [ ] Example debug cgroup subsystem<br />
[ ] Namespace cgroup subsystem<br />
[*] control group freezer subsystem<br />
[*] Device controller for cgroups<br />
[*] Cpuset support<br />
[*] Group CPU scheduler<br />
[*] Group scheduling for SCHED_OTHER<br />
[ ] Group scheduling for SCHED_RR/FIFO<br />
Basis for grouping tasks (Control groups) ---><br />
[*] Simple CPU accounting cgroup subsystem<br />
[*] Resource counters<br />
[*] Memory Resource Controller for Control Groups<br />
</pre><br />
<br/><br />
Then you must create on you guest /etc/vservers/<guest>/cgroup/ all the files put here will be copied to the guest cgroup when created. The doc for cgroup is not on the great flower page but in the source of the latests utils. You can have a default cgroup directory for all guest that can be overrided by each guest's cgroup directory.<br />
<br />
== Draft - Distributing cpu shares with cgroups ==<br />
<br />
From what i gathered in sched-design-CFS.txt [http://people.redhat.com/mingo/cfs-scheduler/sched-design-CFS.txt|sched-design-CFS.txt]<br />
<br />
This is simply done by adjusting the cpu.shares. Just do:<br />
<br />
echo '512' > /dev/cgroup/<guest name>/cpu.shares<br />
<br />
The share you get is equal to the guest's share divided by the sum of the cpu shares of all the guest. So for exemple :<br />
<br />
<pre><br />
vserver guest 1 => 512 <br />
vserver guest 2 => 512<br />
vserver guest 3 => 2048<br />
vserver guest 4 => 512<br />
</pre><br />
<br />
then you get :<br />
<br />
<pre><br />
vserver guest 1 => 512 / 3584 = 14% cpu<br />
vserver guest 2 => 512 / 3584 = 14% cpu<br />
vserver guest 3 => 2048 / 3584 = 57% cpu<br />
vserver guest 4 => 512 / 3584 = 14% cpu<br />
</pre><br />
<br/><br />
<br />
<br />
Note that this is fair scheduling and this will not enfore HARD limit (as far as i know).<br />
<br />
<br />
== Making share permanent with util vserver ==<br />
<br />
You must use the "cgroup" directory. You can apply defaults to all vservers or choose different settings for each guest:<br />
<br />
* /etc/vservers/.default/cgroup , this directory contains settings applying to all guest when they start<br />
* /etc/vservers/<guestname>/cgroup , this directory contains settings for the guest when it starts.<br />
<br />
<br />
Exemple :<br />
<br />
<pre><br />
mkdir /etc/vservers/<guestname>/cgroup<br />
echo '2048' > /etc/vservers/<guestname>/cgroup/cpu.shares<br />
</pre><br />
<br />
Note that /etc/vservers is an exemple, in my Aqueos install i use /usr/local/etc/vservers but /etc/vservers seems to be the defaults for the classic installs.<br />
<br />
Regards,<br />
Ghislain.</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cgroupsutil-vserver:Cgroups2009-02-27T08:27:37Z<p>82.246.252.16: /* Draft - Distributing cpu shares with cgroups */</p>
<hr />
<div>== Draft - Cgroups and vservers ==<br />
<br />
to make cgroups works with vserver your kernel must have the following settings:<br />
<br />
<pre><br />
CONFIG_CGROUPS=y<br />
# CONFIG_CGROUP_DEBUG is not set<br />
# CONFIG_CGROUP_NS is not set<br />
CONFIG_CGROUP_FREEZER=y<br />
CONFIG_CGROUP_DEVICE=y<br />
CONFIG_CGROUP_SCHED=y<br />
CONFIG_CGROUP_CPUACCT=y<br />
CONFIG_CGROUP_MEM_RES_CTLR=y<br />
</pre><br />
<br />
<br />
Or in the menu:<br />
<br />
<pre><br />
[*] Control Group support [ ] Example debug cgroup subsystem<br />
[ ] Namespace cgroup subsystem<br />
[*] control group freezer subsystem<br />
[*] Device controller for cgroups<br />
[*] Cpuset support<br />
[*] Group CPU scheduler<br />
[*] Group scheduling for SCHED_OTHER<br />
[ ] Group scheduling for SCHED_RR/FIFO<br />
Basis for grouping tasks (Control groups) ---><br />
[*] Simple CPU accounting cgroup subsystem<br />
[*] Resource counters<br />
[*] Memory Resource Controller for Control Groups<br />
</pre><br />
<br/><br />
Then you must create on you guest /etc/vservers/<guest>/cgroup/ all the files put here will be copied to the guest cgroup when created. The doc for cgroup is not on the great flower page but in the source of the latests utils. You can have a default cgroup directory for all guest that can be overrided by each guest's cgroup directory.<br />
<br />
== Draft - Distributing cpu shares with cgroups ==<br />
<br />
From what i gathered in sched-design-CFS.txt [http://people.redhat.com/mingo/cfs-scheduler/sched-design-CFS.txt|sched-design-CFS.txt]<br />
<br />
This is simply done by adjusting the cpu.shares. Just do:<br />
<br />
echo '512' > /dev/cgroup/<guest name>/cpu.shares<br />
<br />
The share you get is equal to the guest's share divided by the sum of the cpu shares of all the guest. So for exemple :<br />
<br />
<pre><br />
vserver guest 1 => 512 <br />
vserver guest 2 => 512<br />
vserver guest 3 => 2048<br />
vserver guest 4 => 512<br />
</pre><br />
<br />
then you get :<br />
<br />
<pre><br />
vserver guest 1 => 512 / 3584 = 14% cpu<br />
vserver guest 2 => 512 / 3584 = 14% cpu<br />
vserver guest 3 => 2048 / 3584 = 57% cpu<br />
vserver guest 4 => 512 / 3584 = 14% cpu<br />
</pre><br />
<br/><br />
<br />
<br />
Note that this is fair scheduling and this will not enfore HARD limit (as far as i know).<br />
<br />
Regards,<br />
Ghislain.</div>82.246.252.16http://wiki.linux-vserver.org/DocumentationDocumentation2009-02-27T08:12:20Z<p>82.246.252.16: /* Configuration */</p>
<hr />
<div><div style="margin: 2em auto 2em auto; padding: 10px; background-color: #F9ECCD; border: 1px solid #004433; text-align: center;"><br />
[[Image:Icon-Caution.png|left]]<br />
We are currently migrating to MediaWiki from our old system, but not all content has been migrated yet. Take a look at the [[Wiki Team]] page for instructions how to help or look at the [http://oldwiki.linux-vserver.org old wiki] to find the information not migrated yet.<br />
<br />
'''To ease migration we created a [[List of old Documentation pages]].'''<br />
</div><br />
<br />
== Introduction ==<br />
<br />
* [[Overview|Virtualization Overview]]<br />
* [[Usage Scenarios]]<br />
* [[Feature Matrix]]<br />
<br />
== Installation ==<br />
<br />
* [[Installation Considerations]]<br />
* [[Installation on Linux 2.6]]: from source, both the kernel and util-vserver<br />
* [[Installation on ArchLinux]]<br />
* [[Installation on CentOS]]<br />
* [[Installation on Debian]]<br />
* [[Installation on Fedora]]<br />
* [[Installation on Gentoo]]<br />
* [[Installation on Mandrake]]<br />
* [http://pld-linux.org/Vserver Installation on PLD-Linux]<br />
* [[Installation on Redhat]]<br />
* [[Installation on Slackware]]<br />
* [[Installation on SuSE/OpenSUSE]]<br />
* [[Installation on Ubuntu]]<br />
<br />
== Configuration ==<br />
<br />
* [[Util-vserver:Documentation|util-vserver Documentation]]<br />
* [[vcd:Documentation|VServer Control Daemon Documentation]]<br />
* [[Share a directory among multiple guests]]<br />
<br />
== Guides and Howtos ==<br />
<br />
* [[Building Guest Systems]]<br />
* [[util-vserver:Howto virtualize an exisiting Linux server|Howto virtualize an existing Linux server]]<br />
* [[VCMD HowTo]]<br />
* [[Howto make bsd-style init sysv-compatible|Howto make Bsd-style init sysv-compatible (archlinux guest system)]]<br />
* [[Installing 32-bit Fedora on 64-bit Debian]]<br />
* [[Installing Ubuntu on Debian]]<br />
* [[Installing an openSUSE vserver guest]]<br />
* [[Networking vserver guests]]<br />
* [[Howto HostAuth]]<br />
* [[Fuse_GlusterFS| Fuse and GlusterFS]]<br />
* [[yum-patch|How to patch vyum]]<br />
* [[yum-upgrade-3.2.4|Upgrading existing installations to yum-3.2.4]]<br />
* [[Migrating from OpenVZ to Linux-Vserver]]<br />
* [[Getting_high_with_lenny]]<br />
* [[Installing_Ubuntu_Hoary_as_guest| Installing Ubuntu Hoary as guest]]<br />
* [[Applying CPU Limits]]<br />
<br />
== Lists &amp; Theory ==<br />
<br />
* Basic configuration<br />
** [[Capabilities and Flags]]<br />
** [[CPU Scheduler]]<br />
** [[Disk Limits and Quota]]<br />
** [[Resource Limits]]<br />
*** [[Memory Limits]]<br />
** [[Virtual System Information]]<br />
** [[Unification]]<br />
<br />
* Security Considerations<br />
** [[Secure Capabilities]]<br />
** [[Secure chroot Barrier]]<br />
** [[Secure Device Nodes]]<br />
** [[Secure ProcFS Entries]]<br />
<br />
* Performance and Stability<br />
** [[Virtualization Overhead]]<br />
<br />
* Implementation Details<br />
** [[Context Accounting]]<br />
** [[Filesystem Attributes]]<br />
** [[Filesystem Tagging]]<br />
** [[Filesystem Namespaces]]<br />
** [[Kernel Userspace Helper]]<br />
** [[Mainline Kernel Virtualization]]<br />
** [[ProcFS]]<br />
** [[Syscall Command Switch]]<br />
<br />
== External Resources ==</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Documentationutil-vserver:Documentation2009-02-27T08:10:04Z<p>82.246.252.16: </p>
<hr />
<div>{{NeedCompletion}}<br />
<br />
These pages describe how to configure VServer, more particularly the 'util-vserver' tools to manage the vservers.<br />
<br />
(For installing 'util-vserver', check [http://linux-vserver.org/Documentation#Installation Installation])<br />
<br /><br />
<br /><br />
* [http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page] - a reference for the util-vserver configuration<br /><br />
<br /><br />
<br />
* [[util-vserver:Capabilities_and_Flags]]<br />
* [[util-vserver:Logging]]<br />
* [[util-vserver:InitStyles]]<br />
* [[util-vserver:Vhashify]]<br />
* [[util-vserver:Fstab]]<br />
* [[util-vserver:Bash_Completion]]<br />
* [[util-vserver:Howto_virtualize_an_exisiting_Linux_server]]<br />
* [[util-vserver:Useful commands]]<br />
* [[util-vserver:Cheatsheet| usefull vserver utilities for runtime modification of vservers behavior]]<br />
* [[util-vserver:Cgroups|How to use cgroups with utils-vserver ##draft##]]</div>82.246.252.16http://wiki.linux-vserver.org/DocumentationDocumentation2009-02-27T08:06:54Z<p>82.246.252.16: /* Configuration */</p>
<hr />
<div><div style="margin: 2em auto 2em auto; padding: 10px; background-color: #F9ECCD; border: 1px solid #004433; text-align: center;"><br />
[[Image:Icon-Caution.png|left]]<br />
We are currently migrating to MediaWiki from our old system, but not all content has been migrated yet. Take a look at the [[Wiki Team]] page for instructions how to help or look at the [http://oldwiki.linux-vserver.org old wiki] to find the information not migrated yet.<br />
<br />
'''To ease migration we created a [[List of old Documentation pages]].'''<br />
</div><br />
<br />
== Introduction ==<br />
<br />
* [[Overview|Virtualization Overview]]<br />
* [[Usage Scenarios]]<br />
* [[Feature Matrix]]<br />
<br />
== Installation ==<br />
<br />
* [[Installation Considerations]]<br />
* [[Installation on Linux 2.6]]: from source, both the kernel and util-vserver<br />
* [[Installation on ArchLinux]]<br />
* [[Installation on CentOS]]<br />
* [[Installation on Debian]]<br />
* [[Installation on Fedora]]<br />
* [[Installation on Gentoo]]<br />
* [[Installation on Mandrake]]<br />
* [http://pld-linux.org/Vserver Installation on PLD-Linux]<br />
* [[Installation on Redhat]]<br />
* [[Installation on Slackware]]<br />
* [[Installation on SuSE/OpenSUSE]]<br />
* [[Installation on Ubuntu]]<br />
<br />
== Configuration ==<br />
<br />
* [[util-vserver:Documentation|util-vserver Documentation]]<br />
* [[vcd:Documentation|VServer Control Daemon Documentation]]<br />
* [[Share a directory among multiple guests]]<br />
<br />
== Guides and Howtos ==<br />
<br />
* [[Building Guest Systems]]<br />
* [[util-vserver:Howto virtualize an exisiting Linux server|Howto virtualize an existing Linux server]]<br />
* [[VCMD HowTo]]<br />
* [[Howto make bsd-style init sysv-compatible|Howto make Bsd-style init sysv-compatible (archlinux guest system)]]<br />
* [[Installing 32-bit Fedora on 64-bit Debian]]<br />
* [[Installing Ubuntu on Debian]]<br />
* [[Installing an openSUSE vserver guest]]<br />
* [[Networking vserver guests]]<br />
* [[Howto HostAuth]]<br />
* [[Fuse_GlusterFS| Fuse and GlusterFS]]<br />
* [[yum-patch|How to patch vyum]]<br />
* [[yum-upgrade-3.2.4|Upgrading existing installations to yum-3.2.4]]<br />
* [[Migrating from OpenVZ to Linux-Vserver]]<br />
* [[Getting_high_with_lenny]]<br />
* [[Installing_Ubuntu_Hoary_as_guest| Installing Ubuntu Hoary as guest]]<br />
* [[Applying CPU Limits]]<br />
<br />
== Lists &amp; Theory ==<br />
<br />
* Basic configuration<br />
** [[Capabilities and Flags]]<br />
** [[CPU Scheduler]]<br />
** [[Disk Limits and Quota]]<br />
** [[Resource Limits]]<br />
*** [[Memory Limits]]<br />
** [[Virtual System Information]]<br />
** [[Unification]]<br />
<br />
* Security Considerations<br />
** [[Secure Capabilities]]<br />
** [[Secure chroot Barrier]]<br />
** [[Secure Device Nodes]]<br />
** [[Secure ProcFS Entries]]<br />
<br />
* Performance and Stability<br />
** [[Virtualization Overhead]]<br />
<br />
* Implementation Details<br />
** [[Context Accounting]]<br />
** [[Filesystem Attributes]]<br />
** [[Filesystem Tagging]]<br />
** [[Filesystem Namespaces]]<br />
** [[Kernel Userspace Helper]]<br />
** [[Mainline Kernel Virtualization]]<br />
** [[ProcFS]]<br />
** [[Syscall Command Switch]]<br />
<br />
== External Resources ==</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cgroupsutil-vserver:Cgroups2009-02-27T08:01:40Z<p>82.246.252.16: </p>
<hr />
<div>== Draft - Cgroups and vservers ==<br />
<br />
to make cgroups works with vserver your kernel must have the following settings:<br />
<br />
<pre><br />
CONFIG_CGROUPS=y<br />
# CONFIG_CGROUP_DEBUG is not set<br />
# CONFIG_CGROUP_NS is not set<br />
CONFIG_CGROUP_FREEZER=y<br />
CONFIG_CGROUP_DEVICE=y<br />
CONFIG_CGROUP_SCHED=y<br />
CONFIG_CGROUP_CPUACCT=y<br />
CONFIG_CGROUP_MEM_RES_CTLR=y<br />
</pre><br />
<br />
<br />
Or in the menu:<br />
<br />
<pre><br />
[*] Control Group support [ ] Example debug cgroup subsystem<br />
[ ] Namespace cgroup subsystem<br />
[*] control group freezer subsystem<br />
[*] Device controller for cgroups<br />
[*] Cpuset support<br />
[*] Group CPU scheduler<br />
[*] Group scheduling for SCHED_OTHER<br />
[ ] Group scheduling for SCHED_RR/FIFO<br />
Basis for grouping tasks (Control groups) ---><br />
[*] Simple CPU accounting cgroup subsystem<br />
[*] Resource counters<br />
[*] Memory Resource Controller for Control Groups<br />
</pre><br />
<br/><br />
Then you must create on you guest /etc/vservers/<guest>/cgroup/ all the files put here will be copied to the guest cgroup when created. The doc for cgroup is not on the great flower page but in the source of the latests utils. You can have a default cgroup directory for all guest that can be overrided by each guest's cgroup directory.<br />
<br />
== Draft - Distributing cpu shares with cgroups ==<br />
<br />
This is simply done by adjusting the cpu.shares. Just do:<br />
<br />
echo '512' > /dev/cgroup/<guest name>/cpu.shares<br />
<br />
The share you get is equal to the guest's share divided by the sum of the cpu shares of all the guest. So for exemple :<br />
<br />
<pre><br />
vserver guest 1 => 512 <br />
vserver guest 2 => 512<br />
vserver guest 3 => 2048<br />
vserver guest 4 => 512<br />
</pre><br />
<br />
then you get :<br />
<br />
<pre><br />
vserver guest 1 => 512 / 3584 = 14% cpu<br />
vserver guest 2 => 512 / 3584 = 14% cpu<br />
vserver guest 3 => 2048 / 3584 = 57% cpu<br />
vserver guest 4 => 512 / 3584 = 14% cpu<br />
</pre><br />
<br/><br />
<br />
<br />
Note that this is fair scheduling and this will not enfore HARD limit (as far as i know).<br />
<br />
Regards,<br />
Ghislain.</div>82.246.252.16http://wiki.linux-vserver.org/DocumentationDocumentation2009-02-27T07:16:01Z<p>82.246.252.16: /* Configuration */</p>
<hr />
<div><div style="margin: 2em auto 2em auto; padding: 10px; background-color: #F9ECCD; border: 1px solid #004433; text-align: center;"><br />
[[Image:Icon-Caution.png|left]]<br />
We are currently migrating to MediaWiki from our old system, but not all content has been migrated yet. Take a look at the [[Wiki Team]] page for instructions how to help or look at the [http://oldwiki.linux-vserver.org old wiki] to find the information not migrated yet.<br />
<br />
'''To ease migration we created a [[List of old Documentation pages]].'''<br />
</div><br />
<br />
== Introduction ==<br />
<br />
* [[Overview|Virtualization Overview]]<br />
* [[Usage Scenarios]]<br />
* [[Feature Matrix]]<br />
<br />
== Installation ==<br />
<br />
* [[Installation Considerations]]<br />
* [[Installation on Linux 2.6]]: from source, both the kernel and util-vserver<br />
* [[Installation on ArchLinux]]<br />
* [[Installation on CentOS]]<br />
* [[Installation on Debian]]<br />
* [[Installation on Fedora]]<br />
* [[Installation on Gentoo]]<br />
* [[Installation on Mandrake]]<br />
* [http://pld-linux.org/Vserver Installation on PLD-Linux]<br />
* [[Installation on Redhat]]<br />
* [[Installation on Slackware]]<br />
* [[Installation on SuSE/OpenSUSE]]<br />
* [[Installation on Ubuntu]]<br />
<br />
== Configuration ==<br />
<br />
* [[util-vserver:Documentation|util-vserver Documentation]]<br />
* [[util-vserver:Cheatsheet]]<br />
* [[util-vserver:Cgroups|Cgroups and utils-vserver ##draft##]]<br />
* [[vcd:Documentation|VServer Control Daemon Documentation]]<br />
* [[Share a directory among multiple guests]]<br />
<br />
== Guides and Howtos ==<br />
<br />
* [[Building Guest Systems]]<br />
* [[util-vserver:Howto virtualize an exisiting Linux server|Howto virtualize an existing Linux server]]<br />
* [[VCMD HowTo]]<br />
* [[Howto make bsd-style init sysv-compatible|Howto make Bsd-style init sysv-compatible (archlinux guest system)]]<br />
* [[Installing 32-bit Fedora on 64-bit Debian]]<br />
* [[Installing Ubuntu on Debian]]<br />
* [[Installing an openSUSE vserver guest]]<br />
* [[Networking vserver guests]]<br />
* [[Howto HostAuth]]<br />
* [[Fuse_GlusterFS| Fuse and GlusterFS]]<br />
* [[yum-patch|How to patch vyum]]<br />
* [[yum-upgrade-3.2.4|Upgrading existing installations to yum-3.2.4]]<br />
* [[Migrating from OpenVZ to Linux-Vserver]]<br />
* [[Getting_high_with_lenny]]<br />
* [[Installing_Ubuntu_Hoary_as_guest| Installing Ubuntu Hoary as guest]]<br />
* [[Applying CPU Limits]]<br />
<br />
== Lists &amp; Theory ==<br />
<br />
* Basic configuration<br />
** [[Capabilities and Flags]]<br />
** [[CPU Scheduler]]<br />
** [[Disk Limits and Quota]]<br />
** [[Resource Limits]]<br />
*** [[Memory Limits]]<br />
** [[Virtual System Information]]<br />
** [[Unification]]<br />
<br />
* Security Considerations<br />
** [[Secure Capabilities]]<br />
** [[Secure chroot Barrier]]<br />
** [[Secure Device Nodes]]<br />
** [[Secure ProcFS Entries]]<br />
<br />
* Performance and Stability<br />
** [[Virtualization Overhead]]<br />
<br />
* Implementation Details<br />
** [[Context Accounting]]<br />
** [[Filesystem Attributes]]<br />
** [[Filesystem Tagging]]<br />
** [[Filesystem Namespaces]]<br />
** [[Kernel Userspace Helper]]<br />
** [[Mainline Kernel Virtualization]]<br />
** [[ProcFS]]<br />
** [[Syscall Command Switch]]<br />
<br />
== External Resources ==</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cgroupsutil-vserver:Cgroups2009-02-24T18:34:12Z<p>82.246.252.16: New page: == Draft - Cgroups and vservers == to make cgroups works with vserver your kernel must have the following settings: <pre> CONFIG_CGROUPS=y # CONFIG_CGROUP_DEBUG is not set # CONFIG_CGROU...</p>
<hr />
<div>== Draft - Cgroups and vservers ==<br />
<br />
to make cgroups works with vserver your kernel must have the following settings:<br />
<br />
<pre><br />
CONFIG_CGROUPS=y<br />
# CONFIG_CGROUP_DEBUG is not set<br />
# CONFIG_CGROUP_NS is not set<br />
CONFIG_CGROUP_FREEZER=y<br />
CONFIG_CGROUP_DEVICE=y<br />
CONFIG_CGROUP_SCHED=y<br />
CONFIG_CGROUP_CPUACCT=y<br />
CONFIG_CGROUP_MEM_RES_CTLR=y<br />
</pre><br />
<br />
<br />
Or in the menu:<br />
<br />
<pre><br />
[*] Control Group support [ ] Example debug cgroup subsystem<br />
[ ] Namespace cgroup subsystem<br />
[*] control group freezer subsystem<br />
[*] Device controller for cgroups<br />
[*] Cpuset support<br />
[*] Group CPU scheduler<br />
[*] Group scheduling for SCHED_OTHER<br />
[ ] Group scheduling for SCHED_RR/FIFO<br />
Basis for grouping tasks (Control groups) ---><br />
[*] Simple CPU accounting cgroup subsystem<br />
[*] Resource counters<br />
[*] Memory Resource Controller for Control Groups<br />
</pre><br />
<br/><br />
Then you must create on you guest /etc/vservers/<guest>/cgroup/ all the files put here will be copied to the guest cgroup when created. The doc for cgroup is not on the great flower page but in the source of the latests utils. You can have a default cgroup directory for all guest that can be overrided by each guest's cgroup directory.<br />
<br/><br />
<br />
Regards,<br />
Ghislain.</div>82.246.252.16http://wiki.linux-vserver.org/DocumentationDocumentation2009-02-03T13:55:07Z<p>82.246.252.16: /* Configuration */</p>
<hr />
<div><div style="margin: 2em auto 2em auto; padding: 10px; background-color: #F9ECCD; border: 1px solid #004433; text-align: center;"><br />
[[Image:Icon-Caution.png|left]]<br />
We are currently migrating to MediaWiki from our old system, but not all content has been migrated yet. Take a look at the [[Wiki Team]] page for instructions how to help or look at the [http://oldwiki.linux-vserver.org old wiki] to find the information not migrated yet.<br />
<br />
'''To ease migration we created a [[List of old Documentation pages]].'''<br />
</div><br />
<br />
== Introduction ==<br />
<br />
* [[Overview|Virtualization Overview]]<br />
* [[Usage Scenarios]]<br />
* [[Feature Matrix]]<br />
<br />
== Installation ==<br />
<br />
* [[Installation Considerations]]<br />
* [[Installation on Linux 2.6]]: from source, both the kernel and util-vserver<br />
* [[Installation on ArchLinux]]<br />
* [[Installation on CentOS]]<br />
* [[Installation on Debian]]<br />
* [[Installation on Fedora]]<br />
* [[Installation on Gentoo]]<br />
* [[Installation on Mandrake]]<br />
* [http://pld-linux.org/Vserver Installation on PLD-Linux]<br />
* [[Installation on Redhat]]<br />
* [[Installation on Slackware]]<br />
* [[Installation on SuSE/OpenSUSE]]<br />
* [[Installation on Ubuntu]]<br />
<br />
== Configuration ==<br />
<br />
* [[util-vserver:Documentation|util-vserver Documentation]]<br />
* [[util-vserver:Cheatsheet]]<br />
* [[vcd:Documentation|VServer Control Daemon Documentation]]<br />
* [[Share a directory among multiple guests]]<br />
<br />
== Guides and Howtos ==<br />
<br />
* [[Building Guest Systems]]<br />
* [[util-vserver:Howto virtualize an exisiting Linux server|Howto virtualize an existing Linux server]]<br />
* [[VCMD HowTo]]<br />
* [[Howto make bsd-style init sysv-compatible|Howto make Bsd-style init sysv-compatible (archlinux guest system)]]<br />
* [[Installing 32-bit Fedora on 64-bit Debian]]<br />
* [[Installing Ubuntu on Debian]]<br />
* [[Installing an openSUSE vserver guest]]<br />
* [[Networking vserver guests]]<br />
* [[Howto HostAuth]]<br />
* [[Fuse_GlusterFS| Fuse and GlusterFS]]<br />
* [[yum-patch|How to patch vyum]]<br />
* [[yum-upgrade-3.2.4|Upgrading existing installations to yum-3.2.4]]<br />
* [[Migrating from OpenVZ to Linux-Vserver]]<br />
* [[Getting_high_with_lenny]]<br />
* [[Installing_Ubuntu_Hoary_as_guest| Installing Ubuntu Hoary as guest]]<br />
* [[Applying CPU Limits]]<br />
<br />
== Lists &amp; Theory ==<br />
<br />
* Basic configuration<br />
** [[Capabilities and Flags]]<br />
** [[CPU Scheduler]]<br />
** [[Disk Limits and Quota]]<br />
** [[Resource Limits]]<br />
*** [[Memory Limits]]<br />
** [[Virtual System Information]]<br />
** [[Unification]]<br />
<br />
* Security Considerations<br />
** [[Secure Capabilities]]<br />
** [[Secure chroot Barrier]]<br />
** [[Secure Device Nodes]]<br />
** [[Secure ProcFS Entries]]<br />
<br />
* Performance and Stability<br />
** [[Virtualization Overhead]]<br />
<br />
* Implementation Details<br />
** [[Context Accounting]]<br />
** [[Filesystem Attributes]]<br />
** [[Filesystem Tagging]]<br />
** [[Filesystem Namespaces]]<br />
** [[Kernel Userspace Helper]]<br />
** [[Mainline Kernel Virtualization]]<br />
** [[ProcFS]]<br />
** [[Syscall Command Switch]]<br />
<br />
== External Resources ==</div>82.246.252.16http://wiki.linux-vserver.org/DocumentationDocumentation2009-02-03T13:54:52Z<p>82.246.252.16: /* Configuration */</p>
<hr />
<div><div style="margin: 2em auto 2em auto; padding: 10px; background-color: #F9ECCD; border: 1px solid #004433; text-align: center;"><br />
[[Image:Icon-Caution.png|left]]<br />
We are currently migrating to MediaWiki from our old system, but not all content has been migrated yet. Take a look at the [[Wiki Team]] page for instructions how to help or look at the [http://oldwiki.linux-vserver.org old wiki] to find the information not migrated yet.<br />
<br />
'''To ease migration we created a [[List of old Documentation pages]].'''<br />
</div><br />
<br />
== Introduction ==<br />
<br />
* [[Overview|Virtualization Overview]]<br />
* [[Usage Scenarios]]<br />
* [[Feature Matrix]]<br />
<br />
== Installation ==<br />
<br />
* [[Installation Considerations]]<br />
* [[Installation on Linux 2.6]]: from source, both the kernel and util-vserver<br />
* [[Installation on ArchLinux]]<br />
* [[Installation on CentOS]]<br />
* [[Installation on Debian]]<br />
* [[Installation on Fedora]]<br />
* [[Installation on Gentoo]]<br />
* [[Installation on Mandrake]]<br />
* [http://pld-linux.org/Vserver Installation on PLD-Linux]<br />
* [[Installation on Redhat]]<br />
* [[Installation on Slackware]]<br />
* [[Installation on SuSE/OpenSUSE]]<br />
* [[Installation on Ubuntu]]<br />
<br />
== Configuration ==<br />
<br />
* [[util-vserver:Documentation|util-vserver Documentation]]<br />
* [[vcd:Documentation|VServer Control Daemon Documentation]]<br />
* [[Share a directory among multiple guests]]<br />
* [[util-vserver:Cheatsheet]]<br />
<br />
== Guides and Howtos ==<br />
<br />
* [[Building Guest Systems]]<br />
* [[util-vserver:Howto virtualize an exisiting Linux server|Howto virtualize an existing Linux server]]<br />
* [[VCMD HowTo]]<br />
* [[Howto make bsd-style init sysv-compatible|Howto make Bsd-style init sysv-compatible (archlinux guest system)]]<br />
* [[Installing 32-bit Fedora on 64-bit Debian]]<br />
* [[Installing Ubuntu on Debian]]<br />
* [[Installing an openSUSE vserver guest]]<br />
* [[Networking vserver guests]]<br />
* [[Howto HostAuth]]<br />
* [[Fuse_GlusterFS| Fuse and GlusterFS]]<br />
* [[yum-patch|How to patch vyum]]<br />
* [[yum-upgrade-3.2.4|Upgrading existing installations to yum-3.2.4]]<br />
* [[Migrating from OpenVZ to Linux-Vserver]]<br />
* [[Getting_high_with_lenny]]<br />
* [[Installing_Ubuntu_Hoary_as_guest| Installing Ubuntu Hoary as guest]]<br />
* [[Applying CPU Limits]]<br />
<br />
== Lists &amp; Theory ==<br />
<br />
* Basic configuration<br />
** [[Capabilities and Flags]]<br />
** [[CPU Scheduler]]<br />
** [[Disk Limits and Quota]]<br />
** [[Resource Limits]]<br />
*** [[Memory Limits]]<br />
** [[Virtual System Information]]<br />
** [[Unification]]<br />
<br />
* Security Considerations<br />
** [[Secure Capabilities]]<br />
** [[Secure chroot Barrier]]<br />
** [[Secure Device Nodes]]<br />
** [[Secure ProcFS Entries]]<br />
<br />
* Performance and Stability<br />
** [[Virtualization Overhead]]<br />
<br />
* Implementation Details<br />
** [[Context Accounting]]<br />
** [[Filesystem Attributes]]<br />
** [[Filesystem Tagging]]<br />
** [[Filesystem Namespaces]]<br />
** [[Kernel Userspace Helper]]<br />
** [[Mainline Kernel Virtualization]]<br />
** [[ProcFS]]<br />
** [[Syscall Command Switch]]<br />
<br />
== External Resources ==</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-12-03T18:19:57Z<p>82.246.252.16: /* What are the main vutils commands ? */</p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: <pre>sudo vuname --xid 40133 -s -t 'machine=i686'</pre><br />
<br />
: Possible values for TAG are:<br />
:: <pre>context, sysname, nodename, release, version, machine, domainname</pre><br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry)<br />
:# vsched : to change schheduling parameters of live guest <br />
<br />
:: those parameters can be '''setup permanently''' in the configuration files, see the vutil flower page for details ([http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page]).<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest<br />
:# vemerge : to run emerge from the host in one or more guest<br />
:# vmount : to mount file systems inside guest from the host<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest)<br />
:# vtop : top in a guest aware way (see all the process of host+guest)<br />
:# vserver-info : gives version and other usefull information about the utils installed<br />
:# vserver-stat : gives informations about running guests<br />
<br />
== What are the services that need to be running in a basic setup ?==<br />
<br />
: '''Services to allow on boot''' :<br />
<br />
:# vprocunhide : this one is mandatory to unlock /proc visibility for guest<br />
:# vservers-default: this one will start the vservers on reboot, most users need this one<br />
:# util-vserver : ? do not know what it does.<br />
<br />
: this article in incomplete, please do not hesistate to add your comments !</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-12-03T18:19:29Z<p>82.246.252.16: /* How to change the machine type live ? */</p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: <pre>sudo vuname --xid 40133 -s -t 'machine=i686'</pre><br />
<br />
: Possible values for TAG are:<br />
:: <pre>context, sysname, nodename, release, version, machine, domainname</pre><br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry)<br />
:# vsched : to change schheduling parameters of live guest <br />
<br />
: those parameters can be '''setup permanently''' in the configuration files, see the vutil flower page for details ([http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page]).<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest<br />
:# vemerge : to run emerge from the host in one or more guest<br />
:# vmount : to mount file systems inside guest from the host<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest)<br />
:# vtop : top in a guest aware way (see all the process of host+guest)<br />
:# vserver-info : gives version and other usefull information about the utils installed<br />
:# vserver-stat : gives informations about running guests<br />
<br />
<br />
== What are the services that need to be running in a basic setup ?==<br />
<br />
: '''Services to allow on boot''' :<br />
<br />
:# vprocunhide : this one is mandatory to unlock /proc visibility for guest<br />
:# vservers-default: this one will start the vservers on reboot, most users need this one<br />
:# util-vserver : ? do not know what it does.<br />
<br />
: this article in incomplete, please do not hesistate to add your comments !</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-12-03T08:54:52Z<p>82.246.252.16: </p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: exemple "sudo vuname --xid 40133 -s -t 'machine=i686'"<br />
<br />
: Possible values for TAG are:<br />
:: context, sysname, nodename, release, version, machine, domainname<br />
<br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry)<br />
:# vsched : to change schheduling parameters of live guest <br />
<br />
: those parameters can be '''setup permanently''' in the configuration files, see the vutil flower page for details ([http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page]).<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest<br />
:# vemerge : to run emerge from the host in one or more guest<br />
:# vmount : to mount file systems inside guest from the host<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest)<br />
:# vtop : top in a guest aware way (see all the process of host+guest)<br />
:# vserver-info : gives version and other usefull information about the utils installed<br />
:# vserver-stat : gives informations about running guests<br />
<br />
<br />
== What are the services that need to be running in a basic setup ?==<br />
<br />
: '''Services to allow on boot''' :<br />
<br />
:# vprocunhide : this one is mandatory to unlock /proc visibility for guest<br />
:# vservers-default: this one will start the vservers on reboot, most users need this one<br />
:# util-vserver : ? do not know what it does.<br />
<br />
: this article in incomplete, please do not hesistate to add your comments !</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-12-03T08:47:15Z<p>82.246.252.16: </p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: exemple "sudo vuname --xid 40133 -s -t 'machine=i686'"<br />
<br />
: Possible values for TAG are:<br />
:: context, sysname, nodename, release, version, machine, domainname<br />
<br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry)<br />
:# vsched : to change schheduling parameters of live guest <br />
<br />
: those parameters can be '''setup permanently''' in the configuration files, see the vutil flower page for details ([http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page]).<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest<br />
:# vemerge : to run emerge from the host in one or more guest<br />
:# vmount : to mount file systems inside guest from the host<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest)<br />
:# vtop : top in a guest aware way (see all the process of host+guest)<br />
:# vserver-info : gives version and other usefull information about the utils installed<br />
:# vserver-stat : gives informations about running guests</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-12-03T08:42:20Z<p>82.246.252.16: </p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: exemple "sudo vuname --xid 40133 -s -t 'machine=i686'"<br />
<br />
: Possible values for TAG are:<br />
:: context, sysname, nodename, release, version, machine, domainname<br />
<br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry)<br />
:# vsched : to change schheduling parameters of live guest <br />
<br />
: those parameters can be '''setup permanently''' in the configuration files, see the vutil flower page for details.<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest<br />
:# vemerge : to run emerge from the host in one or more guest<br />
:# vmount : to mount file systems inside guest from the host<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest)<br />
:# vtop : top in a guest aware way (see all the process of host+guest)<br />
:# vserver-info : gives version and other usefull information about the utils installed<br />
:# vserver-stat : gives informations about running guests</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-12-03T08:40:36Z<p>82.246.252.16: </p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: exemple "sudo vuname --xid 40133 -s -t 'machine=i686'"<br />
<br />
: Possible values for TAG are:<br />
:: context, sysname, nodename, release, version, machine, domainname<br />
<br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry)<br />
:# vsched : to change schheduling parameters of live guest <br />
<br />
:ll those parameters can be setup permanently in the configuration files, see the vutil flower page for details.<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest<br />
:# vemerge : to run emerge from the host in one or more guest<br />
:# vmount : to mount file systems inside guest from the host<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest)<br />
:# vtop : top in a guest aware way (see all the process of host+guest)<br />
:# vserver-info : gives version and other usefull information about the utils installed<br />
:# vserver-stat : gives informations about running guests</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-12-03T08:38:44Z<p>82.246.252.16: </p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: exemple "sudo vuname --xid 40133 -s -t 'machine=i686'"<br />
<br />
: Possible values for TAG are:<br />
:: context, sysname, nodename, release, version, machine, domainname<br />
<br />
<br />
== What are the main vutils commands ?==<br />
<br />
: '''Main ones are''' :<br />
<br />
:# vserver : to create enter , start, stop, destroy etc the vserver guests<br />
:# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname<br />
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)<br />
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)<br />
:# vlimit : to change the limits of a live guest (cpu, fsize, data, stack, core, rss, nproc,nofile, memlock, as, locks, msgqueue, nsock, openfd, anon, shmem, semary,nsems, and dentry)<br />
:# vsched : to change schheduling parameters of live guest <br />
<br />
:ll those parameters can be setup permanently in the configuration files, see the vutil flower page for details.<br />
<br />
:'''Other usefull vutils''' :<br />
<br />
:# vapt-get : to run apt-get from the host in one or more guest<br />
:# vemerge : to run emerge from the host in one or more guest<br />
:# vmount : to mount file systems inside guest from the host<br />
<br />
<br />
: '''daily usage one''':<br />
<br />
:# vps : ps in a guest aware way (see all the process of host+guest)<br />
:# vtop : top in a guest aware way (see all the process of host+guest)</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-12-02T15:55:36Z<p>82.246.252.16: </p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the '''vuname''' command, <br />
:: exemple "sudo vuname --xid 40133 -s -t 'machine=i686'"<br />
<br />
: Possible values for TAG are:<br />
:: context, sysname, nodename, release, version, machine, domainname</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-12-02T15:49:04Z<p>82.246.252.16: /* How to change the machine type live ? */</p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
: For this you can use the vuname command, <br />
: exemple "sudo vuname --xid 40133 -s -t 'machine=i686'"<br />
<br />
<pre>Usage: vuname [-g] --xid <xid> <TAG>*<br />
or vuname -s --xid <xid> -t <TAG>=<VALUE> [--] [<command> <args>*]<br />
or vuname --dir <dir> --xid <xid> [--missingok] [--] [<command> <args>*]<br />
<br />
Options:<br />
-g ... get and print the value<br />
-s ... set the value<br />
<br />
--xid <xid> ... operate on this context; 'self' means the current one<br />
-t <TAG>=<VALUE><br />
... set <TAG> to <VALUE>; this option can be repeated multiple time<br />
--dir <dir> ... read values from files in <dir>. These files must<br />
have a valid TAG as their name<br />
--missingok ... do not fail when the <DIR> from '--dir' does not exist.<br />
<br />
Possible values for TAG are:<br />
context, sysname, nodename, release, version, machine, domainname<br />
</pre></div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-11-26T20:36:59Z<p>82.246.252.16: </p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).<br />
<br />
== How to change the machine type live ?==<br />
<br />
# use the vuname command<br />
<br />
<pre>Usage: vuname [-g] --xid <xid> <TAG>*<br />
or vuname -s --xid <xid> -t <TAG>=<VALUE> [--] [<command> <args>*]<br />
or vuname --dir <dir> --xid <xid> [--missingok] [--] [<command> <args>*]<br />
<br />
Options:<br />
-g ... get and print the value<br />
-s ... set the value<br />
<br />
--xid <xid> ... operate on this context; 'self' means the current one<br />
-t <TAG>=<VALUE><br />
... set <TAG> to <VALUE>; this option can be repeated multiple time<br />
--dir <dir> ... read values from files in <dir>. These files must<br />
have a valid TAG as their name<br />
--missingok ... do not fail when the <DIR> from '--dir' does not exist.<br />
<br />
Possible values for TAG are:<br />
context, sysname, nodename, release, version, machine, domainname<br />
</pre></div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-11-04T13:56:55Z<p>82.246.252.16: /* How to add an IP address to a guest ? */</p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a live guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-11-04T13:55:01Z<p>82.246.252.16: /* Where to find the latest util-vserver ? */</p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre><br />
<br />
:and for the lastest kernel patch:<br />
<br />
:<pre>http://vserver.13thfloor.at/Experimental/</pre><br />
<br />
== How to add an IP address to a guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-11-03T10:11:04Z<p>82.246.252.16: </p>
<hr />
<div>This is a cheatsheet for util-vserver. Some of these recipes have been arrived at by users, using trial and error, so they may not always be the "official" solutions.<br />
<br />
== Where to find the latest util-vserver ? ==<br />
<br />
:Look here:<br />
<br />
:http://people.linux-vserver.org/~dhozac/t/uv-testing/<br />
<br />
== How to add an IP address to a guest ?==<br />
<br />
# create the address on the host: <pre>ifconfig eth0:10 172.16.0.145/12</pre> or <pre>ip addr add dev eth0 172.16.0.145/12</pre> or even <pre>ip addr add dev dummy0 172.16.0.145/12</pre><br />
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre><br />
#* Depending on what you use the vserver for, you may not want the broadcast thing at all; you can also use a /32 mask for the IP in this case.<br />
# add the ip to the config directory to make it stick if you restart <br />
# enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-10-23T20:15:52Z<p>82.246.252.16: </p>
<hr />
<div>= util-vserver cheatsheet =<br />
<br />
ok,<br />
<br />
here is my cheatsheet for util-vserver. I figured a lot by hand so i would like to share some here. This is a draft:<br />
<br />
<br />
<br />
==HOT ADD AN ADRESS TO A GUEST:==<br />
<br />
# create the address on the host: <br/> '''ifconfig eth0:10 172.16.0.145/12'''<br/><br />
# add the adress:<br/> '''naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255'''<br />
# add the ip to the config directory to make it sticjk if you restart <br />
# enter the guest and verify services that need to listen to the ip, restart fi necessary (for me it was not).</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-10-23T17:19:01Z<p>82.246.252.16: </p>
<hr />
<div>= util-vserver cheatsheet =<br />
<br />
ok,<br />
<br />
here is my cheatsheet for util-vserver. I figured a lot by hand so i would like to share some here. This is a draft:<br />
<br />
<br />
<br />
==HOT ADD AN ADRESS TO A GUEST:==<br />
<br />
# create the address on the host: <br />
:'''ifconfig eth0:10 172.16.0.145/12'''<br />
# add the adress: <br />
:'''naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255'''</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-10-23T17:17:47Z<p>82.246.252.16: </p>
<hr />
<div>= util-vserver cheatsheet =<br />
<br />
ok,<br />
<br />
here is my cheatsheet for util-vserver. I figured a lot by hand so i would like to share some here. This is a draft:<br />
<br />
<br />
<br />
==HOT ADD AN ADRESS TO A GUEST:==<br />
<br />
# create the address on the host: '''ifconfig eth0:10 172.16.0.145/12'''<br />
# add the adress: '''naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255'''</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-10-23T17:17:26Z<p>82.246.252.16: </p>
<hr />
<div>= util-vserver cheatsheet =<br />
<br />
ok,<br />
<br />
here is my cheatsheet for util-vserver. I figured a lot by hand so i would like to share some here. This is a draft:<br />
<br />
<br />
<br />
==HOT ADD AN ADRESS TO A GUEST:==<br />
<br />
# create the address on the host: ifconfig eth0:10 172.16.0.145/12<br />
# add the adress: naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-10-23T16:48:47Z<p>82.246.252.16: </p>
<hr />
<div>= util-vserver cheatsheet =<br />
<br />
ok,<br />
<br />
here is my cheatsheet for util-vserver. I figured a lto by hand so i would like to share some here. This is a draft:<br />
<br />
<br />
<br />
==HOT ADD AN ADRESS TO A GUEST:==<br />
<br />
# create the address on the host: ifconfig eth0:10 172.16.0.145/12<br />
# add the adress: naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</div>82.246.252.16http://wiki.linux-vserver.org/util-vserver:Cheatsheetutil-vserver:Cheatsheet2008-10-23T16:46:04Z<p>82.246.252.16: various util vserver command i learned</p>
<hr />
<div>ok,<br />
<br />
here is my cheatsheet for util-vserver. I figured a lto by hand so i would like to share some here. This is a draft:<br />
<br />
<br />
<br />
HOT ADD AN ADRESS TO A GUEST:<br />
<br />
<br />
- create the address on the host: ifconfig eth0:10 172.16.0.145/12<br />
- add the adress: naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</div>82.246.252.16