Article ID: 121905, created on Jun 4, 2014, last review on Jun 4, 2014

  • Applies to:
  • Virtuozzo containers for Linux 4.7
  • Virtuozzo hypervisor

Symptoms

A container cannot be restored into a different CTID, restoration fails with the following error message:

~# vzarestore 2201105:100
Restore container: myct.test from cb9d8f80-a0e1-7849-8ece-caa4a475b218/20140522050022...
* Operation with the Container myct.test is started
* Restoring backup cb9d8f80-a0e1-7849-8ece-caa4a475b218/20140522050022 from hwnode1
* Backup storage: preparing to restore operation
* Backup storage: getting private backup data
* Initializing restore operation
* Allocated new veid 4242677
* Backup storage: sending backup file
* Restoring private area
100% |**************************************************************|
* Finalizing restore
* Operation with the Container myct.test is finished with errors: Failed to register VE.
Restore failed: Failed to register VE
Restore operation failed.

The same issue appears on attempt to register a copy of a container:

~# vzctl create CTID
~# cp -a /vz/private/CTID /vz/private/CTID2
~# vzctl register /vz/private/CTID2 CTID2

Cause

During registration operation, the container's configuration file is read by vzctl and the container's ID value specified in the command line is overridden by the value from the configuration file.

The problem is recognized as a product issue #PCLIN-32431 (for PVCfL) and #PSBM-26933 (for PSBM5).

Resolution

The permanent fix will be included in one of the future product updates.

To complete the restoration follow these steps:

  1. Launch the restoration and wait for it to fail:

    # vzarestore 2201105:500
    Restore container: myct.test from cb9d8f80-a0e1-7849-8ece-caa4a475b218/20140522050022...
    * Operation with the Container myct.test is started
    * Restoring backup cb9d8f80-a0e1-7849-8ece-caa4a475b218/20140522050022 from hwnode1
    * Backup storage: preparing to restore operation
    * Backup storage: getting private backup data
    * Initializing restore operation
    * Allocated new veid 9892657
    * Backup storage: sending backup file
    * Restoring private area
     100% |**************************************************************|
    * Finalizing restore
    * Operation with the Container myct.test is finished with errors: Failed to register VE.
    Restore failed: Failed to register VE
    Restore operation failed.
    

    Please note this line:

    * Allocated new veid 9892657
    
  2. After the restoration failure, the private area with the new ID is left in /vz/private:

    ~# ll /vz/private/9892657
    total 20
    drwxr-xr-x 2 root root 4096 May 21 16:12 dump
    drwx------ 5 root root 4096 Apr 22 18:58 fs
    -rw------- 1 root root  168 May 22 13:00 quota.fs
    drwxr-xr-x 2 root root 4096 May 21 16:12 scripts
    lrwxrwxrwx 1 root root   12 May 21 16:12 templates -> fs/templates
    -rw------- 1 root root  748 May 22 19:42 ve.conf
    
  3. Modify the container's ve.conf and correct the VEID value to 9892657:

    ~# grep VEID /vz/private/9892657/ve.conf
    VEID="2201105"
    ~# sed -i '/^VEID=/ s/=.*/=9892657/' /vz/private/9892657/ve.conf
    
  4. Now the container can be registered:

    ~# vzctl register /vz/private/9892657 9892657
    Container was successfully registered
    
  5. Unset its IP, change the name and the hostname:

    ~# vzctl set 9892657 --save --ipdel all --hostname restored.myct --name restored.myct
    Inconsistent Container configuration is detected; restoring links...
    Saved parameters for Container 9892657
    
  6. Change the container ID to the needed one:

    ~`# vzmlocal 9892657:100
    

Search Words

backup cannot be restored to a new ctid

Failed to register VE.

Restore operation failed.

Restore failed: Failed to register VE

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 e8e50b42231236b82df27684e7ec0beb d02f9caf3e11b191a38179103495106f 0c05f0c76fec3dd785e9feafce1099a9

Email subscription for changes to this article
Save as PDF