Article ID: 123699, created on Nov 27, 2014, last review on Dec 10, 2014

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers
  • Virtuozzo hypervisor

Symptoms

I have migrated a container, but it does not work correctly on the new node. How to bring it back on the source server again? The migration was performed with --remove no option:

vzmigrate -r no target.server 101

Resolution

With the option --remove no (or with the default configuration to keep a copy of a migrated container on the source node), the container's private area is renamed with appending .migrated to the name, the same is done with the container's configuration file.

It is possible to revert the changes and bring the container back on the source node.

The set of instructions depend on the product version and OS type:

Parallels Containers for Windows

  1. Rename the container`s private area:

    C:\>ren %VZROOT%\private\%CTID%.migrated %CTID%
    

    (Replace "%VZROOT%" with the actual path to the Virtuozzo data directory, typically this is C:\VZ or D:\vz; replace "%CTID%" with the container's ID value.)

  2. Rename the container`s configuration file:

    C:\>ren %VZROOT%\Conf\%CTID%.conf_migrated %CTID%.conf
    

    After that the container becomes visible for vzlist -a command and in PVA management panel.

    Note: Before starting the container on the source node if this container has Offline Management enabled, remove the IP address(es) from the container's migrated copy on the target node or destroy the migrated container to avoid IP address conflict. To remove all IP addresses at once:

    C:\>vzctl set %CTID% --save --ipdel all
    

PCS, PSBM, PVC for Linux

  1. Rename the container's private area:

    ~# mv /vz/private/$CTID{.migrated,}
    

    (Replace "$CTID" with the actual container's ID value; if the container's private area is located in some other directory, not in /vz/private then specify the proper path.)

  2. Register the container:

    ~# vzctl register /vz/private/$CTID $CTID
    

    Note: Before starting the container on the source node if this container has Offline Management enabled, remove the IP address(es) from the container's migrated copy on the target node or destroy the migrated container to avoid IP address conflict. To remove all IP addresses at once:

    ~# vzctl set $CTID --save --ipdel all
    

PVC for Linux, old VZFS layout

If the container was created on the node with Virtuozzo 3.0, and has old layout (/vz/private/$CTID does not contain fs subdirectory), rename the configuration file as well.

  1. Rename the directory with the private area:

    ~# mv /vz/private/$CTID{.migrated,}
    

    (Replace "$CTID" with the actual container's ID value; if the container's private area is located in some other directory, not in /vz/private then specify the proper path.)

  2. Rename the configuration file of the container:

    ~# mv /etc/sysconfig/vz-scripts/$CTID.conf{.migrated,}
    

    Note: Before starting the container on the source node if this container has Offline Management enabled, remove the IP address(es) from the container's migrated copy on the target node or destroy the migrated container to avoid IP address conflict. To remove all IP addresses at once:

    ~# vzctl set $CTID --save --ipdel all
    

Search Words

Container stuck in starting status

vps won't start links broken

2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f a26b38f94253cdfbf1028d72cf3a498b 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF