Resolution
There are may be several problems with migraing VEs between nodes.- Trying to migrate VE #101 to the hardware node with IP address 192.168.0.2 you see the following error mesage:
# vzmigrate 192.168.0.2 101
Connection to destination HN (192.168.45.36) is successfully established
Moving/copying VE#101 -> VE#101, [], [] ...
Can't move/copy VE#101 -> VE#101, [], [] : Destination HN has not got required packages [fedora-core-4 20051215], use '-f' option
This means that OS template fedora-core-4/20051215 is absent on the destination hardware node and it will be probably impossible to start VE on it due to the missing OS template. The same can be true for application templates.
Solution #1:
Upload and install all missing OS and application templates VE is using on the destination node. After that the VE should be migrated without problems.
Solution #2:
You may overcome this problem using '-f' option of 'vzmigrate' utility, it will ignore an absence of required package sets on destination node, however it is not recommended. To prevent VE against errors in filesystem due to absent template files, it will not be started on destination node after migration and must be started manually. - VE can not be migrated with the following error message:
# vzmigrate 192.168.0.2 101
Enter passphrase for key '/root/.ssh/id_dsa':
Can't init migrate : VE#101 already exists
The error message means that private area of VE #101 already exists on the destination node. It may be absolutely different VE #101 on the destination node or it may be the same VE #101 appeared on the destination node due to the previous attempt to migrate VE with '--keep-dst' parameter.
Solution #1:
If VE #101 on the destination node is not the same VE as on the source node then you may change ID of VE right during VE migrating:vzmigrate 192.168.0.2 101:201
This command will migrate VE #101 to the destination node nad create it as VE #201 on it. Of course, VE #201 should not exist on the destination node.
Solution #2:
If VE #101 on the destination node is the same VE as on the source one then you need to rename private area of VE on destination node to VE_ID.migratedcd /vz/private
mv 101 101.migrated
and run migration again. 'vzmigrate' utility will recognize that part of VE private area exists on the destination node and will correctly process such situation. - VE can not be migrated with the following error message:
# vzmigrate 192.168.0.2 101
Enter passphrase for key '/root/.ssh/id_dsa':
Can't init migrate : can't lock VE#201 :
This error message means that VE #101 is locked by some process on the source node, it may be another migration already being performed, VE may be being backed up, VE may be stopping/starting.
Solution: find process which locked VE using this commandcat /vz/lock/101.lck
analyze what it is doing and kill if necessary or wait until it is finished. - Other possible reasons of problem with migrating VEs between nodes:
- source node can not connect to the destination one due to the problems with routing between them and due to firewall rules - check if you may reach destination node using 'ping', 'ssh', 'traceroute' commands;
- destination node may be down - check if it is up and running;
- source node can not connect to the destination one by SSH due to the problems with SSH daemon on it - check if SSH daemon is up and running on the destination node and that it listen to the needed port (default port 22, it can be also overwritten in 'vzmigrate'command line);
- if you migrate VE using Virtuozzo Management Console (VZMC) or Virtuozzo Control Center then migration is being performed via VZAgent and reason of problem may be in absent connection between Service VEs on source and destination nodes - check if Service VEs on nodes are able to communicate between each other by SSH.
Keywords: can not migrate VE, vzmigrate, destination HN has not got required packages, already exists, can\'t lock VE