[one-users] qcow2 images in datastores and as volatile disks
Ruben S. Montero
rsmontero at opennebula.org
Fri Feb 15 09:26:48 PST 2013
> 1.: I have to set FORMAT = "qcow2" so qemu-img create is used to create
> the image file. But this way I can not specify a filesystem to be created,
> right? I have to manually format the disk after vm booted (of curse I can
> use contextualisation to do this part). Is there a way to tell opennebula
> to create qcow2 img and then format it with ext3?
>
Exactly, you need to mount the disk and format it within the VM, once
booted. We thought about adding an extra TYPE something like qcow2+ext3 but
we feel that would be more confusing...
>
> 2.: The main reason why I want to use qcow2 is thin provisioning in the
> meaning of empty disk does not use $max_size at our storage. For testing I
> created a disks like:
>
> DISK = [ TYPE = "fs",
> SIZE = 40000,
> FORMAT = "ext3"]
>
> DISK = [ TYPE = "fs",
> SIZE = 40000,
> FORMAT = "raw"]
>
> I saw that even this disks only took ~750Mb on our NFS server. Can someone
> explain why, I expected that these raw (or raw with ext3 filesystem on it)
> will take the whole 40k Mb on our storage.
>
Maybe that's because you are using a file system with support for sparse
files.
>
> 3.: The transfer manager ist attached to a datastore and not to a image.
> So I can not put qcow2 and raw images into the same datastore. Is there a
> reason for that?
>
Actually you can. You'll have a datastore of type fs (DS_MAD = fs) and
using a transfer manager drivers qcow (TM_MAD=qcow2). You can create "raw"
files in the datastore. The TM driver will use qemu-img commands, but AFAIK
that also handle raw images.
> Why can't we attach the tm to a image instead of datastore?
>
TM is to specify how the images of a datastore are distributed to the
hosts. This is related to the storage configuration (shared by all the
images in a given datastore) and not to the image itself
> but I can put qcow2 images into shared tm datastore if the vm template
> overrides this by setting driver=qcow2, right?
>
Yes driver is an attribute of the image (the image format), you need to add
the driver=qcow2 for the qcow2 images.
Summary.
1.- Define a fs datastore [1] with the qcow2 transfer driver
2.- Create images in it, either register exisiting qcow2 files, or creating
datablocks of type qcow2 (to be formatted on the vm) or any other type.
Qcow2 images would need DRIVER=qcow2
3.- Use those files in your VMs with DISK = [...]
NOTE: Volatile disks as the one in your email are created on the fly in the
system datastore. [2]
Up to now I only thought about different datastores are different storage
> locations and different redundancy zones/slas/performance classes. Any
> clearification is appreciated
>
Yes, basically datastores are abstractions to manage different storage
architectures and configurations. Balancing among different servers, slas
and the like are goodies that comes that abstraction.
[1]
http://opennebula.org/documentation:rel3.8:fs_ds#using_the_qcow2_transfer_driver
[2] http://opennebula.org/documentation:rel3.8:system_ds
Cheers
Ruben
>
> Thanks for your help,
> Nils Schröder
>
> OHG mit Sitz in Oldenburg; Registergericht Oldenburg HR A 1548;
> Persönlich haftende geschäftsführende Gesellschafterin: Neumüller CeWe
> Color Stiftung, Oldenburg
> Vorstand: Dr. Rolf Hollander, Vorsitzender; Harald H. Pirwitz, Felix
> Thalmann, Frank Zweigle, Dr. Michael Fries;
> Geschäftsführer: Dr. Reiner Fageth, Andreas F.L. Heydemann, Dr. Olaf
> Holzkämper
>
> Persönlich haftende Gesellschafterin: CeWe Color Holding AG, Oldenburg,
> Registergericht Oldenburg HR B 2956
> Vorstand: Dr. Rolf Hollander, Vorsitzender; Andreas F.L. Heydemann, Dr.
> Reiner Fageth, Dr. Olaf Holzkämper
> Aufsichtsrat: Otto Korte, Vorsitzender
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
--
Ruben S. Montero, PhD
Project co-Lead and Chief Architect
OpenNebula - The Open Source Solution for Data Center Virtualization
www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130215/0f827756/attachment-0001.htm>
More information about the Users
mailing list