Util-vserver:Cheatsheet: Difference between revisions

From Linix VServer
Jump to navigationJump to search
(Restored content from Wayback Machine)
 
(15 intermediate revisions by 10 users not shown)
Line 1: Line 1:
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.
<div id="content">


== Where to find the latest util-vserver ? ==
<span id="top"></span>
<span id="util-vservercheatsheet"></span>
= util-vserver:Cheatsheet =


:Look here:
<div id="bodyContent">


:<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre>
<span id="siteSub"></span>
=== From Linux-VServer ===


:and for the lastest kernel patch:
<div id="contentSub">


:<pre>http://vserver.13thfloor.at/Experimental/</pre>


== How to add an IP address to a live guest ?==


# 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>
</div>
# add the adress:<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre>
<div id="jump-to-nav">
#* 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.
# 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).<pre>To make those change permanent you have to modify the files in your /etc/vservers/<vserver-name>/uts/xxx file.</pre>


== How to change the machine type live ?==
Jump to: [[#column-one|navigation]], [[#searchInput|search]]


: For this you can use the '''vuname''' command,
</div>
:: <pre>sudo vuname --xid 40133 -s -t 'machine=i686'</pre>
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 &quot;official&quot; solutions.


: Possible values for TAG are:
{| id="toc" class="wikitable toc" summary="Contents"
:: <pre>context, sysname, nodename, release, version, machine, domainname</pre>
|-
| <div id="toctitle">


== What are the main vutils commands ?==
<span id="contents"></span>
== Contents ==


: '''Main ones are''' :


:# vserver : to create enter , start, stop, destroy etc the vserver guests
</div>
:# vuname :  to change live guest : context, sysname, nodename, release, version, machine or domainname
* [[#Where_to_find_the_latest_util-vserver_.3F|<span class="tocnumber">1</span> <span class="toctext">Where to find the latest util-vserver ?</span>]]
:# vattribute: to change capabilities of a live guest (bcap, ccap and flags)
* [[#How_to_add_an_IP_address_to_a_live_guest_.3F|<span class="tocnumber">2</span> <span class="toctext">How to add an IP address to a live guest ?</span>]]
:# nattribute: to change network capabilities and flags of a live guest (ncaps and flags)
* [[#How_to_change_the_machine_type_live_.3F|<span class="tocnumber">3</span> <span class="toctext">How to change the machine type live ?</span>]]
:# 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)
* [[#What_are_the_main_vutils_commands_.3F|<span class="tocnumber">4</span> <span class="toctext">What are the main vutils commands ?</span>]]
:# vsched :    to change schheduling parameters of live guest
* [[#What_are_the_services_that_need_to_be_running_in_a_basic_setup_.3F|<span class="tocnumber">5</span> <span class="toctext">What are the services that need to be running in a basic setup ?</span>]]


:: 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]).
|}


:'''Other usefull vutils''' :
<span id="Where_to_find_the_latest_util-vserver_.3F"></span>
<span id="edit-where-to-find-the-latest-util-vserver"></span>
== <span class="editsection">[<nowiki/>[[index.php?title=util-vserver:Cheatsheet&action=edit&section=1|edit]]]</span> <span class="mw-headline"> Where to find the latest util-vserver ? </span> ==


:# vapt-get : to run apt-get from the host in one or more guest
Look here:
:# vemerge  : to run emerge from the host in one or more guest
<pre>http://people.linux-vserver.org/~dhozac/t/uv-testing/</pre>
:# vmount : to mount file systems inside guest from the host
and for the lastest kernel patch:
<pre>http://vserver.13thfloor.at/Experimental/</pre>
<span id="How_to_add_an_IP_address_to_a_live_guest_.3F"></span>
<span id="edit-how-to-add-an-ip-address-to-a-live-guest"></span>
== <span class="editsection">[<nowiki/>[[index.php?title=util-vserver:Cheatsheet&action=edit&section=2|edit]]]</span> <span class="mw-headline"> How to add an IP address to a live guest ?</span> ==


<ol>
<li><p>create the address on the host:</p>
<pre>ifconfig eth0:10 172.16.0.145/12</pre>
<p>or</p>
<pre>ip addr add dev eth0 172.16.0.145/12</pre>
<p>or even</p>
<pre>ip addr add dev dummy0 172.16.0.145/12</pre></li>
<li><p>add the adress:</p>
<pre>naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255</pre>
<ul>
<li>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.</li></ul>
</li>
<li>add the ip to the config directory to make it stick if you restart<br />
</li>
<li>enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).</li></ol>


: '''daily usage one''':
<span id="How_to_change_the_machine_type_live_.3F"></span>
<span id="edit-how-to-change-the-machine-type-live"></span>
== <span class="editsection">[<nowiki/>[[index.php?title=util-vserver:Cheatsheet&action=edit&section=3|edit]]]</span> <span class="mw-headline"> How to change the machine type live ?</span> ==


:# vps : ps in a guest aware way (see all the process of host+guest)
For this you can use the '''vuname''' command,
:# vtop : top in a guest aware way (see all the process of host+guest)
<pre>sudo vuname --xid 40133 -s -t 'machine=i686'</pre>
:# vserver-info : gives version and other usefull information about the utils installed
Possible values for TAG are:
:# vserver-stat : gives informations about running guests
<pre>context, sysname, nodename, release, version, machine, domainname</pre>
To make those change permanent you have to modify the files in your /etc/vservers/&lt;vserver-name&gt;/uts/machine file see the great flower page for details.
<span id="What_are_the_main_vutils_commands_.3F"></span>
<span id="edit-what-are-the-main-vutils-commands"></span>
== <span class="editsection">[<nowiki/>[[index.php?title=util-vserver:Cheatsheet&action=edit&section=4|edit]]]</span> <span class="mw-headline"> What are the main vutils commands ?</span> ==


== What are the services that need to be running in a basic setup ?==
'''Main ones are''' :
# vserver : to create enter , start, stop, destroy etc the vserver guests.
# vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname.
# vattribute: to change capabilities of a live guest (bcap, ccap and flags).
# nattribute: to change network capabilities and flags of a live guest (ncaps and flags).
# 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).
# vsched : to change schheduling parameters of live guest.
# vdevmap : to remap device or give permission to a guest to create/read/open specific devices.
# vdlimit : to change the directory limits of a live guest.


: '''Services to allow on boot''' :
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 />


:# vprocunhide : this one is mandatory to unlock /proc visibility for guest
:# vservers-default:  this one will start the vservers on reboot, most users need this one
:# util-vserver : ? do not know what it does.


: this article in incomplete, please do not hesistate to add your comments !
'''Other usefull vutils''' :
# vapt-get : to run apt-get from the host in one or more guest.
# vemerge  : to run emerge from the host in one or more guest.
# vmount : to mount file systems inside guest from the host.
# vsomething : to run one command to all vserver in one go.
 
<br />
 
 
'''daily usage one''':
# vps : ps in a guest aware way (see all the process of host+guest).
# vtop : top in a guest aware way (see all the process of host+guest).
# vserver-info : gives version and other usefull information about the utils installed.
# vserver-stat : gives informations about running guests.
 
<span id="What_are_the_services_that_need_to_be_running_in_a_basic_setup_.3F"></span>
<span id="edit-what-are-the-services-that-need-to-be-running-in-a-basic-setup"></span>
== <span class="editsection">[<nowiki/>[[index.php?title=util-vserver:Cheatsheet&action=edit&section=5|edit]]]</span> <span class="mw-headline"> What are the services that need to be running in a basic setup ?</span> ==
 
'''Services to allow on boot''' :
# vprocunhide : this one is mandatory to unlock /proc visibility for guest
# vservers-default: this one will start the vservers on reboot, most users need this one
# util-vserver : ? do not know what it does.
 
this article in incomplete, please do not hesistate to add your comments !
<div class="printfooter">
 
Retrieved from &quot;http://linux-vserver.org/util-vserver:Cheatsheet&quot;
 
</div>
<div class="visualClear">
 
 
 
</div>
 
</div>
 
</div>

Latest revision as of 22:57, 10 November 2025

util-vserver:Cheatsheet[edit]

From Linux-VServer[edit]


Jump to: navigation, search

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.

Contents[edit]

[edit] Where to find the latest util-vserver ? [edit]

Look here:

http://people.linux-vserver.org/~dhozac/t/uv-testing/

and for the lastest kernel patch:

http://vserver.13thfloor.at/Experimental/

[edit] How to add an IP address to a live guest ?[edit]

  1. create the address on the host:

    ifconfig eth0:10 172.16.0.145/12

    or

    ip addr add dev eth0 172.16.0.145/12

    or even

    ip addr add dev dummy0 172.16.0.145/12
  2. add the adress:

    naddress --nid guestname --add --ip 172.16.0.145 --bcast 172.31.255.255
    • 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.
  3. add the ip to the config directory to make it stick if you restart
  4. enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).

[edit] How to change the machine type live ?[edit]

For this you can use the vuname command,

sudo vuname --xid 40133 -s -t 'machine=i686'

Possible values for TAG are:

context, sysname, nodename, release, version, machine, domainname

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.

[edit] What are the main vutils commands ?[edit]

Main ones are :

  1. vserver : to create enter , start, stop, destroy etc the vserver guests.
  2. vuname : to change live guest : context, sysname, nodename, release, version, machine or domainname.
  3. vattribute: to change capabilities of a live guest (bcap, ccap and flags).
  4. nattribute: to change network capabilities and flags of a live guest (ncaps and flags).
  5. 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).
  6. vsched : to change schheduling parameters of live guest.
  7. vdevmap : to remap device or give permission to a guest to create/read/open specific devices.
  8. vdlimit : to change the directory limits of a live guest.

those parameters can be setup permanently in the configuration files, see the vutil flower page for details (The Great Flower Page).


Other usefull vutils :

  1. vapt-get : to run apt-get from the host in one or more guest.
  2. vemerge  : to run emerge from the host in one or more guest.
  3. vmount : to mount file systems inside guest from the host.
  4. vsomething : to run one command to all vserver in one go.



daily usage one:

  1. vps : ps in a guest aware way (see all the process of host+guest).
  2. vtop : top in a guest aware way (see all the process of host+guest).
  3. vserver-info : gives version and other usefull information about the utils installed.
  4. vserver-stat : gives informations about running guests.

[edit] What are the services that need to be running in a basic setup ?[edit]

Services to allow on boot :

  1. vprocunhide : this one is mandatory to unlock /proc visibility for guest
  2. vservers-default: this one will start the vservers on reboot, most users need this one
  3. util-vserver : ? do not know what it does.

this article in incomplete, please do not hesistate to add your comments !