美文网首页
glance image-create命令分析

glance image-create命令分析

作者: 大老三 | 来源:发表于2018-02-27 15:36 被阅读45次

可以通过以下命令创建镜像:

glance image-create --name test2 --visibility public --disk-format qcow2 --container-format bare --file  BCLinux-7.2-x86_64-20160701.qcow2 --progress

此命令的执行,在glanceclient实际上可以分为4部分

  1. 获取image schema(镜像所支持的属性字典定义)
  2. 调用glance image create接口创建image,创建完成后image处于queued状态(返回的是image信息)
  3. 调用glance image data的upload接口,上传image数据;在上传过程中,image处于saving状态;上传完成后,image处于active状态
  4. 调用glance image get接口,获取image详细信息,并在client中显示

如果在命令中不指定--file 或 < file名称,那么只会执行上述步骤1, 2

相关文章

网友评论

      本文标题:glance image-create命令分析

      本文链接:https://www.haomeiwen.com/subject/mpkmxftx.html