Changes

Jump to: navigation, search

Basic operations in OpenVZ environment

42 bytes added, 09:07, 9 April 2008
VE, VPS -> container
To create and start a [[container]], run the following commands:
<pre>
[host-node]# vzctl create VEID CTID --ostemplate osname[host-node]# vzctl set VEID CTID --ipadd a.b.c.d --save[host-node]# vzctl set VEID CTID --nameserver a.b.c.d --save[host-node]# vzctl start VEIDCTID
</pre>
Here <tt>VEIDCTID</tt> is the numeric ID for the [[container]]; <tt>osname</tt> is the name of the OS template for the [[container]], and <tt>a.b.c.d</tt> is the IP address to be assigned to the [[container]].
Example:
<pre>
[host-node]# vzctl exec VEID CTID ps ax
</pre>
To enter [[container]] give the following command:
<pre>
[host-node]# vzctl enter VEIDCTIDentered into VPS VEIDcontainer CTID
[ve]#
</pre>
<pre>
[ve]# exit
exited from VPS container VEID
[host-node]#
<pre>
[host-node]# vzctl stop VEIDCTIDStopping VPS container ...VPS Container was stoppedVPS Container is unmounted
</pre>
And to destroy [[container]]:
<pre>
[host-node]# vzctl destroy VEIDCTIDDestroying VPS container private area: /vz/private/VEIDCTIDVPS Container private area was destroyed
</pre>

Navigation menu