Ask Your Question
0

Build of instance failed due to error : Flavor's disk is too small for requested image. Flavor disk is 17179869184 bytes, image is 64424509440 bytes.

asked 2017-02-22 08:58:43 -0500

ANIL KUMAR THATAVARTHI gravatar image

qemu-img info image-plus-chrome-test-new.qcow2

image: image-plus-chrome-test-new.qcow2 file format: qcow2 virtual size: 64G (68719476736 bytes) disk size: 2.5G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false refcount bits: 16 corrupt: false

Here virtual disk size is 64G. I cant assign this image to a vm with lower flavor such as m1.tiny. I found that glacnce will read the virtual disk size and then check the flavor size. If it is less, then error (Flavor's disk is too small for requested image) will occur. Can any one suggest me how to reduce virtual-size of the image.

edit retag flag offensive close merge delete

Comments

If the image is a custom made, check real space consumed by the OS and apps, and manually reduce size. Or create the new qcow2 with the minimum space needed.

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2017-02-22 17:29:35 -0500 )edit

You can play with the nova.conf parameter disk_allocation_ratioto allow over-committing disk space (https://docs.openstack.org/ocata/conf...).

Bernd Bausch gravatar imageBernd Bausch ( 2017-02-22 18:11:46 -0500 )edit

Can you please tell us how to manually reduce qcow2 image size

Deepa gravatar imageDeepa ( 2017-07-12 03:38:36 -0500 )edit

man qemu-img Look for the resize option.

Bernd Bausch gravatar imageBernd Bausch ( 2017-07-12 04:50:37 -0500 )edit

Thanks Bernd.I did resize the image ,but unfortunately VM didnt boot up with it

Deepa gravatar imageDeepa ( 2017-07-12 06:10:02 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-02-22 23:18:46 -0500

ANIL KUMAR THATAVARTHI gravatar image

updated 2017-02-22 23:21:09 -0500

Hi Eduardo,

Thanks for replying to my question.

Filesystem                                                                      Size  Used Avail Use% Mounted on
/dev/vda1                                                                        64G  6.8G   58G  11% /
devtmpfs                                                                        3.9G     0  3.9G   0% /dev
tmpfs                                                                           3.9G   80K  3.9G   1% /dev/shm
tmpfs                                                                           3.9G   41M  3.9G   2% /run
tmpfs                                                                           3.9G     0  3.9G   0% /sys/fs/cgroup
tmpfs                                                                           799M  4.0K  799M   1% /run/user/994
tmpfs                                                                           799M     0  799M   0% /run/user/13635
147.234.244.17:/vol/cesr/tnd_cesr/tnd_cesr/Dev/Software/bin/qa-archive/testing  2.4T  2.4T   53G  98% /u/testing
tmpfs                                                                           799M   32K  799M   1% /run/user/50030

The image has total hard disk size of 64 Gb. but only 6.8Gb of data is present in root file system.

Can you please explain me the procedure to reduce the hard disk from 64 Gb to around 15Gb.

So that when we create image, the virtual disk size will come to 15Gb.

edit flag offensive delete link more

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: 2017-02-22 08:58:43 -0500

Seen: 623 times

Last updated: Feb 22 '17