[root@controller upload]# glance help 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]
Create a new image.
Optional arguments:
--id <IMAGE_ID> ID of image to reserve.
--name <NAME> Name of image. #名字
--store <STORE> Store to upload image to.
--disk-format <DISK_FORMAT>
Disk format of image. Acceptable formats: ami, ari, #磁盘格式,支持aki, vhd, vmdk, raw, qcow2, vdi, and iso格式
aki, vhd, vmdk, raw, qcow2, vdi, and iso
--container-format <CONTAINER_FORMAT> #容器格式,支持ami,ari, aki, bare, and ovf格式
Container format of image. Acceptable formats: ami,
ari, aki, bare, and ovf.
--owner <TENANT_ID> Tenant who should own image.
--size <SIZE> Size of image data (in bytes). Only used with '--
location' and '--copy_from'.
--min-disk <DISK_GB> Minimum size of disk needed to boot image (in #最小的磁盘,表示镜像最小需要的磁盘空间,和flavor有关,如果太小,则创建vm失败
gigabytes).
--min-ram <DISK_RAM> Minimum amount of ram needed to boot image (in
megabytes).
--location <IMAGE_URL>
URL where the data for this image already resides. For #位置,支持三种location,file和copy-from,location是一个url路径
example, if the image data is stored in swift, you
could specify
'swift://account:key@example.com/container/obj'. #本地文件
--file <FILE> Local file that contains disk image to be uploaded
during creation. Alternatively, images can be passed
to the client via stdin.
--checksum <CHECKSUM>
Hash of image data used Glance can use for
verification. Provide a md5 checksum here.
--copy-from <IMAGE_URL> #远程拷贝,相比于location,copy-from会直接拷贝,而location则指定定义url路径
Similar to '--location' in usage, but this indicates
that the Glance server should immediately copy the
data and store it in its configured image store.
--is-public {True,False} #设置是否共有
Make image accessible to the public.
--is-protected {True,False} #是否保护标志位,房子误删除
Prevent image from being deleted.
--property <key=value>
Arbitrary property to associate with image. May be
used multiple times.
--human-readable Print image size in a human-friendly format. #镜像大小可读,即MB,GB格式显示
--progress Show upload progress bar. #显示上传的进度条
2. glance相关命令
[root@controller upload]# glance help
usage: glance [--version] [-d] [-v] [--get-schema] [-k]
[--cert-file CERT_FILE] [--key-file KEY_FILE]
[--os-cacert <ca-certificate-file>] [--ca-file OS_CACERT]
[--timeout TIMEOUT] [--no-ssl-compression] [-f] [--dry-run]
[--ssl] [-H ADDRESS] [-p PORT] [--os-username OS_USERNAME]
[-I OS_USERNAME] [--os-password OS_PASSWORD] [-K OS_PASSWORD]
[--os-tenant-id OS_TENANT_ID] [--os-tenant-name OS_TENANT_NAME]
[-T OS_TENANT_NAME] [--os-auth-url OS_AUTH_URL] [-N OS_AUTH_URL]
[--os-region-name OS_REGION_NAME] [-R OS_REGION_NAME]
[--os-auth-token OS_AUTH_TOKEN] [-A OS_AUTH_TOKEN]
[--os-image-url OS_IMAGE_URL] [-U OS_IMAGE_URL]
[--os-image-api-version OS_IMAGE_API_VERSION]
[--os-service-type OS_SERVICE_TYPE]
[--os-endpoint-type OS_ENDPOINT_TYPE] [-S OS_AUTH_STRATEGY]
<subcommand> ...
Command-line interface to the OpenStack Images API.
Positional arguments:
<subcommand>
add DEPRECATED! Use image-create instead. #旧版的增删改查,即add,delete,update,list,show,details
clear DEPRECATED!
delete DEPRECATED! Use image-delete instead.
details DEPRECATED! Use image-list instead.
image-create Create a new image. #新版的增删改查,即image-create,image-delete,image-update,image-list,image-show
image-delete Delete specified image(s).
image-download Download a specific image.
image-list List images you can access.
image-members DEPRECATED! Use member-list instead.
image-show Describe a specific image.
image-update Update a specific image.
index DEPRECATED! Use image-list instead.
member-add DEPRECATED! Use member-create instead. #如果image设置为private,则可以通过member的形式共享给其他的tenant使用
member-create Share a specific image with a tenant. #包含member共享的相关操作,即member-create新建共享,member-delete删除共享,member-list查看共享
member-delete Remove a shared image from a tenant.
member-images DEPRECATED! Use member-list instead.
member-list Describe sharing permissions by image or tenant.
members-replace DEPRECATED!
show DEPRECATED! Use image-show instead.
update DEPRECATED! Use image-update instead.
help Display help about this program or one of its
subcommands.