[Openstack] Can't create image w/ glance.

Tzach Shefi tshefi at redhat.com
Thu Dec 31 14:55:36 UTC 2015


So < filename should also work I've seen this around, yet I too prefer
using using --file FullPathToImage

Suggest trying with --debug like below:

$ glance --debug image-create --name test --disk-format qcow2
--container-format bare --file cirros-0.3.2-x86_64-disk.img

To debug things get rid of all the extra stuff:
Remove --progress - in the past I noticed a few bugs related to it.
Remove --public -  for debugging, you can later edit the image once it's
uploaded and set to public,  this option syntax recently changed on Kilo or
Liberty I can't remember, don't know what your using.
Idea is to try to do the most basic upload command and see what happens,
then start adding optional switches.

On /etc/glance/glance-api.conf set debug=true and restart glance service to
get extra stuff out to logs.
Check your Glance logs (/var/log/glance), do you get any error traceback?

Which version of OS/Openstack?
Which Glance backend, can you share glance-api.conf file?

Tzach


On Thu, Dec 31, 2015 at 12:12 PM, Hinds, Luke (Nokia - GB/Bristol) <
luke.hinds at nokia.com> wrote:

> I think you might be missing a space between < and
> cirros-0.3.2-x86_64-disk.img
>
> Also, I am pretty sure it should be --file IMAGE
>
> ________________________________________
> From: EXT xu cai [jeffreycai at gmail.com]
> Sent: Thursday, December 31, 2015 7:02 AM
> To: openstack at lists.openstack.org
> Subject: [Openstack] Can't create image w/ glance.
>
> stack at ubuntu:~/workspace/devstack/files/images$ glance image-create
> --name test --disk-format qcow2 --container-format bare --visibility public
> --progress <cirros-0.3.2-x86_64-disk.img
> +------------------+--------------------------------------+
> | Property         | Value                                |
> +------------------+--------------------------------------+
> | checksum         | None                                 |
> | container_format | bare                                 |
> | created_at       | 2015-12-31T06:55:27Z                 |
> | disk_format      | qcow2                                |
> | id               | 7938704e-74e5-4034-b502-1a0a633ec695 |
> | min_disk         | 0                                    |
> | min_ram          | 0                                    |
> | name             | test                                 |
> | owner            | 549133f74d044c47a8efaf37708de53d     |
> | protected        | False                                |
> | size             | None                                 |
> | status           | queued                               |
> | tags             | []                                   |
> | updated_at       | 2015-12-31T06:55:27Z                 |
> | virtual_size     | None                                 |
> | visibility       | public                               |
> +------------------+--------------------------------------+
> must be string or buffer, not generator
> stack at ubuntu:~/workspace/devstack/files/images$
> stack at ubuntu:~/workspace/devstack/files/images$ glance image-list
> +--------------------------------------+------+
> | ID                                   | Name |
> +--------------------------------------+------+
> | 7938704e-74e5-4034-b502-1a0a633ec695 | test |
> +--------------------------------------+------+
> stack at ubuntu:~/workspace/devstack/files/images$
> stack at ubuntu:~/workspace/devstack/files/images$ glance image-show
> 7938704e-74e5-4034-b502-1a0a633ec695
> +------------------+--------------------------------------+
> | Property         | Value                                |
> +------------------+--------------------------------------+
> | checksum         | d41d8cd98f00b204e9800998ecf8427e     |
> | container_format | bare                                 |
> | created_at       | 2015-12-31T06:55:27Z                 |
> | disk_format      | qcow2                                |
> | id               | 7938704e-74e5-4034-b502-1a0a633ec695 |
> | min_disk         | 0                                    |
> | min_ram          | 0                                    |
> | name             | test                                 |
> | owner            | 549133f74d044c47a8efaf37708de53d     |
> | protected        | False                                |
> | size             | 0                                    |
> | status           | active                               |
> | tags             | []                                   |
> | updated_at       | 2015-12-31T06:55:27Z                 |
> | virtual_size     | None                                 |
> | visibility       | public                               |
> +------------------+--------------------------------------+
> stack at ubuntu:~/workspace/devstack/files/images$ glance --version
> 1.2.0
> stack at ubuntu:~/workspace/devstack/files/images$ uname -a
> Linux ubuntu 3.19.0-33-generic #38~14.04.1-Ubuntu SMP Fri Nov 6 18:17:28
> UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
>
> stack at ubuntu:~/workspace/devstack/files/images$ file
> cirros-0.3.2-x86_64-disk.img
> cirros-0.3.2-x86_64-disk.img: QEMU QCOW Image (v2), 41126400 bytes
>
> any hint how to resolve this ?
>
> regards
> jeffrey
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>



-- 
*Tzach Shefi*
Quality Engineer, Redhat OSP
+972-54-4701080 <callto:+972-52-4534729>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20151231/ffd03eb6/attachment.html>


More information about the Openstack mailing list