[one-users] Having troubles creating qcow2 datablocks using oneimage

Pau Tallada tallada at pic.es
Mon Jan 2 03:10:43 PST 2012


Hi John,

AFAIK the shell scripts shipped with OpenNebula are just a sample of how
things can be accomplished.
You should adapt those scripts to your needs, and modify them to create the
image with qemu-img.

Cheers,

Pau.

2011/12/13 Jhon Masschelein <Jhon.Masschelein at sara.nl>

> Hi,
>
> I am having troubles creating qcow2 datablocks using oneimage.
>
> According to http://opennebula.org/**documentation:rel3.0:img_**template<http://opennebula.org/documentation:rel3.0:img_template>the oneimage template can contain a DRIVER parameter (optional) that can be
> KVM: raw, qcow2.
>
> I created a template (borrowed from the web page):
>
> NAME          = "Experiment results"
> TYPE          = DATABLOCK
> # No PATH set, this image will start as a new empty disk
> SIZE          = 204800
> FSTYPE        = ext3
> PUBLIC        = NO
> DESCRIPTION   = "Storage for my Thesis experiments."
> DRIVER        = qcow2
>
> where I added the DRIVER line.
>
> Creating the image using oneimage create image.txt does however not create
> a qcow image:
>  ls -hl /var/lib/one/images/**c0dc71ebe6562d4e8c9e186b249bff**13
> -rw-rw---- 1 oneadmin oneadmin 201G Dec 13 15:15 /var/lib/one/images/**
> c0dc71ebe6562d4e8c9e186b249bff**13
> file /var/lib/one/images/**c0dc71ebe6562d4e8c9e186b249bff**13
> /var/lib/one/images/**c0dc71ebe6562d4e8c9e186b249bff**13: Linux rev 1.0
> ext3 filesystem data (large files)
>
> Looking at the source, I thinkg I found where the image gets created
> (please correct me if I am wrong here):
> /src/image_mad/remotes/fs/mkfs
>
> In this script, the image is allways created using dd. There is no check
> for the driver and no qemu-img possibility.
>
> It looks like oneimage can only create raw datablocks which is a pitty. We
> realy would like to use the small qcow2 format.
>
> 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. :)
>
> 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.
>
> Best regards,
>
> Jhon
> ______________________________**_________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/**listinfo.cgi/users-opennebula.**org<http://lists.opennebula.org/listinfo.cgi/users-opennebula.org>
>



-- 
----------------------------------
Pau Tallada Crespí
Dep. d'Astrofísica i Cosmologia
Port d'Informació Científica (PIC)
Tel: +34 93 586 8233
----------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120102/ae3aab87/attachment-0002.htm>


More information about the Users mailing list