openstack 镜像上传和下载

本文介绍了如何在OpenStack环境中使用管理员权限进行镜像的上传和下载。首先通过`admin-openrc.sh`获取操作权限,然后详细说明了Linux镜像的上传命令。同时,提供了查询和下载镜像的命令,帮助用户在控制节点上执行这些操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

$ . admin-openrc.sh
上传镜像
Linux镜像上传命令

glance image-create --disk-format=qcow2 --container-format=bare --visibility=public --file <镜像文件全路径> --name <镜像名称> --property hw_scsi_model=virtio-scsi  --property hw_qemu_guest_agent=yes --property os_require_quiesce=yes --property os_admin_user=root
Windows镜像上传命令>glance image-create --disk-format=qcow2 --container-format=bare --visibility=public --file <镜像文件全路径> --name <镜像名称> --property hw_scsi_model=virtio-scsi  --property hw_qemu_guest_agent=yes --property os_require_quiesce=yes --property os_admin_user=Administrator --property os_type=windows

[root@********]<font color=red># glance image-create --disk-format=qcow2 --container-format=bare --visibility=public --file /root/images/Windows-2012R2.qcow2 --name Windows-2012R2.qcow2 --property hw_qemu_guest_agent=yes --property os_require_quiesce=yes --property os_admin_user=Administrator --property os_type=windows

下载镜像 首先在control01的物理节点上获取用户操作权限,然后运行命令查询和下载镜像:
查询镜像命令

glance image-list

下载镜像命令

glance image-download --file <存放的文件路径和名称> <uuid>
[root@contrl01 msp]<font color=red>#glance image-download --file /root/images/Windows-2012R2.qcow2 1db854f6-88a9-4086-bd36-6ee083340665
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值