[one-users] tune 'onevm saveas' behavior for OpenVZ
knawnd at gmail.com
knawnd at gmail.com
Fri Aug 26 04:15:25 PDT 2011
Tino Vazquez wrote on 24/08/11 14:30:
> Dear Nikolay,
> I think the image.rb approach won't work anyway, because it is
> executed on the DONE state, when the transfer manager already staged
> back the disk.i's already to the ONE FrontEnd.
Thanks for explanation! Now it's clear.
> So I guess where you really want to set this tar operation is in the
> TM scripts. Take a look at src/tm_mad/ssh/tm_mv.sh. The last lines
> you have to ensure that $SRC is the tar.gz of the modified openVZ disk
> (that is, with the modifications after running the VM).
appreciate your hint! But tm_mv.sh script is run after the invocation of
$SCRIPTS_REMOTE_DIR/vmm/<hypervisor>/shutdown script. A VM shutdown
assumes complete removal of VM files/disks. So after shutdown operation
there is nothing to archive.
Consequently I put tar command in
$SCRIPTS_REMOTE_DIR/vmm/<hypervisor>/shutdown script to be executed
before VM destroying. The side-effect of such approach is that VM
working dir is archived for each VM when it is shutdown even if its disk
is not marked to be saved either by setting SAVE attribute to 'yes' or
by performing 'onevm saveas' command.
If someone has a better idea, please, share it.
> You will need
> also to modify src/tm_mad/nfs/tm_mv.sh to allow for shared storage
For the time being my minimal task is to make OpenVZ working in ONE with
non-shared fs deployment model (what fits my needs). As I wrote before
after that I am planning to share docs and scripts for OpenNebula 2.2.1.
Then I would like to port those scripts and docs for OpenNebula 3.0.
> You can create new TMs (tm_ssh_openvz and tm_nfs_openvz) by basically
> using all the existing tm_* scripts, and including the modified
I created a separate dir in lib/tm_commands/ssh/ for openvz scripts and
edit $ONE_LOCATION/etc/tm_ssh/tm_ssh.conf accordingly.
> Hope it helps,
yes, it does!
Thanks a lot!
More information about the Users