[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. #显示上传的进度条