Hi,<div><br></div><div>First let me get your question straight. You are not talking about an empty volatile disk:</div><div>DISK = [ SIZE = 123, FORMAT=raw ]</div><div><br></div><div>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?</div>



<div><br></div><div>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.</div><div><br></div>

The clone script takes as arguments (see [1]):<br>fe:SOURCE host:remote_system_ds/disk.i vm_id ds_id<div><br></div><div>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.</div>

<div><br></div><div><br></div><div>Let me know if this works for you.</div><div>Regards.</div><div><br><div>[1] <a href="http://opennebula.org/documentation:rel3.8:sd">http://opennebula.org/documentation:rel3.8:sd</a></div>

<div><br></div><div><div>--<br>Carlos Martín, MSc<br>Project Engineer<br>OpenNebula - The Open-source Solution for Data Center Virtualization<div>
<span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> | <a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="mailto:cmartin@opennebula.org" style="color:rgb(42,93,176)" target="_blank"></a></span></div>



</div>
<br><br><div class="gmail_quote">On Wed, Mar 20, 2013 at 11:43 AM, MENDOZA, John Robert T. <span dir="ltr"><<a href="mailto:bert@asti.dost.gov.ph" target="_blank">bert@asti.dost.gov.ph</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



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