Glance
Glance镜像状态变化
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-bAVA6dhZ-1633282964013)(pictures/镜像状态变化.png)]
Glance镜像组件【万物不会没关系,–help就好了】
- 用“镜像文件.qcow2”创建(上传)名称为“镜像名”且指定最小磁盘大小和最小内存大小且为公有的镜像
glance image-create --name 镜像名 --container-format bare --disk-format qcow2 --min-disk 最小磁盘大小 --min-ram 最小内存大小 --progress --visibility public < 镜像文件.qcow2
openstack image create --container-format bare --disk-format qcow2 --min-disk 最小磁盘大小 --min-ram 最小内存大小 --public 镜像名 < 镜像文件.qcow2
- 参数解释
- –name 名称
- –container-format 容器格式
- bare 空
- –disk-format 文件格式
- –min-disk 需要创建的最小磁盘大小
- –min-ram 需要创建的最小内存大小
- –progress 进度条
- –visibility 可见性
- –file 或 < 导入镜像
- –public 公有
- –private 私有
- 查看镜像列表
glance image-list
openstack image list
- 查看镜像详情
glance image-show 镜像ID
openstack image show 镜像ID或镜像名
- 删除镜像
glance image-delete 镜像ID
openstack image delete 镜像ID或镜像名
- 保存(下载)镜像
glance image-download 镜像ID > 镜像文件.qcow2
openstack image save 镜像ID或镜像名 > 镜像文件.qcow2
- 参数解释
- 镜像名为glance中的某个镜像
- –file 或 > 导出镜像
为glance中的某个镜像 - –file 或 > 导出镜像