Previous page

Next page

Locate page in Contents

Print this page

Reinstalling Container

Reinstalling a Container is used if a Container administrator has inadvertently modified, replaced, or deleted any file that is part of an application or OS template, which has brought about the Container malfunction. You can reinstall the Container in the two following ways:

  1. The pctl recover command restores the original VZFS symlinks of the Container private area to the OS and/or application template(s) as they were at the time when the Container was created and/or when the application template(s) were added to the Container. This command does not deal with any user files on the Container:

    # pctl recover 101

    Optimizing Container private area...

    vzquota : (warning) Quota is running for id 101 already

    Setting quota ...

    Container is mounted

    Container is unmounted

    Recover OS template: redhat-el5-x86

    Creating Container private area (redhat-el5-x86)

    ...

    Recovering Container completed successfully

  2. The pctl reinstall command creates a new private area for the problem Container from scratch using its configuration files and its OS and application templates. Thus, a clean working copy of the Container is created:

    # pctl reinstall 101

    Optimizing Container private area...

    Calculating Container disk usage...

    Creating Container private area (redhat-el5-x86)

    Starting Container ...

    Initializing quota...

    Container is mounted

    Container start in progress...

    Calculating Container disk usage...

    Copying Container credentials...

    Stopping Container ...

    Container was stopped

    Container is unmounted

    Old Container file system has been moved to /old

    Initializing quota...

    Container reinstallation completed successfully

Note: If any of the Container application templates cannot be added to the Container in a normal way, the reinstallation process will fail. This may happen, for example, if an application template was added to the Container using the --force option of the vzpkgadd or vzpkg install command (for more information on these commands, see the Parallels Command Line Reference Guide ).

In order to retain the personal data inside the old Container, the utility also copies the contents of the old private area to the /old directory of the new private area (unless the --skipbackup option is given). The personal data can then be copied to the corresponding directories of the new private area and the /old directory eventually deleted:

# pctl start 101

Starting Container ...

Container is mounted

Setting devperms 20002 dev 0x7d00

Adding port redirection to Container(1): 4643 8443

Adding IP address(es) to pool:

Adding IP address(es): 10.14.14.101

Hostname for Container set: localhost.localdomain

Container start in progress...

# pctl exec 101 ls /

bin

boot

dev

[...other directories...]

old

[...other directories...]

tmp

usr

var

Both the pctl recover and pctl reinstall commands retain the users' credentials base, unless the --resetpwdb option is specified.