Monday, August 5, 2013

Some Open Vz Commands and Configuration files

Some Open Vz Commands and Configuration files

Following are some important commands which are normally used while working on a Hardware Node.
1) vzlist -a : Shows list of all the VPS’s hosted on the Node.
2) vzctl start VPS_ID: To start the VPS.
3) vzctl stop VPS_ID : To stop (Shut Down) the VPS
4) vzctl status VPS_ID : To view the status of the particular VPS
5) vzctl stop VPS_ID –fast : to stop the VPS quickly and forcefully
6) vzctl enter VPS_ID : To enter in a particular VPS
Configuration Commands
1) vzctl set VPS_ID –hostname vps.domain.com –save: To set the Hostname of a VPS.
2) vzctl set VPS_ID –ipadd 1.2.3.4 –save : To add a new IP to the hosting VPS.
3) vzctl set VPS_ID –ipdel 1.2.3.4 –save : To delete the IP from VPS.
4) vzctl set VPS_ID –userpasswd root:new_password –save : to reset root password of a VPS.
5) vzctl set VPS_ID –nameserver 1.2.3.4 –save : To add the nameserver IP’s to the VPS.
6) vzctl exec VPS_ID command : To run any command on a VPS from Node.
7) vzyum VPS_ID install package_name : To install any package/Software on a VPS from Node.
Here VPS_ID refers to the ID of the Particular VPS.
8)vzctl destroy VPS_ID-To destroy particular vps
9)vzcalc -v VPS_ID-To show resources used by a VPS
10)vzcpucheck-To check CPU usage by OpenVZ
11)vzcpucheck -v-To get CPU usage per VPS
12)vzctl exec 103 df-to Execute commands inside particular vps container.
Default Locations

/vz - Main directory for OpenVZ.
/vz/private - Each VPS is stored here i.e. container's private directories
/vz/template/cache - You must download and store each Linux distribution template here.
/etc/vz/ - OpenVZ configuration directory.
/etc/vz/vz.conf - Main OpenVZ configuration file.
/etc/vz/conf - Softlinked directory for each VPS configuration.
Network port - No network ports are opened by OpenVZ kernel.

No comments:

Post a Comment