[one-users] tune 'onevm saveas' behavior for OpenVZ

Tino Vazquez tinova at opennebula.org
Wed Jul 27 07:28:33 PDT 2011

Dear Nikolay,

First of all, apologies for the long delay in the reply, we were
really bussy with the 3.0 release. We are more than happy to provide
support for this integration, we will try our best to keep this

The problem you are facing is similar to the one posed by VMware,
where disks are multiple files that can be packed in a folder. This
problem is solved in 2.2 and also 3.0. If it is ok with you, we can
tackle both, although I think the 3.0 integration is the way to go.

Let's go first for the 2.2, since it is the one you are using.

The problem is more general that the save_as I think. If you are using
the image repository, in order to register an image you should
register a folder. In VMware driver, this is solved with a new command
(onevmware) for 2.2, and using a prefix in 3.0 (the 3.0 features a new
Image Catalog driver, when it sees the vmware:// prefix it copies the
whole directory). If you did not tackle this, maybe we can leave it
for 2.2 as it is now (that is, not supporting the image catalog, how
do you specify the disks now? do you set the path in DISK=[SOURCE=""]
and then treat it from a custom made transfer manager?). What do you

Regarding you question, the file to modify I think it would be
$ONE_LOCATION/lib/ruby/ImageRepository.rb, line 136. Now it is doing a
move, so it may work. Did you try this? What error message do you get?

Please get back with your plans for 2.2 and 3.0 and we will move on,
we can provide help with the ruby scripting.

Hope it helps,


Constantino Vázquez Blanco, MSc
OpenNebula Major Contributor
www.OpenNebula.org | @tinova79

On Mon, Jul 18, 2011 at 6:50 PM,  <knawnd at gmail.com> wrote:
> Dear OpenNebula developers,
> I need some help to tune the behavior of 'onevm saveas' command in case of
> OpenVZ  VMs.
> The only change needs to be made in its current behavior is to archive a
> root dir of particular OpenVZ VM and register that archive as a new OS image
> in ONE image repository since OpenVZ VM filesystem is not a single file but
> a directory on the host server (for more details see [1]).
> I am not sure what file(s) needs to be modified: $ONE_LOCATION/bin/onevm
> (771 - 836 lines) or/and $ONE_LOCATION/share/hooks/image.rb.
> Could you, please, help me with the implementation of described
> functionality since I have no experience in ruby programming?
> For the time being I am using stable version of OpenNebula 2.2.1.
> Please, let me know if more info needs to be provided.
> Regards,
> Nikolay.
> [1] http://wiki.openvz.org/WP/What_are_containers
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

More information about the Users mailing list