To create and start a VPs, run the following commands:
Quote:
[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:
Quote:
[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:
Quote:
[server-node]# vzctl exec VEID ps ax
To enter VPS give the following command:
Quote:
[server-node]# vzctl enter VEID
entered into VPS VEID
[ve]#
To exit from VPS, just type exit and press enter:
Quote:
[ve]# exit
exited from VPS VEID
[server-node]#
To stop VPs:
Quote:
[server-node]# vzctl stop VEID
Stopping VPS ...
VPS was stopped
VPS is unmounted
To destroy VPs:
Quote:
[server-node]# vzctl destroy VEID
Destroying VPS private area: /vz/private/VEID
VPS private area was destroyed
Enjoy
Ninad S
No comments:
Post a Comment