Changes

Jump to: navigation, search

User Guide/Operations on Containers

69 bytes removed, 17:32, 16 January 2009
Setting Name for Container: fixed formatting
You can also set a name for Container 101 by editing its configuration file. In this case you should proceed as follows:
<ol><li> 1. Open the configuration file of Container 101 (<code>/etc/vz/conf/101.conf</code>) for editing and add the following string to the file: '''NAME="computer1"'''</li><li>2. In the <code>/etc/vz/names</code> directory on the Hardware Node, create a symbolic link with the name of <code>computer1</code> pointing to the Container configuration file. For example: # '''ln --symbolic /etc/vz/conf/101.conf /etc/vz/names/computer1</li></ol>'''
When specifying names for Containers, please keep in mind the following:
After the name has been successfully assigned to Container 101, you can start using it instead of ID 101 to perform Container-related operations on the Node. For example:
<ul><li>* You can stop Container 101 with the following command:
# '''vzctl stop computer1'''
Stopping container ...
Container was stopped
Container is unmounted
</li><li>* You can start Container 101 anew by issuing the following command:
# '''vzctl start computer1'''
Starting container ...
...
</li></ul>
You can find out what name is assigned to Container 101 in one of the following ways:
<ul><li>* Using the <code>vzlist</code> utility:
# '''vzlist -o name 101'''
NAME
computer1
</li><li>* Checking the <code>NAME</code> parameter in the Container configuration file (<code>/etc/vz/conf/101.conf</code>). For example:
# '''grep NAME= /etc/vz/conf/101.conf'''
NAME="computer1"
</li><li>* Checking which symlink in the <code>/etc/vz/names/</code> directory links to Container configuration file. The file name of the symlink is the name for Container. For example:
# '''ls -l /etc/vz/names/ | grep /101.conf'''
lrwxrwxrwx 1 root root 21 Jan 16 20:18 computer1 -> /etc/vz/conf/101.conf
</li></ul>
== Storing Extended Information on Container ==

Navigation menu