OpenVZ Tips & Commands

Once you have finished setting up openvz virtualization on your server, below are few commands to control and manage your containers.

Show all containers on the node

1
2
3
4
5
6
#vzlist
 
CTID NPROC STATUS IP_ADDR HOSTNAME
120 203 running 123.123.123.12 vps1.nodedomain.com
110 101 running 123.123.123.13 vps2.nodedomain.com
150 79 running 123.123.123.15 vps3.nodedomain.com

Start container 110

1
#vzctl start 110

Stop container 110

1
#vzctl stop 110

Restart container 110

1
#vzctl restart 110

Enter container 120

1
#vzctl enter 120

Show all IPs assigned to containers

1
2
3
4
5
#cat /proc/vz/veinfo
 
120 0 11  123.123.123.12
110 0 182 123.123.123.13 123.123.123.14
150 0 51  123.123.123.15

 

One thought on “OpenVZ Tips & Commands”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.