Saturday, June 2, 2007

VPS Functions

To create and start a VPs, run the following commands:

[server-node]# vzctl create VEID --ostemplate osname
[server-node]# vzctl set VEID --ipadd b.c.d.e --save
[server-node]# vzctl start VEID

Here VEID is the numeric ID for the VPS; osname is the name of the OS template for the VPS, and b.c.d.e is the IP address to be assigned to the VE.

For example:
[server-node]# vzctl create 102 --ostemplate centos-4-minimal
[server-node]# vzctl set 102 --ipadd b.c.d.e --save
[server-node]# vzctl start 102

Your new VPs should be up and running now. You can see its processes:
[server-node]# vzctl exec VEID ps ax

To enter VPS give the following command:
[server-node]# vzctl enter VEID
entered into VPS VEID

To exit from VPS, just type exit and press enter:
[ve]# exit
exited from VPS VEID


To stop VPs:

[server-node]# vzctl stop VEID
Stopping VPS ...
VPS was stopped
VPS is unmounted

To destroy VPs:
[server-node]# vzctl destroy VEID
Destroying VPS private area: /vz/private/VEID
VPS private area was destroyed

Ninad S

No comments:

View My Stats