FILES
/etc/vz/vz.conf
/etc/vz/conf/veid.conf
/proc/vz/veinfo
/proc/vz/vzquota
/proc/user_beancounters
/proc/fairsched
Log file /var/log/vzctl.log
vzctl Commands
Usage: vzctl [options]
Help : vzctl --help
1. stop a VE (start/stop/restart) -
#vzctl stop VEID
2. to stop a VE in fast mode -
#vzctl stop VEID --fast
3. to see all the VE's -
#vzlist -a
4. to enter a VE -
#vzctl enter VEID
5. to see the uptime of a VE - run this from the node -
#vzctl exec VEID uptime
6. to see all the running process in a VE from the node -
#vzctl exec VEID ps aux
7. list the load of each VE -
#for vps in `vzlist -1`; do echo "$vps: `vzctl exec2 $vps uptime`"; done
8. when you think it is a RAM issue (Out Of Memory)-
#less /var/log/messages|grep OOM|grep VEID|wc -l
9. Reinstall a VE - all data will be lost and a fresh install will be there -
#vzctl reinstall VEID
10. number of running VE's in the node -
#vzlist|grep running|wc -l
11. To find the status of a VC:
#vzctl status VEID
12. You can execute commands inside a VC from the node itself
#vzctl exec VEID COMMAND
13. Check inodevalue
#df -i
14. Set inodevalue
#vzctl set VEID --diskinodes 2000000:2000000 --save
15. Check numiptent value
#egrep numiptent /proc/user_beancounters
numiptent 336 336 2147483647 2147483647 0
16. Set numiptent value
#vzctl set VEID --numiptent 2000000:2000000 --save
17. To permanently remove this VE:
#vzctl destroy VE_ID
Configuration Commands
1) vzctl set VEID –-hostname vps.domain.com -–save : To set the Hostname of a VPS.
2) vzctl set VEID –-ipadd 1.2.3.4 –-save : To add a new IP to the hosting VPS.
3) vzctl set VEID –-ipdel 1.2.3.4 –-save : To delete the IP from VPS.
4) vzctl set VEID –-userpasswd root:new_password -–save : To reset root password of a VPS.
5) vzctl set VEID -–nameserver 1.2.3.4 -–save : To add the nameserver IP’s to the VPS.
6) vzctl exec VEID command : To run any command on a VPS from Node.
7) vzyum VEID install package_name : To install any package/Software on a VPS from Node.
No comments:
Post a Comment