kna...@gmail.com wrote on 28/07/11 20:15:
So for now I would like to make a 'onevm saveas' command work with
OpenVZ VMs as well as if the SAVE sub-attribute is set to yes for
OpenNebula 2.2.1. As far as I understand both these features trigger
$ONE_LOCATOIN/share/hooks/image.rb script. So in order to achieve a
desired behavior a command like 'tar -czf $VM_DIR/<VMID>/images/disk.0
-C /vz/private/<VMID>/ *' must be executed in the beginning of that hook
(image.rb) what would replace the original disk.0 file. Is that correct?
$ONE_LOCATOIN/share/hooks/image.rb is executed on front-end node but VM working dir needs to be archived on cluster node. So I see not so much possibilities: 1) add the execution of tar command on remote node in image.rb hook which is executed on local (front-end) node i.e. such approach breaks the local/remote hooks logic; 2) create one more custom hook what has to be executed on remote node and what would archive VM working dir. But there are several issues here: - how one can make sure that custom hook will be executed before image.rb one since both of them should be triggered when VM reaches the DONE state, - how make that custom hook trigger only upon 'onevm saveas' command execution or if SAVE sub-attribute of DISK attribute is set to YES.

Any help on that is highly appreciated!
Regards,
Nikolay.
_______________________________________________
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

Reply via email to