openstack glace未知命令

时间:2014-06-21 19:44:15

标签: openstack

我使用的每个与图像相关的命令都以错误结束:

glance image-create --name='Ubuntu 12.04 x86_64 Server' --disk-format=qcow2 --container-format=bare --public < precise-server-cloudimg-amd64-disk1.img
  
    

用法:浏览[选项] [args]

  
     

命令:

help <command>  Output help for one of the commands below

add             Adds a new image to Glance

update          Updates an image's metadata in Glance

delete          Deletes an image from Glance

index           Return brief information about images in Glance

details         Return detailed information about images in
                Glance

show            Show detailed information about an image in
                Glance

clear           Removes all images and metadata from Glance
     

会员指令:

image-members    List members an image is shared with

member-images    List images shared with a member

member-add       Grants a member access to an image

member-delete    Revokes a member's access to an image

members-replace  Replaces all membership for an image
     

一览:错误:没有这样的选项: - name

删除上面的命令,得到了这个:

glance image-create
  
    

用法:浏览[选项] [args]

  
     

命令:

help <command>  Output help for one of the commands below

add             Adds a new image to Glance

update          Updates an image's metadata in Glance

delete          Deletes an image from Glance

index           Return brief information about images in Glance

details         Return detailed information about images in
                Glance

show            Show detailed information about an image in
                Glance

clear           Removes all images and metadata from Glance
     

会员指令:

image-members    List members an image is shared with

member-images    List images shared with a member

member-add       Grants a member access to an image

member-delete    Revokes a member's access to an image

members-replace  Replaces all membership for an image
     

未知命令:image-create

我无法弄清楚。

注意:我使用的是运行Ubuntu Precise的虚拟机,而python-glanceclient已不再可用。

1 个答案:

答案 0 :(得分:0)

对于您的第一个命令,您正在使用&#39; =&#39;字符,这不是必需的。请注意glance image-create命令帮助:

usage: glance image-create [--id <IMAGE_ID>] [--name <NAME>] [--store <STORE>]
                           [--disk-format <DISK_FORMAT>]
                           [--container-format <CONTAINER_FORMAT>]
                           [--owner <TENANT_ID>] [--size <SIZE>]
                           [--min-disk <DISK_GB>] [--min-ram <DISK_RAM>]
                           [--location <IMAGE_URL>] [--file <FILE>]
                           [--checksum <CHECKSUM>] [--copy-from <IMAGE_URL>]
                           [--is-public {True,False}]
                           [--is-protected {True,False}]
                           [--property <key=value>] [--human-readable]
                           [--progress]

第二个命令应该有效。您可能需要重新安装glance命令。尝试使用pip安装它:

sudo pip install python-glanceclient