Ojo al crear máquinas virtuales con OpenVZ y asignar un 'ctid' menor que 100, pues están reservados para el sistema.He creado dos máquinas en "enjuto" , el servidor que tengo "rulando" en casa con OpenVZ y al realizar un backup con vzdump de una de las máquinas devolvía en siguiente error:
root@enjuto:/backups# vzdump --suspend --dumpdir /backups --snapshot 2
ERROR: got reserved VM ID '2'
Supongo que en la actualidad OpenVZ tendrá un modo más rápido(en realidad lo es) que teclear 5 líneas para cambiar ctid's, pero lo que he leído en este foro ha funcionado al 100% .
enjuto# vzctl chkpnt 1 --dumpfile /tmp/Dump.1
enjuto# mv /etc/vz/conf/1.conf /etc/vz/conf/100.conf
enjuto# mv /vz/private/1 /vz/private/100
enjuto# mv /vz/root/1 /vz/root/100
enjuto# vzctl restore 100 --dumpfile /tmp/Dump.1
Ahora sí funciona el comando vzdump sin problemas:
root@enjuto:/backups# vzdump --dumpdir /backups --snapshot 100
unable to find command 'lvcreate'
root@enjuto:/backups# vzdump 100
INFO: starting new backup job: vzdump 100
INFO: Starting Backup of VM 100 (openvz)
INFO: CTID 100 exist mounted running
INFO: status = CTID 100 exist mounted running
INFO: mode failure - unable to detect lvm volume group
INFO: trying 'suspend' mode instead
INFO: backup mode: suspend
INFO: bandwidth limit: 10240 KB/s
INFO: starting first sync /var/lib/vz/private/100/ to /var/lib/vz/dump/vzdump-openvz-100-2012_04_09-11_38_50.tmp
INFO: Number of files: 24892
INFO: Number of files transferred: 19140
INFO: Total file size: 456167369 bytes
INFO: Total transferred file size: 455391436 bytes
INFO: Literal data: 455391436 bytes
INFO: Matched data: 0 bytes
INFO: File list size: 573708
INFO: File list generation time: 0.001 seconds
INFO: File list transfer time: 0.000 seconds
INFO: Total bytes sent: 456866413
INFO: Total bytes received: 398372
INFO: sent 456866413 bytes received 398372 bytes 4595625.98 bytes/sec
INFO: total size is 456167369 speedup is 1.00
INFO: first sync finished (99 seconds)
INFO: suspend vm
INFO: Setting up checkpoint...
INFO: suspend...
INFO: get context...
INFO: Checkpointing completed succesfully
INFO: starting final sync /var/lib/vz/private/100/ to /var/lib/vz/dump/vzdump-openvz-100-2012_04_09-11_38_50.tmp
INFO: Number of files: 24892
INFO: Number of files transferred: 0
INFO: Total file size: 456167369 bytes
INFO: Total transferred file size: 0 bytes
INFO: Literal data: 0 bytes
INFO: Matched data: 0 bytes
INFO: File list size: 573708
INFO: File list generation time: 0.001 seconds
INFO: File list transfer time: 0.000 seconds
INFO: Total bytes sent: 575625
INFO: Total bytes received: 1916
INFO: sent 575625 bytes received 1916 bytes 231016.40 bytes/sec
INFO: total size is 456167369 speedup is 789.84
INFO: final sync finished (2 seconds)
INFO: resume vm
INFO: Resuming...
INFO: vm is online again after 5 seconds
INFO: Total bytes written: 473118720 (452MiB, 9.3MiB/s)
INFO: tar: Exiting with failure status due to previous errors
INFO: archive file size: 451MB
INFO: Finished Backup of VM 100 (00:02:40)
INFO: Backup job finished successfuly