Article ID: 118232, created on Oct 27, 2013, last review on May 9, 2014

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

Symptoms

An attempt to migrate a container may fail with the error output as follows:

[root@source.node ~]# vzmigrate target.node 100500
root@target.node's password:
Connection to destination node (target.node) is successfully established
Moving/copying CT#100500 -> CT#100500, [], [] ...
Checking external bind mounts
Check cluster ID
Checking keep dir for private area copy
Checking technologies
Checking disk usage space
Checking templates for CT
copy ez template area directories from /vz/template/centos/6/x86_64
Ignore /bin/vztar exit code 0, continue
Checking IP addresses on destination node
syncing UUID: /vz/template/vc//297121d9-224e-49a4-a155-715d11a49782
UUID-collision, directory /vz/template/vc//297121d9-224e-49a4-a155-715d11a49782 exists
Can't move/copy CT#100500 -> CT#100500, [], [] : UUID-collision, directory /vz/template/vc//297121d9-224e-49a4-a155-715d11a49782 exists

Cause

As the error states - the issue is caused by the collision of UUID:

Can't move/copy CT#100500 -> CT#100500, [], [] : UUID-collision, directory /vz/template/vc//297121d9-224e-49a4-a155-715d11a49782 exists

That means that both servers - the source server and the destination server - have the following folder: /vz/template/vc//297121d9-224e-49a4-a155-715d11a49782.

The directory /vz/template/vc/ keeps caches for containers, each folder is named after the container's UUID. UUID should be unique, that means that either the destination server has the very same copy of the container, or this folder is obsolete and it should not exist over there.

Resolution

For the migration to succeed, it is necessary to get rid of the duplicate folder on the destination server. There are 2 scenarios - either the destination server has the very same copy of the container (probably outdated), or this folder is obsolete and should not exist over there.

In order to understand which case is that, we need to understand if there is any container with the same UUID that uses this cache. Execute following command on the destination server to find it out:

[root@target.node ~]# grep 297121d9-224e-49a4-a155-715d11a49782 /etc/vz/conf/*.conf
/etc/vz/conf/100500.conf:UUID=297121d9-224e-49a4-a155-715d11a49782
[root@target.node ~]#    

In the output above we can see that UUID belongs to the already existing container #100500. If the output from this grep command is empty - it means this cache does not belong to any container - it is obsolete and no longer required.

Cache belongs to some container

If cache belongs to some container, and this container is not required anymore - simply destroy it. It will cleanup the cache folder that caused the collision.

If cache belongs to some container that should not be destroyed - schedule the maintenance window to perform the following operation that will change UUID for the container:

# vzctl stop 100500
# vzmlocal -C 100500:666666
# vzctl destroy 100500
# vzmlocal 666666:100500
# vzctl start 100500

Cache does not belong to any container

If cache does not belong to any container (output from the grep command above is empty) - simply remove the folder on the destination server:

[root@target.node ~]# rm -rf /vz/template/vc//297121d9-224e-49a4-a155-715d11a49782

Search Words

vzcache

vzmlocal

exits

UUID-collision

uuid

vzmigrate

/vz/template/vc/

d02f9caf3e11b191a38179103495106f 2897d76d56d2010f4e3a28f864d69223 a26b38f94253cdfbf1028d72cf3a498b e8e50b42231236b82df27684e7ec0beb

Email subscription for changes to this article
Save as PDF