Archive for January, 2011

How to clone a Container in Parallels Containers for Linux

Issue a command in the following format:

vzmlocal -C {CT List}
{CT List} = [source_CTID]:[dst_CTID][:[[dstCT_private]][:[dstCT_root]]] [...]

You should specify the source Container ID ([source_CTID]) and the destination Container ID ([dst_CTID]).

Specifying the destination Container private area path ([dstCT_private]) and root path ([dstCT_root]) is optional allowing you to override the default paths - /vz/private/[dst_CTID] and /vz/root/[dst_CTID], respectively.

For example, to clone the Container with the Panel created during the previous procedure, run the following command:

# vzmlocal -C 444:445
SBDavid

How to start newly created container

How to start newly created container.

# Start the newly created Container:

# vzctl start [CTID]

# Install the Panel template into the container:

With EZ templates:

vzpkg install [CTID] [ppp_template_name]

For example, the following command installs the Panel base components, Customer and Business Manager and Kaspersky antivirus:

# vzpkg install 444 pp10 pp10-billing pp10-kav

Set a barrier and limits for the new Container

Set a barrier and limit for unswappable kernel memory, private (or potentially private) memory, number of files opened by all Container processes, disk space and the total number of disk inodes (files, directories, symbolic links) a Container can allocate

Save the barrier/limit values to the Container configuration file.

# vzctl set 444 –save –kmemsize 24299200:26429120 –privvmpages 362144:392912 –numfile
12000:12000 –diskspace 5117880:5242880 –diskinodes 350000:370000

Enable working Power Panel on the vzpp port with the “–offline_management yes –offline_service vzpp” options.

# vzctl set 444 –save –offline_management yes –offline_service vzpp
SBDavid

vzctl command examples

vzctl command examples

Create a Container with ID 444 and IP 10.100.1.2, based on the Debian 5 OS template.

# vzctl create 444 –ostemplate debian-5.0-x86_64

To set the IP address and hostname.

# vzctl set 444 –ipadd 10.100.1.2 –hostname example.com –save

Start the newly created Container:

# vzctl start [CTID]

How to create a new Container and install the Panel in it:

Create a container and configure it.

Issue the following commands:

vzctl create [CTID] [options]

where
* defines an arbitrary container ID number higher than 100, which is unique on the hardware node
* –save switch tells vzctl whether to save changes into the Container configuration file.

vzctl set [CTID] [setting_name] [value] [--save]

Next »