Ask Your Question
1

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)?

Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

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:

http://docs.openstack.org/essex/openstack-compute/admin/content/manually-creating-qcow2-images.html

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

https://www.openstack.org/summit/portland-2013/session-videos/presentation/optimizing-vm-images-for-openstack-with-kvm-qemu

edit flag offensive delete link more

Comments

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. http://docs.openstack.org/image-guide/content/ch_openstack_images.html#d6e259

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 101 times

Last updated: Oct 23 '13