← Back to team overview

openstack team mailing list archive

Re: Qcow2 Details on base images

 

On 28/07/12 05:42, Gaurab Basu wrote:
> Hi,
> 
> I am trying to figure out the technology that openstack uses when
> multiple VM's having the*same *base image (OS) are provisioned on a
> physical server.
> Does it use as many copy as the number of VM's or does it use the same
> base image and then copy on write.
> 
> I need to understand the complete details. Can anybody share some
> details or point me to some place where I can find the details.

Its pretty hard to provide a complete description of what happens,
because the code keeps changing. However, assuming you have copy on
write turned on (which is the default IIRC), and assuming that all of
the instances have the same disk size, then you end up with:

 - the image as fetched from glance, with possible format conversion
 - that image resized to the size the instance requested
 - a cow on write layer for each instance that is using that sized image

The first should be smallish, the second can be quite large, and the
third will really depend on how much writing the instances are doing.

Note that this all falls apart if instances are migrated, because as
part of the migration the copy on write layer is transformed into a full
disk image, which is what is shipped over to the new machine.

Hope this helps,
Mikal



Follow ups

References