OpenStack镜像服务基本操作
查询Glance服务状态
#glance-control all status
[root@controller ~]# glance-control all status
glance-api (pid ) is running...
glance-registry (pid ) is running...
glance-scrubber is stopped
查询glance-api版本
# glance-api --version
[root@controller ~]# glance-api --version
2014.1.
查询glance-control版本
# glance-control --version
[root@controller ~]# glance-control --version
2014.1.
下面的命令作用是启动相关服务,并设置为开机启动。
# service openstack-glance-api start
# service openstack-glance-registry start
# chkconfig openstack-glance-api on
# chkconfig openstack-glance-registry on
下载CirrOS镜像文件
# mkdir /tmp/images
# cd /tmp/images/
# wget http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img
查看文件信息
# file cirros-0.3.4-x86_64-disk.img
[root@controller ~]# file cirros-0.3.-x86_64-disk.img
cirros-0.3.-x86_64-disk.img: Qemu Image, Format: Qcow , Version:
使用命令行创建镜像
# glance image-create --name "cirros-0.3.4-x86_64-disk" --disk-format qcow2 --container-format bare --is-public True --progress < cirros-0.3.4-x86_64-disk.img
[root@controller ~]# glance image-create --name "cirros-0.3.4-x86_64-disk" --disk-format qcow2 --container-format bare --is-public True --progress < cirros-0.3.-x86_64-disk.img
[=============================>] %
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
| container_format | bare |
| created_at | --26T19:: |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | c0508642-29f2-4d57-b7ca-7417668e1908 |
| is_public | True |
| min_disk | |
| min_ram | |
| name | cirros-0.3.-x86_64-disk |
| owner | 18e38545a20f4fbb8dba8944118d43bc |
| protected | False |
| size | |
| status | active |
| updated_at | --26T19:: |
| virtual_size | None |
+------------------+--------------------------------------+
创建成功后,可以登录界面,查看镜像信息

查看镜像列表
# glance image-list
[root@controller ~]# glance image-list
+--------------------------------------+--------------------------+-------------+------------------+------------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+--------------------------+-------------+------------------+------------+--------+
| b3f9088f-ca51-4a03-ab9a-66e9c4baacce | cirros | qcow2 | bare | | active |
| c0508642-29f2-4d57-b7ca-7417668e1908 | cirros-0.3.-x86_64-disk | qcow2 | bare | | active |
| b408a7da-7fff--8f17-9e48f34553ef | cirros-test | qcow2 | bare | | active |
| c6e2e980-935c--94ae-0595988065d2 | Cloud_Centos6.5_64bit | qcow2 | bare | | active |
| 54e5faa2--40de-89ce-4511623ce649 | Cloud_win7_64bit | qcow2 | bare | | active |
+--------------------------------------+--------------------------+-------------+------------------+------------+--------+
查看镜像的详细信息
参数可以是镜像id或者镜像名称
# glance image-show Cloud_Centos6.5_64bit
[root@controller ~]# glance image-show Cloud_Centos6.5_64bit
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | d6e6a71c69f1996350970489f9513402 |
| container_format | bare |
| created_at | --22T10:: |
| deleted | False |
| disk_format | qcow2 |
| id | c6e2e980-935c--94ae-0595988065d2 |
| is_public | False |
| min_disk | |
| min_ram | |
| name | Cloud_Centos6.5_64bit |
| owner | 18e38545a20f4fbb8dba8944118d43bc |
| protected | False |
| size | |
| status | active |
| updated_at | --22T10:: |
+------------------+--------------------------------------+
更改镜像
如果需要改变镜像启动硬盘最低要求值(min-disk)时,min-disk默认单位为G
更新镜像信息
# glance image-update --min-disk=1 cirros-0.3.4-x86_64-disk
[root@controller ~]# glance image-update --min-disk= cirros-0.3.-x86_64-disk
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
| container_format | bare |
| created_at | --26T19:: |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | c0508642-29f2-4d57-b7ca-7417668e1908 |
| is_public | True |
| min_disk | |
| min_ram | |
| name | cirros-0.3.-x86_64-disk |
| owner | 18e38545a20f4fbb8dba8944118d43bc |
| protected | False |
| size | |
| status | active |
| updated_at | --26T19:: |
| virtual_size | None |
+------------------+--------------------------------------+
删除镜像
# glance image-delete cirros-0.3.4-x86_64-disk
[root@controller ~]# glance image-delete cirros-0.3.-x86_64-disk
[root@controller ~]#
[root@controller ~]# glance image-list
+--------------------------------------+-----------------------+-------------+------------------+------------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+-----------------------+-------------+------------------+------------+--------+
| b3f9088f-ca51-4a03-ab9a-66e9c4baacce | cirros | qcow2 | bare | | active |
| b408a7da-7fff--8f17-9e48f34553ef | cirros-test | qcow2 | bare | | active |
| c6e2e980-935c--94ae-0595988065d2 | Cloud_Centos6.5_64bit | qcow2 | bare | | active |
| 54e5faa2--40de-89ce-4511623ce649 | Cloud_win7_64bit | qcow2 | bare | | active |
+--------------------------------------+-----------------------+-------------+------------------+------------+--------+
end
OpenStack镜像服务基本操作的更多相关文章
- OpenStack 镜像服务 Glance部署(六)
Glance介绍 创建虚拟机我们需要有glance的支持,因为glance是提供镜像的服务. Glance有两个比较重要的服务: Glance-api:接受云系统镜像的构建.删除.读取请求 Glanc ...
- OpenStack 镜像服务 Glance部署(七)
创建虚拟机我们需要有glance的支持,因为glance是提供镜像的服务. Glance有两个比较重要的服务: Glance-api:接受云系统镜像的构建.删除.读取请求 Glance-Registr ...
- openstack镜像服务(glance)
1.Use the database access client to connect to the database server as the root user: $ mysql -u root ...
- 云计算管理平台之OpenStack镜像服务glance
一.glance简介 openstack中的glance服务是用来存储在openstack上启动虚拟机所需镜像:它主要用于发现.注册及检索虚拟机镜像:它通过提供RESTful风格的api对外提供服务: ...
- 【openstack N版】——镜像服务glance
一.openstack镜像服务glance 1.1 glance介绍 glance主要是由三部分组成 glance-api:接收云系统镜像的创建,删除,读取请求,类似nova-api,通过其他模块(g ...
- Openstack(八)部署镜像服务glance
8.1glance镜像服务介绍 Glance是OpenStack镜像服务组件,glance服务默认监听在9292端口,其接收REST API请求,然后通过其他模块(glance-registry及im ...
- Openstack glance 镜像服务 (五)
Openstack glance 镜像服务 (五) 引用: 官方文档glance安装 https://docs.openstack.org/ocata/zh_CN/install-guide-rdo/ ...
- OpenStack-Ocata版+CentOS7.6 云平台环境搭建 — 4.镜像服务(glance)
节点配置信息说明: 控制节点:controller: IP:192.168.164.128 hostname&hosts:likeadmin 计算加点:Nova: IP:192.168.164 ...
- 4.openstack之mitaka搭建glance镜像服务
部署镜像服务 一:安装和配置服务 1.建库建用户 mysql -u root -p CREATE DATABASE glance; GRANT ALL PRIVILEGES ON glance.* T ...
随机推荐
- 《DSP using MATLAB》Problem5.16
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- day29akka
PS:AKKA之前要实现并发编程,通常要借用netty框架,现在如果又要高并发又要分布式就使用akka框架这个akka在客户端和服务端每一端都相当于一个actor,尤其是服务端需要一个总管进行管理 P ...
- 计算机网络-数据结构-MAC帧头-IP头-TCP头-UDP头
第0章 数据是如何进行一步步的封装的 第一章:mac帧头定义 帧头数据结构的定义: 一.MAC帧头定义 /*数据帧定义,头14个字节,尾4个字节*/ typedef struct _MAC_FRAME ...
- MySQL--Checkpoint基础
===================================================== Checkpint 分两种:Sharp Checkpoint : 在服务器正常关闭时,将所有 ...
- windows 8,关闭随意窗体都提示“已停止工作”的解决的方法
电脑用的好好的,突然出现了关闭随意窗体都提示"已停止工作",每次都是这样.想想也就是偶尔优化一下,近期也没有改动过什么系统设置呀,突然想到昨晚JLink_V8固件丢失 ...
- Vue学习入门
1.安装WebStorm: 2.激活WebStorm:https://blog.csdn.net/qq_40147863/article/details/81317709 3.安装全局脚手架:npm ...
- MySQL 数据类型对比:char 与 varchar;varchar 与 text;datetime 与 timestamp;blob 与 text;
char 与 varchar char(n) 若存入字符数小于n,则以空格补于其后,查询之时再将空格去掉.所以 char 类型存储的字符串末尾不能有空格,varchar 不限于此. char(n) 固 ...
- ELK入门以及常见指令
ES的资源: https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started.htmlhttps://w ...
- Flume 多个agent串联
多个agent串联 采集需求:比如业务系统使用log4j生成的日志,日志内容不断增加,需要把追加到日志文件中的数据实时采集到hdfs,使用agent串联 根据需求,首先定义以下3大要素 第一台flum ...
- SDI初识
SDI初识 SDI接口,即“数字分量串行接口(Serial Digital Interface)”.按照速率可以分为: 标准清晰度SD-SDI,速率为270Mb/s; 高清标准HD-SDI,速率为1. ...