Moving/copying a Container within one and the same Hardware Node consists in changing/adding the Container ID, private area, and root paths. Thus, you may use the vzmlocal utility either to change the ID and/or the private area path and/or the root path of any existing Container(s) or to clone a Container, i.e. to create a complete copy of an existing Container with different ID and path. It has the following syntax:
vzmlocal <CT List>
<CT List> = <source_CTID>:<dest_CTID>[:<dest_private>] [...]
vzmlocal -C <CT List>
<CT List> = <source_CTID>:<dest_CTID>[:<dest_private>] [...]
vzmlocal --help
The options are the following:
|
Clones the source Container instead of moving it. |
|
Allows you to speed up the process of cloning the Container. |
|
Destroys the source Container after its cloning. |
|
Disables offline management for the source Container after its cloning. |
|
Allows you to clone locked Containers. |
|
Disables logging to screen and to the log file. |
|
Sets log level to maximum possible value for this |
|
Displays the utility usage and exits. |
You should specify the source Container ID (<source_CTID>) andthe destination Container ID (<dest_CTID>). Specifying the destination Container private area path (<dest_private>) is optional; it allows you to override the default path of X:\vz\private\<CT_ID>. For example, you can issue the following command to move Container 101 to Container 201, i.e. to change the Container ID from 101 to 201, and to locate the Container private area in the C:\MyCT folder on the Hardware Node:
C:\...\Administrator>vzlist -a
CTID NPROC STATUS IP_ADDR HOSTNAME
1 22 running 192.168.45.63 CT1
101 - stopped 10.198.198.101 CT101
C:\...\Administrator>vzmlocal 101:201:C:\MyCT
Command 'vzmlocal' is successfully finished
Note: In the current version of Virtuozzo Containers, you can change IDs of stopped Containers only.