vzpkg

NAME
SYNOPSYS
DESCRIPTION
OPTIONS
DIAGNOSTICS
ENVIRONMENT VARIABLES
EXAMPLES
FILES
SEE ALSO
COPYRIGHT

NAME

vzpkg − tool for managing OpenVZ templates.

SYNOPSYS

vzpkg install [options] CT ID | CT NAME object [object ...]

vzpkg update [options] CT ID | CT NAME [object ...]

vzpkg remove [options] CT ID | CT NAME object [object ...]

vzpkg localinstall [options] CT ID | CT NAME rpmfile [rpmfile ...]

vzpkg localupdate [options] CT ID | CT NAME rpmfile [rpmfile ...]

vzpkg list [options] CT ID | CT NAME [CT ID | CT NAME ...] [--available]

vzpkg list [options] [ostemplate ...] [--available]

vzpkg create cache [options] [ostemplate ...]

vzpkg update cache [options] [ostemplate ...]

vzpkg remove cache [options] [ostemplate ...]

vzpkg create appcache [options]

vzpkg update appcache [options]

vzpkg remove appcache [options]

vzpkg list appcache

vzpkg info [options] [-F ostemplate | CT ID | CT NAME] object | CT ID | CT NAME [parameter ...]

vzpkg install template [options] [-F ostemplate] object ...

vzpkg update template [options] [-F ostemplate] object ...

vzpkg remove template [options] [-F ostemplate] object ...

vzpkg upgrade [options] CT ID | CT NAME

vzpkg fetch [options] ostemplate [ostemplate ...]

vzpkg update metadata [options] [ostemplate ...]

vzpkg link [options] CT ID | CT NAME

vzpkg clean [options] [ostemplate ...]

vzpkg status [options] ostemplate | CT ID | CT NAME

vzpkg upgrade area [options] ostemplate ...

vzpkg help

DESCRIPTION

OpenVZ management tool for handling EZ templates and standalone RPM/DPKG packages and RPM packages groups.

Commands
install

Install an object (application template or RPM package) into the Container CT ID|CT NAME. Multiple objects can be specified at once. If an application template is not installed on the Node, it will be downloaded from the vzup2date repository.

update

Update an object in the Container CT ID|CT NAME if a newer version is available. If an application template is not installed on the Node, it will be downloaded from the vzup2date repository. If no object is specified, update all installed packages. If the −t|−−template option is specified, update all installed templates.

remove

Remove an object from the Container CT ID|CT NAME.

localinstall

Install a local RPM file into the Container CT ID|CT NAME.

localupdate

Update the Container CT ID|CT NAME from the specified local RPM file.

list

List the objects installed on the Node in the following format:

OS template [application template] [last update date and time]
If CT ID|CT NAME is specified, list the objects installed in the Container. If ostemplate is specified, list the objects available for this OS template. Otherwise, list the objects available for all OS templates. If --available is specified list templates available for installation.

create cache

Create a cache of the OS template ostemplate. The command returns an error if the cache already exists. If the specified OS template is not installed on the Node, it will be downloaded from the vzup2date repository. You can specify several OS templates at once. If no OS templates are specified, all uncached OS templates on the Node will be cached.

update cache

Update the cache of the OS template ostemplate if newer packages are available or create a cache if it does not exist. If the specified OS template is not installed on the Node, it will be downloaded from the vzup2date repository. You can specify multiple OS templates at once. If no OS templates are specified, all available OS templates will be updated/cached.

remove cache

Remove the cache of the OS template ostemplate. You can specify multiple OS templates at once. If no OS templates are specified, all OS template caches will be removed from the Node.

create appcache

Create the cache for OS template with application templates. Returns error if cache already exists. If the specified OS template is not installed on the Node, it will be downloaded from the vzup2date repository.

update appcache

Update the cache for OS template with application templates. If the specified OS template is not installed on the Node, it will be downloaded from the vzup2date repository.

remove appcache

Remove the cache for OS template with application templates.

list appcache

List all caches for OS templates with application templates.

info

Show the information about the specified OS template, application template, package, or Container CT ID|CT NAME. To get the information about an application template or a package, specify the corresponding Container ID or OS template (using the −F|−−for-os option).

install template

Install an application and/or OS template from the specified RPM package or from the vzup2date repository. To install from the repository, specify the template name instead of the name of the respective RPM package. To install an application template from the vzup2date repository, indicate the corresponding OS template using the −F|−−for-os option. You can specify multiple objects (RPM packages or application templates) at once.

update template

Update an application and/or OS template from the specified RPM package or from the vzup2date repository. To update from the repository, specify the template name instead of the name of the respective RPM package. To update an application template from the vzup2date repository, indicate the corresponding OS template using the −F|−−for-os option. You can specify multiple objects (RPM packages or application templates) at once.

remove template

Remove an application or OS template from the specified Container. To remove an application template, specify the corresponding OS template using the −F|−−for-os option.

upgrade

Upgrade the Container CT ID|CT NAME to use another OS template. Upgrade is possible only within the same distribution and architecture. For example, you can upgrade the Container to use fedora-core-5-x86 instead of fedora-core-4-x86. All installed application templates are upgraded automatically.

fetch

Download and prepare packages of the specified OS and related application templates for installation on the Node.

update metadata

Update the metadata of the specified OS template. You should run this command with the −r|−−remote option once you change the template’s repositories/mirrorlist file.

link

Link the files installed inside a Container to the package set in the corresponding EZ OS template area. vzpkg searches the Container private area for the files similar to the ones from the template area. Once it finds one or more files, it replaces them with symlinks to the template area.

clean

Clean repository metadata for the specified OS and related application templates.

status

Report whether the Container is up to date or not. If any updates are available, the command exits with code 2; otherwise, it exits with code 0.

help

Display the usage information and exit.

OPTIONS

−p, −−packages

Interpret objects as package names instead of template names by default.

−g, −−groups

Interpret objects as yum group names (instead of template names by default). This option is available only for RPM-based templates and Containers. You can use this option with install, update, remove, list, and info commands.

−d, −−debug <num>

Set the debug level to <num> [0-5].

−C, −−cache

Look for the packages in the local cache, do not try to get new packages over the network. If some packages are not available locally, vzpkg will fail.

−r, −−remote

Force to look for the updated metadata in remote repositories.

−n, −−check-only

Perform a test run.

−w, −−with-depends

Remove the specified package and all dependent packages.

−O, −−os

Execute the command for OS templates only.

−F, −−for-os ostemplate|CT ID|CT NAME

Apply actions to the specified OS template only. When running the info command, you can also indicate a Container ID.

−A, −−app

Execute the command for application templates only.

−c, −−cached

Show cached OS templates only.

−−config <config>

Use the specified sample configuration file for caching OS EZ templates with preinstalled applications.

−−ostemplate <ostemplate>

Use the specified OS EZ template instead of that provided in the sample configuration file.

−−apptemplate <apptemplate,apptemplate...>

Use the specified application EZ templates instead of those provided in the sample configuration file.

−i, −−pkgid

Print a system-wide unique template ID instead of a template name.

−S, −−with-summary

Show the list of objects with summary.

−f, −−force

Force the operation on the specified template or package.

−e, −−expanded

Use the ’upgrade’ mode of the update command: upgrade for yum and dist-upgrade for apt-get. It may be useful when upgrading to a new major application version.

−s, −−slow

Check all installed packages including those that are already virtualized (for the link command only).

−I, −−interactive

Use the interactive mode of Debian package management.

−q, −−quiet

Quiet mode.

−s, −−force-shared

Force the operation for the template area on shared partitions.

−k, −−clean-packages

Clean the local packages cache (for the clean command only).

−t, −−template, −−clean-template (deprecated)

Remove unused packages from the template area (for the clean command only). Update all templates installed in the Container (for the update command only).

−a, −−clean-all

Clean the local packages cache and template area (for the clean command only).

−u, −−custom-pkg

Report the list of packages that are installed in the Container but are not available in the template repositories (for the list command only).

−P, −−separate

Execute the transaction separately for each template.

−−update-cache

Update packages in the existing OS template cache instead of recreating the cache.

−−vefstype <VEFSTYPE>

Redefine the VEFSTYPE parameter in the vz global configuration file.

DIAGNOSTICS

vzpkg returns 0 upon successful execution. If something goes wrong, it returns an appropriate error code.

System errors

1

System error

2

Internal error

3

Command execution error

4

Memory allocation error

5

vzctl binary was not found

6

File already exists

7

OpenVZ license is not loaded, or an invalid class ID is set.

8

Running command exits with non-null code

9

File or directory was not found

10

Program runs from a non-root user

11

Cannot calculate md5sum

12

Object exists, but it is not a directory

13

Broken magic symlink was found

14

Cannot parse string

52

Cannot fetch file

54

Cannot get OpenVZ service status

55

OpenVZ service is not running

56

Invalid URL

61

Cannot get list of existing Containers

62

vzctl library error

63

External program failed

64

External program was terminated by signal

67

Template metadata was not found. If you use the -C/--cache option with the status command, run the command without this option.

21

Cannot lock Container or OS template

69

Cannot unlock Container or OS template

70

Package manager failed

72

ploop library error

Container errors

15

Container is not running

16

Container does not exist

17

Container is suspended

18

Container is not mounted

66

Container is not suspended

19

Container has invalid status

20

Cannot lock free temporary Container for caching

22

Container or OS template cache is not up to date

Template errors

23

Template is not cached

24

Template was not found

25

Broken/invalid template

26

This template is not installed in the Container

27

This template is already installed in the Container

28

This template is not available on the Node

29

Template cache already exists

30

Configuration file for the template cache was not found

31

init executable for creating cache was not found

32

Base OS template has extra O templates

65

Base OS template has application templates

33

This RPM is not EZ template

34

This RPM is not standard template

57

Unknown OS template architecture

58

Unsupported OS template architecture

68

Template area resides on shared partition

Argument errors

35

Bad argument

36

LOCKDIR variable is not defined in global configuration file

37

TEMPLATE variable is not defined in global configuration file

38

VE_ROOT variable is not defined in global and Container configuration files

39

VE_PRIVATE variable is not defined in global and Container configuration files

40

OSTEMPLATE variable is not defined in Container configuration file

41

Cannot change the value of $VEID variable to the value in VE_ROOT or VE_PRIVATE

42

Cannot get VEFORMAT from Container private area VERSION link

43

This VEFORMAT is not supported by kernel

44

Unknown VEFORMAT in VERSION link in Container private area

45

Unknown package management name

46

Bad Container name

47

Unknown technologies

48

Unsupported technologies

49

Cannot find environment directory

50

Broken environment directory

51

Cannot find temporary directory

59

Cannot get Container layout version

60

Unknown Container layout

ENVIRONMENT VARIABLES

vzpkg uses http_proxy, ftp_proxy, or https_proxy environment variable.

EXAMPLES

To install the OS template fedora-core-12-x86 from the vzup2date repository:
vzpkg install template fedora-core-12-x86

To create a cache of the OS template fedora-core-12-x86_64:
vzpkg create cache fedora-core-12-x86_64

To create a Container on the basis of the fedora-core-12-x86 OS template and start this Container:
vzctl create 1000 --ostemplate fedora-core-12-x86
vzctl start 1000

To install mysql and php application EZ templates into Container 1000:
vzpkg install 1000 mysql php

To update the OS template and all related application EZ templates in Container 1000 from the local yum cache:
vzpkg update -C 1000

To install emacs packages into Container 1000:
vzpkg install -p 1000 emacs

To show yum groups for centos-5-x86 OS template:
vzpkg list -g centos-5-x86

To install Administration Tools yum group into Container 1000:
vzpkg install -g 1000 "Administration Tools"

To get the list of packages for the fedora-core-12-x86 OS and mysql application EZ templates:
vzpkg info fedora-core-12-x86 packages
vzpkg info -F fedora-core-12-x86 mysql packages

To get the status of Container 1000:
vzpkg status -q 1000

To upgrade Container 1000 based on fedora-core-11-x86 to use fedora-core-12-x86:
vzpkg upgrade 1000

To download and prepare all packages for the fedora-core-12-x86 OS template and related application templates:
vzpkg fetch fedora-core-12-x86

To remove the OS template fedora-core-12-x86 from the Node:
vzpkg remove template fedora-core-12-x86

FILES

/etc/vz/vz.conf,
/etc/vztt/vztt.conf,
/etc/vztt/url.map,
/var/log/vztt.log.

SEE ALSO

vzctl(8), vzup2date(8), vzup2date.conf(5), vzmktmpl(8).

COPYRIGHT

Copyright (c) 2001-2015 Parallels IP Holdings GmbH. All rights reserved.