Ask Your Question
0

Unable to creage an image with kilo on CentOS 7

asked 2015-08-17 18:02:29 -0500

Rajan433 gravatar image

updated 2015-08-18 01:23:07 -0500

dbaxps gravatar image

I am following the kilo user guide and I am stuck with creating image as below.

[root@controller ~]# glance image-create --name "cirros-0.3.4-x86_64" --file /tmp/images/cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --visibility public --progress
usage: glance [--version] [-d] [-v] [--get-schema] [--timeout TIMEOUT]
              [--no-ssl-compression] [-f] [--os-image-url OS_IMAGE_URL]
              [--os-image-api-version OS_IMAGE_API_VERSION]
              [--profile HMAC_KEY] [-k] [--os-cert OS_CERT]
              [--cert-file OS_CERT] [--os-key OS_KEY] [--key-file OS_KEY]
              [--os-cacert <ca-certificate-file>] [--ca-file OS_CACERT]
              [--os-username OS_USERNAME] [--os-user-id OS_USER_ID]
              [--os-user-domain-id OS_USER_DOMAIN_ID]
              [--os-user-domain-name OS_USER_DOMAIN_NAME]
              [--os-project-id OS_PROJECT_ID]
              [--os-project-name OS_PROJECT_NAME]
              [--os-project-domain-id OS_PROJECT_DOMAIN_ID]
              [--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
              [--os-password OS_PASSWORD] [--os-tenant-id OS_TENANT_ID]
              [--os-tenant-name OS_TENANT_NAME] [--os-auth-url OS_AUTH_URL]
              [--os-region-name OS_REGION_NAME]
              [--os-auth-token OS_AUTH_TOKEN]
              [--os-service-type OS_SERVICE_TYPE]
              [--os-endpoint-type OS_ENDPOINT_TYPE]
              <subcommand> ...
glance: error: unrecognized arguments: --name --disk-format qcow2 --container-format bare --visibility public

// I also can not get image-list
[root@controller ~]# glance image-list
Invalid OpenStack Identity credentials.

// This is my configuration output

[root@controller ~]# cat admin-openrc.sh
export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=password
export OS_AUTH_URL=http://controller:35357/v3
export OS_IMAGE_API_VERSION=2

[root@controller ~]# cat /etc/glance/glance-api.conf | grep -v ^#

   [DEFAULT]
    verbose = True
    notification_driver = noop

    [oslo_policy]


    [database]
    connection = mysql://glance:password@controller/glance

    [oslo_concurrency]

    [keystone_authtoken]

    auth_uri = http://controller:5000
    auth_url = http://controller:35357
    auth_plugin = password
    project_domain_id = default
    user_domain_id = default
    project_name = service
    username = glance
    password = password

    [paste_deploy]
    flavor = keystone

    [store_type_location_strategy]

    [profiler]

    [task]

    [taskflow_executor]

    [glance_store]
    default_store = file
    filesystem_store_datadir = /var/lib/glance/images/


    [root@controller ~]# cat /etc/glance/glance-registry.conf | grep -v ^# 

    [DEFAULT]
    verbose = True
    notification_driver = noop


    [oslo_policy]


    [database]
    connection = mysql://glance:password@controller/glance

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = password

[paste_deploy]
flavor = keystone

[profiler]

As far as I know, I followed the user guide and also I checked my configuration many times and can not pinpoint any issues. Any help will be appreciated.

edit retag flag offensive close merge delete

Comments

Try this example:

cd /tmp/image

glance image-create --name "Windows_server_2012" --disk-format iso --container-format bare --is-public True --progress < en_windows_server_2012_x64_dvd_915478.iso
Anario gravatar imageAnario ( 2015-08-17 18:24:29 -0500 )edit

I tried with windows iso with above example but the same result as before

Rajan433 gravatar imageRajan433 ( 2015-08-17 19:09:50 -0500 )edit

I also used the same image I tried in the first instance as your example, but the same issue

Rajan433 gravatar imageRajan433 ( 2015-08-17 19:10:36 -0500 )edit

4 answers

Sort by ยป oldest newest most voted
0

answered 2015-08-17 19:17:48 -0500

natsu gravatar image

cd location_of_img Try this:

glance image-create --name='CIRROS_IMAGE' --is-public=true \ --container-format=bare --disk-format=qcow2 < cirros-0.3.4-x86_64-disk.img

edit flag offensive delete link more

Comments

usage: glance image-create [--property <key=value>] [--file <file>] [--progress] <unavailable> glance image-create: error: too few arguments

Rajan433 gravatar imageRajan433 ( 2015-08-18 10:35:50 -0500 )edit
0

answered 2015-08-18 01:33:17 -0500

dbaxps gravatar image

Source file :-

[root@fedora22wksr root]# cat keystonerc_admin
unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=ea5c23c58f15494a
export OS_AUTH_URL=http://192.168.1.57:5000/v2.0
export PS1='[\u@\h \W(keystone_admin)]\$ '

export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne

Issue :-

glance image-create --name "CentOS 7.1" --is-public true --disk-format qcow2  --container-format bare < CentOS-7-x86_64-GenericCloud-1503.qcow2
edit flag offensive delete link more

Comments

I get the same error

glance: error: unrecognized arguments: --name --disk-format qcow2 --container-format bare --is-public True

Rajan433 gravatar imageRajan433 ( 2015-08-18 10:49:57 -0500 )edit
0

answered 2015-08-18 11:47:18 -0500

Rajan433 gravatar image

updated 2015-08-18 11:49:11 -0500

dbaxps gravatar image

All,

I have found a resolution. It appears glance is not parsing "" correctly. Just remove quotation from the image name and it should be good to go.

[Tue Aug 18 12:45:16 root@controller:~ ] # glance image-create --name cirros-0.3.4-x86_64 --file /tmp/images/cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --visibility public --progress
[=============================>] 100%
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | ee1eca47dc88f4879d8a229cc70a07c6     |
| container_format | bare                                 |
| created_at       | 2015-08-18T16:45:40Z                 |
| disk_format      | qcow2                                |
| id               | 7e08d6ef-2f91-4fcc-a367-23b9c3ff8433 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | cirros-0.3.4-x86_64                  |
| owner            | 1a47d9d15c7640d09901da74700ddbd0     |
| protected        | False                                |
| size             | 13287936                             |
| status           | active                               |
| tags             | []                                   |
| updated_at       | 2015-08-18T16:45:41Z                 |
| virtual_size     | None                                 |
| visibility       | public                               |
+------------------+--------------------------------------+
edit flag offensive delete link more
0

answered 2016-02-12 04:15:13 -0500

Check the log: /var/log/glance/glance-api.log for any warning of oslo.config.cfg Check service list using openstack service list

if you found single instance it is ok , else if there is multiple instance delete all those instance and create the instance again.

Still you are getting error, please post your service list, log here

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

2 followers

Stats

Asked: 2015-08-17 18:02:29 -0500

Seen: 569 times

Last updated: Aug 18 '15