1、执行环境变量
. admin-openrc.sh
2、下载镜像
wget http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1907.qcow2
//可以替换为国内镜像
wget http://mirrors.nju.edu.cn/centos-cloud/centos/7/images/CentOS-7-x86_64-GenericCloud-1907.qcow2
查询对应版本
3、上传镜像前修改密码
root@manage:~/image# virt-customize -a CentOS-7-x86_64-GenericCloud-1907.qcow2 --root-password password:123456
[ 0.0] Examining the guest ...
[ 28.3] Setting a random seed
[ 28.3] Setting passwords
[ 29.8] Finishing off
4、执行上传
方法1:上传镜像
glance image-create --name "centos7.7" --file CentOS-7-x86_64-GenericCloud-1907.qcow2 \
--disk-format qcow2 --container-format bare --visibility public --progress
[==============