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
[==============

本文介绍了如何在OpenStack环境中操作镜像,包括设置环境变量、下载镜像、修改上传镜像密码、上传镜像,并详细讲解了如何将raw格式镜像转换为vmdk格式,以便在VMware中查看和使用。
最低0.47元/天 解锁文章
2235

被折叠的 条评论
为什么被折叠?



