Difference between revisions of "util-vserver:Cheatsheet"
From Linux-VServer
KornAndras (Talk | contribs) (→util-vserver cheatsheet: typo fixing, beautification, some additional command lines) |
KornAndras (Talk | contribs) (Remove main title (page has it anyway); rephrase introduction to be more neutral/formal.) |
||
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. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
== How to add an IP address to a guest == | == How to add an IP address to a guest == |
Revision as of 00:21, 29 October 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.
How to add an IP address to a 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).