[one-users] Passing additional arguments to TM drivers

Carlos Martín Sánchez cmartin at opennebula.org
Wed Mar 20 08:24:54 PDT 2013


Hi,

First let me get your question straight. You are not talking about an empty
volatile disk:
DISK = [ SIZE = 123, FORMAT=raw ]

What you have is a datablock type Image, and somehow you know it is empty
and you can bypass the copy to the Host. Am I right so far?

Instead of adding new parameters, I would try to get the information you
need from the driver. Drivers are executed as the oneadmin user, so you can
use the CLI or the ruby/java API.

The clone script takes as arguments (see [1]):
fe:SOURCE host:remote_system_ds/disk.i vm_id ds_id

The 'i' in disk.i is the DISK/DISK_ID attribute. Knowing that, you can get
the whole VM xml with 'onevm show vm_id -x', and use xpath to get the
corresponding DISK/IMAGE_ID.


Let me know if this works for you.
Regards.

[1] http://opennebula.org/documentation:rel3.8:sd

--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open-source Solution for Data Center Virtualization
www.OpenNebula.org | cmartin at opennebula.org |
@OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>


On Wed, Mar 20, 2013 at 11:43 AM, MENDOZA, John Robert T. <
bert at asti.dost.gov.ph> wrote:

> Hi All,
>
> I hope everyone is doing well. :)
>
> Just want to know which part of the OpenNebula code do I have to modify
> to pass additional arguments to TM commands?
>
> We're currently running a setup of SSH2LVM where we're using fs
> datastore for OS, CDROM, and Datablock raw images. We're using LVM
> logical volumes for our running VMs. Now, we're transferring the images
> from the datastore to the nodes via SSH and DD it to the local LVs in
> the nodes. This is sufficient for OS images as it clones the image and
> puts it into the local storage but for empty datablocks, say a 160GB
> empty disk image, this takes a while. What we want is to pass the IMAGE
> ID to the tm_clone command so that we'll know if we'll be cloning the
> image file or, an empty datablock, and if so, just create an LV on the
> host node and attach it to the VM.
>
> Thanks,
> John Robert Mendoza
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130320/7d1b4fd3/attachment-0002.htm>


More information about the Users mailing list