<div dir="ltr">Hello again to you too! :)<br><br>Thanks for the update and details.<br><br>You might try using qemu-img to modify the file before uploading as a new image: <br><br><a href="https://fatmin.com/2016/12/20/how-to-resize-a-qcow2-image-and-filesystem-with-virt-resize/">https://fatmin.com/2016/12/20/how-to-resize-a-qcow2-image-and-filesystem-with-virt-resize/</a> <br><br><a href="http://www.tuxfixer.com/how-to-shrink-openstack-qcow2-image-with-qemu-img/">http://www.tuxfixer.com/how-to-shrink-openstack-qcow2-image-with-qemu-img/</a><br><div><br></div><div>I think qcow2 image file you copied has embedded metadata that needs to be modified before you can create the image with a smaller --min-disk. I haven't done this myself though, and I am away from a OpenStack console at the moment so I can't verify, but hopefully that gets us one step closer.</div><div><br></div><div>Cheers,</div><div><br></div><div>-Chris</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 25, 2017 at 7:52 PM, Georgios Dimitrakakis <span dir="ltr"><<a href="mailto:giorgis@acmac.uoc.gr" target="_blank">giorgis@acmac.uoc.gr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello again!<br>
<br>
Unfortunately it doesn't work...<br>
<br>
Here is the error: "Flavor's disk is too small for requested image. Flavor disk is 21474836480 bytes, image is 53687091200 bytes.]."<br>
<br>
This is on an image that was taken when the flavor had root with 50GB and tried to upload it using a flavor of 20GB.<br>
<br>
The filesystem uses around 2-3GB and I had specified with the "--min-disk 5" parameter to be able to spawn on 5GB or more flavors.<br>
<br>
Here is the output from "image show" command<br>
<br>
+------------------+----------<wbr>------------------------------<wbr>--------------+<br>
| Field            | Value                                               |<br>
+------------------+----------<wbr>------------------------------<wbr>--------------+<br>
| checksum         | 66ca6e4b52dc42f563fa5c321b5c3d<wbr>a9                    |<br>
| container_format | bare                                                |<br>
| created_at       | 2017-03-26T02:44:54Z                                |<br>
| disk_format      | qcow2                                               |<br>
| file             | /v2/images/4ce95fa2-5983-4999-<wbr>a9ef-c5702b5fae6d/file |<br>
| id               | 4ce95fa2-5983-4999-a9ef-c5702b<wbr>5fae6d                |<br>
| min_disk         | 5                                                   |<br>
| min_ram          | 0                                                   |<br>
| name             | new                                                 |<br>
| owner            | 0518e08cac524dacb457c631a9efa7<wbr>b3                    |<br>
| protected        | False                                               |<br>
| schema           | /v2/schemas/image                                   |<br>
| size             | <a href="tel:3065315328" value="+13065315328" target="_blank">3065315328</a>                                          |<br>
| status           | active                                              |<br>
| tags             |                                                     |<br>
| updated_at       | 2017-03-26T02:45:06Z                                |<br>
| virtual_size     | None                                                |<br>
| visibility       | public                                              |<br>
+------------------+----------<wbr>------------------------------<wbr>--------------+<br>
<br>
<br>
The only thing that I didn't do was to use the "save" command although I don't know if that could make a difference!<br>
<br>
I 've just went to "/var/lib/glance/images" and taken directly from there the file that was corresponding to the image I wanted.<br>
Do you believe that by "saving" it would make any difference??<br>
<br>
Any other ideas that I can try???<br>
<br>
<br>
All the best,<br>
<br>
G.<div><div class="h5"><br>
<br>
<br>
On Sun, 26 Mar 2017 05:37:47 +0300, Georgios Dimitrakakis wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Chris!<br>
<br>
Thanks for pointing out the "--min-disk" parameter. I haven't used<br>
that one before.<br>
<br>
I 'll try it out and post back.<br>
<br>
Regards,<br>
<br>
G.<br>
<br>
On Sat, 25 Mar 2017 18:39:09 -0700, Chris Suttles wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You might be able to change it via openstack command, probably<br>
something like 'openstack show image <Id>'  / 'openstack image set ??<br>
<id>'<br>
<br>
You can definitely download the image to a file and then upload a new<br>
image, specifying --min-disk. Something like 'openstack image save<br>
--file <file> <id>' and then just 'openstack image create --file<br>
<file> --min-disk <disk size in gb> <image name>'<br>
<br>
HTH,<br>
<br>
-Chris<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mar 25, 2017, at 5:31 PM, Georgios Dimitrakakis <<a href="mailto:giorgis@acmac.uoc.gr" target="_blank">giorgis@acmac.uoc.gr</a>> wrote:<br>
<br>
<br>
Hello!<br>
<br>
Let's assume that I have a VM's image that has been taken when the VM was launched with a flavor of 50GB for the root disk.<br>
Now when I try to spawn a new VM out of that image I cannot do it with a flavor that has disk less than 50GB even if the VM itself inside uses only 5GB.<br>
<br>
Is there a way to shrink the image's flavor requirements?<br>
<br>
Best,<br>
<br>
G.<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
</blockquote></blockquote>
<br>
<br>
______________________________<wbr>_________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
</blockquote>
<br></div></div>
-- <br>
Dr. Dimitrakakis Georgios<br>
<br>
Networks and Systems Administrator<br>
<br>
Archimedes Center for Modeling, Analysis & Computation (ACMAC)<br>
School of Sciences and Engineering<br>
University of Crete<br>
P.O. Box 2208<br>
710 - 03 Heraklion<br>
Crete, Greece<br>
<br>
Tel: <a href="tel:%2B30%202810%20393717" value="+302810393717" target="_blank">+30 2810 393717</a><br>
Fax: <a href="tel:%2B30%202810%20393660" value="+302810393660" target="_blank">+30 2810 393660</a><br>
<br>
E-mail: <a href="mailto:giorgis@acmac.uoc.gr" target="_blank">giorgis@acmac.uoc.gr</a><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<wbr>_________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
</div></div></blockquote></div><br></div>