Changes

Jump to: navigation, search

User Guide/Operations on Containers

2,426 bytes added, 16:03, 19 January 2009
Storing Extended Information on Container: filled in
== Storing Extended Information on Container ==
 
{{Note|This feature is available since vzctl-3.0.23.}}
 
Sometimes, it may be difficult to remember the information on certain Containers. The probability of this increases together with the number of Containers and with the time elapsed since the Container creation. The OpenVZ software allows you to set the description of any Container on the Hardware Node and view it later on, if required. The description can be any text containing any Container-related information; for example, you can include the following in the Container description:
* the owner of the Container;
* the purpose of the Container;
* the summary description of the Container;
* etc.
 
Let us assume that you are asked to create a Container for a Mr. Johnson who is going to use it for hosting the MySQL server. So, you create Container 101 and, after that, execute the following command on the Hardware Node:
 
# '''vzctl set 101 --description "Container 101'''
> '''owner - Mr. Johnson'''
> '''purpose - hosting the MySQL server" --save'''
Saved parameters for CT 101
 
This command saves the following information related to the Container: its ID, owner, and the purpose of its creation. At any time, you can display this information by issuing the following command:
 
# '''vzlist -o description 101'''
DESCRIPTION
Container 101
owner - Mr. Johnson
purpose - hosting the MySQL server
 
You can also view the Container description by checking the <code>DESCRIPTION</code> parameter of the Container configuration file (<code>/etc/vz/conf/101.conf</code>). However, the data stored in this file are more suitable for parsing by the <code>vzlist</code> command rather than for viewing by a human since all symbols in the <code>DESCRIPTION</code> field except the alphanumerical ones ('a-z', 'A-Z', and '0-9'), underscores ('_'), and dots ('.') are transformed to the corresponding hex character code.
 
While working with Container descriptions, please keep in mind the following:
 
* You can use any symbols you like in the Container description (new lines, dashes, underscores, spaces, etc.).
* If the Container description contains one or more spaces or line breaks (as in the example above), it should be put in single or double quotes.
* As distinct from a Container name, a Container description cannot be used for performing Container-related operations (e.g. for starting or stopping a Container) and is meant for reference purposes only.
 
== Expand Migrating Container ==
== Moving Container Within Hardware Node ==

Navigation menu