Hi John,<div><br></div><div>AFAIK the shell scripts shipped with OpenNebula are just a sample of how things can be accomplished.</div><div>You should adapt those scripts to your needs, and modify them to create the image with qemu-img.</div>
<div><br></div><div>Cheers,</div><div><br></div><div>Pau.<br><br><div class="gmail_quote">2011/12/13 Jhon Masschelein <span dir="ltr"><<a href="mailto:Jhon.Masschelein@sara.nl">Jhon.Masschelein@sara.nl</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am having troubles creating qcow2 datablocks using oneimage.<br>
<br>
According to <a href="http://opennebula.org/documentation:rel3.0:img_template" target="_blank">http://opennebula.org/<u></u>documentation:rel3.0:img_<u></u>template</a> the oneimage template can contain a DRIVER parameter (optional) that can be KVM: raw, qcow2.<br>
<br>
I created a template (borrowed from the web page):<br>
<br>
NAME = "Experiment results"<br>
TYPE = DATABLOCK<br>
# No PATH set, this image will start as a new empty disk<br>
SIZE = 204800<br>
FSTYPE = ext3<br>
PUBLIC = NO<br>
DESCRIPTION = "Storage for my Thesis experiments."<br>
DRIVER = qcow2<br>
<br>
where I added the DRIVER line.<br>
<br>
Creating the image using oneimage create image.txt does however not create a qcow image:<br>
ls -hl /var/lib/one/images/<u></u>c0dc71ebe6562d4e8c9e186b249bff<u></u>13<br>
-rw-rw---- 1 oneadmin oneadmin 201G Dec 13 15:15 /var/lib/one/images/<u></u>c0dc71ebe6562d4e8c9e186b249bff<u></u>13<br>
file /var/lib/one/images/<u></u>c0dc71ebe6562d4e8c9e186b249bff<u></u>13<br>
/var/lib/one/images/<u></u>c0dc71ebe6562d4e8c9e186b249bff<u></u>13: Linux rev 1.0 ext3 filesystem data (large files)<br>
<br>
Looking at the source, I thinkg I found where the image gets created (please correct me if I am wrong here):<br>
/src/image_mad/remotes/fs/mkfs<br>
<br>
In this script, the image is allways created using dd. There is no check for the driver and no qemu-img possibility.<br>
<br>
It looks like oneimage can only create raw datablocks which is a pitty. We realy would like to use the small qcow2 format.<br>
<br>
Now I do not mind adding the functionality myself if it is not available at the moment, I just want to be sure I am not duplicating work. :)<br>
<br>
I am aware I can use the qemu-img command myself to create those datablocks, but I would like the sunstone interface to be able to create them automatically, so I need a oneimage template that makes this work.<br>
<br>
Best regards,<br>
<br>
Jhon<br>
______________________________<u></u>_________________<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/<u></u>listinfo.cgi/users-opennebula.<u></u>org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse;color:rgb(136,136,136)"><font face="'courier new', monospace"><div><font face="'courier new', monospace">----------------------------------</font></div>
Pau Tallada Crespí</font></span><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse;color:rgb(136,136,136)"><font face="'courier new', monospace"></font><div><font face="'courier new', monospace">Dep. d'Astrofísica i Cosmologia<br>
</font><div><font face="'courier new', monospace">Port d'Informació Científica (PIC)</font><div><font face="'courier new', monospace">Tel: +34 93 586 8233</font></div></div></div><div><font face="'courier new', monospace">----------------------------------</font></div>
</span><br></div><br>
</div>