【Centos7系列】Openstack-glance组件基础命令

Iceboundnana 发布于 2023-08-08 1.15k 次阅读


  1. 上传镜像至 OpenStack
[root@controller ~]# glance image-create --name "Centos_7.2" --disk-format qcow2 --container-format bare --progress < /opt/openstack/images/CentOS_7.2_x86_64_XD.qcow2 
[=============================>] 100%
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | ea197f4c679b8e1ce34c0aa70ae2a94a     |
| container_format | bare                                 |
| created_at       | 2022-04-28T00:54:08Z                 |
| disk_format      | qcow2                                |
| id               | 2eabfaf3-1e77-4c3c-9e47-fbf5c1c6fe78 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | Centos_7.2                           |
| owner            | 4f1f49c7caec45f9b6a61133818c8b62     |
| protected        | False                                |
| size             | 400752640                            |
| status           | active                               |
| tags             | []                                   |
| updated_at       | 2022-04-28T00:54:11Z                 |
| virtual_size     | None                                 |
| visibility       | shared                               |
+------------------+--------------------------------------+
  1. 查看镜像列表
[root@controller ~]# glance image-list
+--------------------------------------+------------+
| ID                                   | Name       |
+--------------------------------------+------------+
| 2eabfaf3-1e77-4c3c-9e47-fbf5c1c6fe78 | Centos_7.2 |
+--------------------------------------+------------+
  1. 查看镜像详细信息
[root@controller ~]# glance image-show 2eabfaf3-1e77-4c3c-9e47-fbf5c1c6fe78
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | ea197f4c679b8e1ce34c0aa70ae2a94a     |
| container_format | bare                                 |
| created_at       | 2022-04-28T00:54:08Z                 |
| disk_format      | qcow2                                |
| id               | 2eabfaf3-1e77-4c3c-9e47-fbf5c1c6fe78 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | Centos_7.2                           |
| owner            | 4f1f49c7caec45f9b6a61133818c8b62     |
| protected        | False                                |
| size             | 400752640                            |
| status           | active                               |
| tags             | []                                   |
| updated_at       | 2022-04-28T00:54:11Z                 |
| virtual_size     | None                                 |
| visibility       | shared                               |
+------------------+--------------------------------------+
  1. 删除镜像
[root@controller ~]# glance image-delete 2eabfaf3-1e77-4c3c-9e47-fbf5c1c6fe78
此作者没有提供个人介绍。
最后更新于 2023-08-08