锐捷JCOS云平台制作云主机镜像

准备qcow2格式镜像
下载地址:http://pan.baidu.com/s/1i46Ahdr 密码:8rdg
主机登入密码均为:intel@123
ubuntu系统不可直接root用户登录,先用intel用户登录。
镜像均为吴业亮前辈制作,仅可用为学习用途!


利用ssh登入节点并将镜像上传至root下
首先查询镜像虚拟大小,后面会用到
qemu-img -info 镜像名称


image: centos_1.qcow2
file format: qcow2
virtual size: 50G (53687091200 bytes) //虚拟大小
disk size: 571M
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false


制作镜像
[root@node-1 ~]#glance image-create --name 镜像名称 --is-public true --container-format=bare --disk-format=qcow2 --min-ram=1024 --property architecture=x86_64 --property os_distro=系统名称 --property os_version=系统版本 --property vol_size=卷大小 --file 镜像名.qcow2 –-progress
例如:glance image-create --name CentOS7 --is-public true --container-format=bare --disk-format=qcow2 --min-ram=2048 --property architecture=x86_64 --property os_distro=centos --property os_version=7 --property vol_size=50 --file centos_1.qcow2 --progress
这时会让你输入一个用户
[root@node-1 ~]#. openrc //输入一个用户


[=============================>] 100%
±------------------------±---------------------------------------------------------------------------------+
| Property | Value |
±------------------------±---------------------------------------------------------------------------------+
| Property ‘architecture’ | x86_64 |
| Property ‘os_distro’ | centos |
| Property ‘os_version’ | 7 |
| Property ‘vol_size’ | 50 |
| checksum | ce66426edf1642e7f33431733a44930e |
| container_format | bare |
| created_at | 2019-03-22T08:49:15 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | a58fa8f8-181c-4c41-8026-ac04092f80d1 |
| is_public | True |
| location | rbd://1aecccc7-1c1b-493d-89d1-affee72ad1e6/images/a58fa8f8-181c- |
| | 4c41-8026-ac04092f80d1/snap |
| min_disk | 0 |
| min_ram | 2048 |
| name | CentOS7 |
| owner | a5cedb16b0e3454283ba848ff6b7dcee |
| protected | False |
| size | 599124480 |
| status | active |
| updated_at | 2019-03-22T08:49:28 |
| virtual_size | None |
±------------------------±---------------------------------------------------------------------------------+


得到ID
[root@node-1 ~]# cinder create --image-id 镜像ID --display-name 镜像名卷大小 --metadata awcloud_public_image=yes
例如:cinder create --image-id a58fa8f8-181c-4c41-8026-ac04092f80d1 --display-name CentOS7 50 --metadata awcloud_public_image=yes


±--------------------±-------------------------------------+
| Property | Value |
±--------------------±-------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2019-03-22T08:51:08.739818 |
| display_description | None |
| display_name | CentOS7 |
| encrypted | False |
| id | 975d54ea-e818-441b-9ea6-3e52c031ddc4 |
| image_id | a58fa8f8-181c-4c41-8026-ac04092f80d1 |
| metadata | {u’awcloud_public_image’: u’yes’} |
| multiattach | false |
| size | 50 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| volume_type | capacity |
±--------------------±-------------------------------------+


查看制作进度
#cinder list在这里插入图片描述
//downloading表示正在制作
在这里插入图片描述
available 制作成功,就可以在云平台看到镜像可用

博主在实验中发现一个镜像不能创建多台云主机,一个镜像只能制作一台,所以可以复制镜像改个名字制作多个镜像来创建多台主机。

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值