vzmigrate failed to copy config file

x3w

Member
Nov 20, 2011
16
0
21
Hi,

First of all, thanks for the great 2.0 job, I'm so impatient to use it in production.

To test it, I've set up a two node-cluster as described on http://pve.proxmox.com/wiki/Proxmox_VE_2.0_Cluster .
Everything seems to work great.

But I found an issue when I tried to migrate VE 101 from node1 (192.168.1.1) to node2 (192.168.1.2) using the GUI.
The error was :
Code:
Starting migration of CT 101 to 192.168.1.2
Preparing remote node
Error: Failed to copy config file
TASK ERROR: command '/usr/sbin/vzmigrate 192.168.1.2 101' failed: exit code 6

Checking with the CLI on node 1, it seems that the reason was that the VE conf file already exists :
Code:
root@node1:~# /usr/sbin/vzmigrate -vv 192.168.1.2 101
Starting migration of CT 101 to 192.168.1.2
OpenVZ is running...
   Loading /etc/vz/vz.conf and /etc/pve/openvz/101.conf files
   Check IPs on destination node: 192.168.1.2
Preparing remote node
   Copying config file
scp: /etc/pve/openvz/101.conf: File exists
Error: Failed to copy config file

But when I checked on target node, the file was not here (as expected) :

Code:
root@node2# ls -l /etc/pve/nodes/node2/openvz
total 0

The strange thing is that the node behave as if the file was here :
Code:
root@node2# touch /etc/pve/nodes/node2/openvz/101.conf
touch: cannot touch `101.conf': File exists

If I try to create a different file (let's say test.txt), it succeeds.
Doing an aptitude update + dist-upgrade didn't solve this issue either.

Is there a sync problem with the clustered filesystem ? Or Am I missing something ?

Thanks for your help,
 
FWIW, simply replacing scp with mv (and adjusting parameters as well as source and destination filename) seems to work OK. However, I would prefer an official solution (that would take care of failed file moves etc).

Cheers
 
Last edited:
I'm having this issue with vzmigrate commandline under Proxmox VE 2.1 latest updates. I like to migrate boxes from commandline so is this going to be fixed? This appears to be an issue with the clustered filesystem /etc/pve.

As badaboom had mentioned the mv command appears to work under the /etc/pve filesystem, but cp or scp for clustered machines fails because it thinks the file exists already.
 
What issue do you have exactly? Above problem is already fixed.

Exactly same issue. Brand new install from promox ve 2.x cd did apt-get grade and can't run vzmigrate

root@proxmox16:~# vzmigrate proxmox4 2012
Starting migration of CT 2012 to proxmox4
Preparing remote node
Error: Failed to copy config file

I modified copy of the vzmigrate script and replaced scp to a mv and it works. So cp and scp both fail on /etc/pve filesystem.

root@proxmox16:~# pveversion -v
pve-manager: 2.1-13 (pve-manager/2.1/bdd3663d)
running kernel: 2.6.32-14-pve
pve-kernel-2.6.32-11-pve: 2.6.32-66
pve-kernel-2.6.32-12-pve: 2.6.32-68
pve-kernel-2.6.32-14-pve: 2.6.32-73
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.3-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.92-2
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.8-1
pve-cluster: 1.0-27
qemu-server: 2.0-47
pve-firmware: 1.0-18
libpve-common-perl: 1.0-30
libpve-access-control: 1.0-24
libpve-storage-perl: 2.0-29
vncterm: 1.0-2
vzctl: 3.0.30-2pve5
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
 
Exactly same issue. Brand new install from promox ve 2.x cd did apt-get grade and can't run vzmigrate

You should nou use vzmigrate at all. Use 'pvectl migrate' instead.

# pvectl migrate 2012 proxmox4

see also:
# pvectl help migrate -v
 
Last edited:
Thanks, I didn't know that. I have been using vzmigrate for years now and assumed it was the same under 2.x. I'll use pvectl instead.

That worked kinda... The destination box hung. I've noticed that since upgrading to 2.1, online migration hangs destination host quite a bit.
 

I've got the same issue when I try to migrate online between a different CPUs (Intel Xeon to i3 to AMD). I can migrate online just fine between nodes that have the same hardware config (same CPU).

Running Kernel: 2.6.32-13-pve

In the terminal I get

Code:
Message from syslogd@vh45 at Aug 11 12:49:09 ...
 kernel:Oops: 0000 [#1] SMP 

Message from syslogd@vh45 at Aug 11 12:49:09 ...
 kernel:last sysfs file: /sys/devices/system/cpu/cpu5/cache/index2/shared_cpu_map

Message from syslogd@vh45 at Aug 11 12:49:09 ...
 kernel:Stack:

Message from syslogd@vh45 at Aug 11 12:49:09 ...
 kernel:Call Trace:

Message from syslogd@vh45 at Aug 11 12:49:09 ...
 kernel:Code: 03 00 00 65 48 8b 04 25 c8 cb 00 00 48 8b 80 38 e0 ff ff a8 08 0f 85 51 fb ff ff 48 81 c4 88 00 00 00 5b 41 5c 41 5d 41 5e 41 5f <c9> c3 66 2e 0f 1f 84 00 00 00 00 00 48 29 d0 48 63 c9 48 89 c2 

Message from syslogd@vh45 at Aug 11 12:49:09 ...
 kernel:CR2: 0000000000000000

Message from syslogd@vh45 at Aug 11 12:49:09 ...
 kernel:Kernel panic - not syncing: Fatal exception

And the console spews out this: http://cl.ly/image/0U1D280J2K41
 
I've got the same issue when I try to migrate online between a different CPUs (Intel Xeon to i3 to AMD). I can migrate online just fine between nodes that have the same hardware config (same CPU).

I figured it might be something about hardware and kernels.

I just remembered that the recent hang was a migrate from a 2.6.32-14-pve host and a 2.6.32-12-pve host, where the 2.6.32-12-pve host hung. I'm just testing some new hardware so once I'm happy I'll purchase more so all nodes are exactly the same. Hopefully that solves the online migration issue, but until then it'll be offline migrations.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!