Difference between revisions of "util-vserver:Cheatsheet"
From Linux-VServer
(→How to change the machine type live ?) |
|||
Line 21: | Line 21: | ||
== How to change the machine type live ?== | == How to change the machine type live ?== | ||
− | + | : For this you can use the vuname command, | |
+ | : exemple "sudo vuname --xid 40133 -s -t 'machine=i686'" | ||
<pre>Usage: vuname [-g] --xid <xid> <TAG>* | <pre>Usage: vuname [-g] --xid <xid> <TAG>* |
Revision as of 16:49, 2 December 2008
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.
Where to find the latest util-vserver ?
- Look here:
http://people.linux-vserver.org/~dhozac/t/uv-testing/
- and for the lastest kernel patch:
http://vserver.13thfloor.at/Experimental/
How to add an IP address to a live guest ?
- create the address on the host:
ifconfig eth0:10 172.16.0.145/12
orip addr add dev eth0 172.16.0.145/12
or evenip addr add dev dummy0 172.16.0.145/12
- 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.
- add the ip to the config directory to make it stick if you restart
- enter the guest and verify services that need to listen on the ip, restart if necessary (for me it was not).
How to change the machine type live ?
- For this you can use the vuname command,
- exemple "sudo vuname --xid 40133 -s -t 'machine=i686'"
Usage: vuname [-g] --xid <xid> <TAG>* or vuname -s --xid <xid> -t <TAG>=<VALUE> [--] [<command> <args>*] or vuname --dir <dir> --xid <xid> [--missingok] [--] [<command> <args>*] Options: -g ... get and print the value -s ... set the value --xid <xid> ... operate on this context; 'self' means the current one -t <TAG>=<VALUE> ... set <TAG> to <VALUE>; this option can be repeated multiple time --dir <dir> ... read values from files in <dir>. These files must have a valid TAG as their name --missingok ... do not fail when the <DIR> from '--dir' does not exist. Possible values for TAG are: context, sysname, nodename, release, version, machine, domainname