[Openstack] Large image snapshots

Blake Yeager blake.yeager at gmail.com
Thu Jul 26 17:36:48 UTC 2012


On Thu, Jul 26, 2012 at 8:06 AM, David Kranz <david.kranz at qrclab.com> wrote:

> I am a bit ignorant about image formats and such. The size of the Ubuntu
> precise cloud image at http://uec-images.ubuntu.com/**
> precise/current/precise-**server-cloudimg-amd64-disk1.**img<http://uec-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img>is about 221Mb. If I boot that image with flavor m1.tiny and use
> image-create I get an image that is 2Gb. If I do the same with flavor
> m1.large the resulting image is 10Gb.  Is there a way to create snapshots
> that don't result in huge images?
>
>  -David
>
>
David,

This has to do with the disk format that you are using (for example raw vs.
qcow2).  Unless you are using a sparse disk format the snapshot will always
be the total size of the root partition. By default when Nova creates an
image it expands the root partition to 10GB so when you create a snapshot
of that partition it will also be 10GB.  By switching the disk format you
are using to a sparse format you should be able to avoid this behavior.
 The m1.tiny flavor is treated as a special case by Nova so that is why the
root partition and corresponding snapshot is only 2GB.

-Blake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120726/34e9f507/attachment.html>


More information about the Openstack mailing list