OpenVZ- Create VPS through Terminal

Create and start a container

To create and start a container, run the following commands:

[host-node]# vzctl create CTID --ostemplate osname
[host-node]# vzctl set CTID --ipadd a.b.c.d --save
[host-node]# vzctl set CTID --nameserver a.b.c.d --save
[host-node]# vzctl start CTID

Adding IP address to a container

vzctl set 101 --ipadd 10.0.0.1  --save
vzctl set 101 --ipadd fd00::101 --save

Removing IP address from a container

vzctl set 101 --ipdel 10.0.0.1
vzctl set 101 --ipdel fd00::101


 

Advertisements

One thought on “OpenVZ- Create VPS through Terminal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s