Ask Your Question

Images with KVM (HDD Question)

asked 2013-10-23 14:32:17 -0500

htorbov gravatar image

I have installed OpenStack Essex on Ubuntu 12.04 and I'm going to use that server for private cloud company.

Currently I'm starting to create images with kvm: kvm-img create -f qcow2 ubuntu.img 10G

What those 10GB stands for? Would it be a problem if I use this image on OpenStack instance of 20GB (for example)? Or I have to create image files for each cloud plan (10G/20G/40G/80G)?


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-10-23 18:42:52 -0500

sgordon gravatar image

The image size represents the size you've allocated for the base image, it does not have to match the instance (flavour) sizes and the image can in fact be configured to "grow" to the required size automatically when you create an instance.

As a result your base image can actually be significantly smaller than your actual compute instances (the Fedora and Ubuntu cloud images are both only a few hundred megabytes in size).

You can find more information on creating images for Essex here:

You may also find this presentation from the Portland summit useful:

edit flag offensive delete link more


So, I only need to install the distribution, add key-injection and remove the network persistence rules from /etc/udev/rules.d, right? The partitions will be okay if flavour is bigger than the img file? Or I have to install cloud-init package on the image to make it work? Thanks

htorbov gravatar imagehtorbov ( 2013-10-24 04:12:56 -0500 )edit

The easiest way to enable the growing of the partition (via growpart) is to ensure that the image has the cloud-init, cloud-utils, and cloud-intramfs-tools packages installed.

sgordon gravatar imagesgordon ( 2013-10-24 06:19:48 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-10-23 14:32:17 -0500

Seen: 160 times

Last updated: Oct 23 '13