util-vserver:Useful commands

From Linux-VServer

Revision as of 19:25, 28 June 2008 by Dniel (Talk | contribs)

Jump to: navigation, search

Contents

Starting a virtual server

You can start a virtual server with the following command:

# vserver <name> start

Where <name> is the name of the virtual server.

Coming into a virtual server

To enter into a virtual server execute this command:

# vserver <name> enter

To exit from a virtual server

To exit from a virtual server you only need to finish the Shell. For example typing:

# exit

or pressing "Ctrl + d"

In this way you can finish the virtual server Shell.

Stopping a virtual server

Use the following command:

# vserver <name> stop

Showing what virtual server are running and some information

run this command:

$ vserver-stat

Copying a virtual server and changing its address IP

# vserver-copy --stopstart --ip newIP --domain newDomain nameOldServer nameNewServer

where:

-s,--stopstart: stops  the virtual server before copying and start the new vserver afterwards.
                This really only makes sense if you are copying across root hosts and not changing
                names or IP addresses.

-i,--ip address: the new IP address when changing name. Overwrites /etc/hosts. Must be used with -d

-d,--domain domain: the new DNS domain when changing name. Overwrites /etc/hosts. Must be used with -i

You can see more information in "man vserver-copy"

Deleting a virtual server

# vserver <name> delete

Where <name> should be replaced by the name of virtual server.

Other useful commands

vserver-info: gives info about the vserver program itself

vtop: a top command that shows the top of *all* vservers

vpstree: a tree ps view of processes of all vservers

vps: a ps that shows processes of all vservers

Personal tools