Revision as of 18:03, 1 March 2009 by 22.214.171.124
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:
- and for the lastest kernel patch:
How to add an IP address to a live guest ?
- create the address on the host:
ifconfig eth0:10 172.16.0.145/12or
ip addr add dev eth0 172.16.0.145/12or even
ip 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,
sudo vuname --xid 40133 -s -t 'machine=i686'
- Possible values for TAG are:
context, sysname, nodename, release, version, machine, domainname
What are the main vutils commands ?
- 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
- those parameters can be setup permanently in the configuration files, see the vutil flower page for details (The Great Flower Page).
- 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
- 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
What are the services that need to be running in a basic setup ?
- 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 !