- To view number of VPS licenses allowed:
vzlicview
- To list the OS templates in the host please do the following commands:
vzpkgls
- To see the cached templates ,do the following:
vzpkgls --cached
- To download and add new OStemplates:
vzup2date –t
- To list all VPSes on existing hardware node:
vzlist -a
- To create VPS with ID 101:
vzctl create 101 --ostemplate centos-5 -i --config vps.basic
- To destroy VPS whose VPS ID is 101:
vzctl destroy 101
- To start a VPS with ID 101:
vzctl start 101
- To stop a VPS with ID 101:
vzctl stop 101
- To restart a VPS with ID 101:
vzctl restart 101
- To check status of VPS with ID 101:
vzctl status 101
- To enter in to VPS with ID 101:
vzctl enter 101
- To execute command for e.g. 'w' command inside VPS whose ID is 101:
vzctl exec 101 w
- To reinstall service VPS:
vzsveinstall -f -w -s IP_ADDRESS_OF_SVPS
and then enter desired password for vzagent0.
- To enable/disabled offline management for all the VPSs on HW Node:
vzctl set 0 --offline_management yes --save
- To add IP address to VPS with VPS ID 101:
vzctl set 101 --save --ipadd xx.xx.xx.xx
- To delete IP address from VPS with VPS ID 101:
vzctl set 101 --save --ipdel xx.xx.xx.xx
- To set hostname for VPS:
vzctl set 101 --hostname hostname.com --save
- To set root password of VPS whose ID is 101:
vzctl set 101 --userpasswd root:qwerty
- To install any package for e.g plesk:
vzpkg install 101 plesk
- To update the vps do the following:
vzyum 101 update
- To install a package (eg: php) do the following:
vzyum 101 install php
- To install an rpm (eg: MySQL-shared-3.23.57-1.i386.rpm) from the host,do it as follows
vzrpm 101 -ivh MySQL-shared-3.23.57-1.i386.rpm
- To see a snapshot of the current processes:
vzps -aux
In addition to above I use 'vzstat' command followed by 'o' and 'c' keys to sort by CPU usage.
- To see information about the CPU power and utilization:
vzcpucheck -v
- To set vps disk quota (DISKSPACE ,DISKINODES ,QUOTATIME):
vzctl set 101 --diskspace 1000000:1100000 --diskinodes 90000:91000 --quotatime 600 --save
No comments:
Post a Comment