User`s guide
Operations on Virtual Machines and Containers 65
You can find out what name is assigned to Container 101 in one of the following ways:
Using the vzlist utility:
# vzlist -o name 101
NAME
computer1
Checking the NAME parameter in the Container configuration file
(/etc/vz/conf/101.conf). For example:
# grep NAME /etc/vz/conf/101.conf
NAME="computer1"
Checking the NAME parameter in the /etc/vz/names/computer1 file which is a
symlink to the Container configuration file. For example:
# grep NAME /etc/vz/names/computer1
NAME="computer1"
Moving Container Within the Parallels Server
The vzmlocal utility allows you to move Containers within your server. Moving a Container
within one and the same server consists in changing the Container ID and its private area and
root paths. You can use vzmlocal to change the ID of the corresponding Container only or to
additionally modify its private area and root path.
Let us assume that you wish to change the ID of your Container from 101 to 111 and modify its
private area and root paths from /vz/private/101 to /vz/private/my_dir and from
/vz/root/101 to /vz/root/ct111, respectively. To do this, execute the following
command on the server:
# vzmlocal 101:111:/vz/private/my_dir:/vz/root/ct111
Moving/copying Container#101 -> Container#111,
[/vz/private/my_dir], [/vz/root/ct111] ...
...
Successfully completed
To check if Container 101 has been successfully moved to Container 111, you can use the
following commands:
# vzlist -a
CTID NPROC STATUS IP_ADDR HOSTNAME
1 43 running 10.0.10.1 localhost
111 - stopped 10.0.10.101 myContainer
# ls /vz/private
1 my_dir
# ls /vz/root
1 ct111
As can be seen from the example above, the ID of Container 101 has been changed to 111, its
private area is now located in the /vz/private/my_dir directory on the server, and the
path to its root directory is /vz/root/ct111.
Notes:
1. You can perform a number of moving operations by a single invocation of the vzmlocal
utility.
2. You can run the vzmlocal utility on both running and stopped Containers.










