流程是下面的模板安装脚本,将对应的hypervisor模板下载下来并另存为临时文件,并解压缩,并将其移动到二级存储相应目录下,仅完成此工作。

[root@manage nfs]# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /nfs/secondary/ -u http://192.168.1.98/4/systemvm64template-4.4.1-xen.vhd.bz2 -h xenserver -F
--2016-03-29 16:39:08-- http://192.168.1.98/4/systemvm64template-4.4.1-xen.vhd.bz2
Connecting to 192.168.1.98:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 253567236 (242M) [application/x-bzip2]
Saving to: “/usr/share/cloudstack-common/scripts/storage/secondary/47ee0613-9682-450e-8357-6f80cec3d43c.vhd” 100%[===================================================================================================================================================================================================>] 253,567,236 11.0M/s in 22s 2016-03-29 16:39:30 (11.1 MB/s) - “/usr/share/cloudstack-common/scripts/storage/secondary/47ee0613-9682-450e-8357-6f80cec3d43c.vhd” saved [253567236/253567236] Uncompressing to /usr/share/cloudstack-common/scripts/storage/secondary/47ee0613-9682-450e-8357-6f80cec3d43c.vhd.tmp (type bz2)...could take a long time
Moving to /nfs/secondary/template/tmpl/1/1///47ee0613-9682-450e-8357-6f80cec3d43c.vhd...could take a while
Successfully installed system VM template to /nfs/secondary/template/tmpl/1/1/ [root@manage nfs]# cat secondary/template/tmpl/1/1/template.properties
filename=47ee0613-9682-450e-8357-6f80cec3d43c.vhd
description=SystemVM Template
checksum=
hvm=false
size=2626564608
vhd=true
id=1
public=true
vhd.filename=47ee0613-9682-450e-8357-6f80cec3d43c.vhd
uniquename=routing-1
vhd.virtualsize=2626564608
virtualsize=2626564608
vhd.size=2626564608 [root@manage nfs]# pwd
/nfs
[root@manage nfs]# ls -R
.:
primary secondary
./primary:
704eb654-a620-42e9-9807-407c5406142e.vhd hb-8ec935b2-8f0f-4740-be78-3546cbfa2115 hb-9385fe4b-00eb-4617-ab11-8239ee3ffcc8
./secondary:
template
./secondary/template:
tmpl
./secondary/template/tmpl:
1
./secondary/template/tmpl/1:
1
./secondary/template/tmpl/1/1:
47ee0613-9682-450e-8357-6f80cec3d43c.vhd template.properties 这个时候需要等待cpvm与ssvm启动正常,再做下面的上传镜像操作 没上传iso镜像时,是下面的目录层次结构
一个vhd是之前上传的xen(d43c.vhd)模板,另外两个是默认的模板
CentOS 5.6(64-bit) no GUI (XenServer)和
SystemVM Template (XenServer) ./secondary/template/tmpl:
1
./secondary/template/tmpl/1:
1 5
./secondary/template/tmpl/1/1:
47ee0613-9682-450e-8357-6f80cec3d43c.vhd template.properties
./secondary/template/tmpl/1/5:
dnld1575080711759885651tmp_ dnld8583106633401848920tmp_ template.properties 上传镜像之后,多了一个2目录,这个目录放的是上传的centos7.iso镜像,这个过程比较慢,先要上传有进度条的(dnld***命名的临时文件),再要安装完成(就变成iso文件了)
./secondary/template/tmpl:
1 2
./secondary/template/tmpl/1:
1 5
./secondary/template/tmpl/1/1:
47ee0613-9682-450e-8357-6f80cec3d43c.vhd template.properties
./secondary/template/tmpl/1/5:
dnld1575080711759885651tmp_ dnld8583106633401848920tmp_ template.properties
./secondary/template/tmpl/2:
202
./secondary/template/tmpl/2/202:
dnld5726001885473025948tmp_ template.properties 这是完成安装centos7.iso安装后的结构,可以看到上面的tmp_结尾的文件已经变成了.iso文件了,
不过还不清楚CentOS 5.6(64-bit) no GUI (XenServer)这个模板为什么一直不能正常完成
./secondary/template/tmpl/1/1:
47ee0613-9682-450e-8357-6f80cec3d43c.vhd template.properties
./secondary/template/tmpl/1/5:
dnld1575080711759885651tmp_ template.properties
./secondary/template/tmpl/2:
202
./secondary/template/tmpl/2/202:
202-2-5a60b882-5ce5-38ed-914c-1be63f751b68.iso template.properties 主存储的变化
按照下面的文件filelog.txt猜测的。从142e.vhd(完成之后会消失)生成b720.vhd,再从b720.vhd克隆两个虚拟磁盘分别是0b8b.vhd与1064.vhd
下面的196c是主存储上的142e.vhd
[root@xs1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 4.0G 2.0G 1.9G 52% /
none 1021M 44K 1021M 1% /dev/shm
/opt/xensource/packages/iso/XenCenter.iso
52M 52M 0 100% /var/xen/xc-install
192.168.1.250:/nfs/primary
493G 14G 454G 3% /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c
192.168.1.250:/nfs/secondary/template/tmpl/2/202
493G 14G 454G 3% /var/run/sr-mount/018eb7df-a2a6-14f6-1a83-6a583d44c0b3 [root@manage primary]# cat filelog.txt
2016-03-29 17:01:58.517882 log: /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c/704eb654-a620-42e9-9807-407c5406142e.vhd vdi_clone 29c8e045-2676-a09c-b81e-7e3be3e3196c 704eb654-a620-42e9-9807-407c5406142e 737ec7e9-6a53-4b31-8b22-9ceb64dbb720
2016-03-29 17:01:58.770606 end: /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c/704eb654-a620-42e9-9807-407c5406142e.vhd done
2016-03-29 17:02:04.854345 log: /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c/737ec7e9-6a53-4b31-8b22-9ceb64dbb720.vhd vdi_clone 29c8e045-2676-a09c-b81e-7e3be3e3196c 737ec7e9-6a53-4b31-8b22-9ceb64dbb720 264f287d-a34b-47b6-8ae6-02beaa6a0b8b
2016-03-29 17:02:05.082699 end: /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c/737ec7e9-6a53-4b31-8b22-9ceb64dbb720.vhd done
2016-03-29 17:02:09.239944 log: /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c/737ec7e9-6a53-4b31-8b22-9ceb64dbb720.vhd vdi_clone 29c8e045-2676-a09c-b81e-7e3be3e3196c 737ec7e9-6a53-4b31-8b22-9ceb64dbb720 d6b7bc32-8c66-4a72-aa5b-d36592f61064
2016-03-29 17:02:10.449772 end: /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c /var/run/sr-mount/29c8e045-2676-a09c-b81e-7e3be3e3196c/737ec7e9-6a53-4b31-8b22-9ceb64dbb720.vhd done
[root@manage primary]# pwd
/nfs/primary [root@manage primary]# ll
total 2776864
-rw-r--r-- 1 root root 240188416 Mar 29 17:54 264f287d-a34b-47b6-8ae6-02beaa6a0b8b.vhd
-rw-r--r-- 1 root root 9728 Mar 29 17:02 737ec7e9-6a53-4b31-8b22-9ceb64dbb720.vhd
-rw-r--r-- 1 root root 2626564608 Mar 29 17:01 89ebfb26-03d4-4f0b-9c0d-628aa2ad6bb4.vhd
-rw-r--r-- 1 root root 246937600 Mar 29 17:54 d6b7bc32-8c66-4a72-aa5b-d36592f61064.vhd
-rw-r--r-- 1 root root 1476 Mar 29 17:02 filelog.txt
-rw-r--r-- 1 root root 11 Mar 29 17:53 hb-8ec935b2-8f0f-4740-be78-3546cbfa2115
-rw-r--r-- 1 root root 11 Mar 29 17:53 hb-9385fe4b-00eb-4617-ab11-8239ee3ffcc8

Iaas-cloudstack2的更多相关文章

  1. 【转】《从入门到精通云服务器》第七讲—IAAS、PAAS、SAAS

    Saas.Paas.IaaS这三个词,一直困扰众人很久.就拿字面意思来说,分别是:软件即服务,平台即服务,设施即服务.小编表示这个不往深了讲,真心看不懂,还容易弄混淆.今天我们就来扒一扒这三者的深层含 ...

  2. 云计算的三种服务模式:SaaS/PaaS/IaaS

    转载http://blog.chinaunix.net/uid-22414998-id-3141499.html 定义 云计算主要分为三种服务模式,而且这个三层的分法重要是从用户体验的角度出发的: S ...

  3. what's cloud computing? IaaS

    Cloud computing has changed the ITC industry. Companies like Amazon, Google and Microsoft have built ...

  4. IaaS、PaaS、SaaS 之间的区别

    IaaS.PaaS.SaaS 之间的区别 “云服务”现在已经快成了一个家喻户晓的词了.如果你还不知道PaaS.IaaS和SaaS的区别,那就太out了. “云”其实是互联网的一个隐喻,“云计算”其实就 ...

  5. IaaS/PaaS/SaaS

    如果你是一个网站站长,想要建立一个网站.不采用云服务,你所需要的投入大概是:买服务器,安装服务器软件,编写网站程序.现在你追随潮流,采用流行的云计算,如果你采用IaaS服务,那么意味着你就不用自己买服 ...

  6. IaaS, PaaS, SaaS 解释

    IaaS.PaaS.SaaS作为云计算三种服务模式,下面会着重介绍他们的定义.作用.功能.对应产品以及他们之间的关系等. 一.定义:     SaaS:Software as a Service,软件 ...

  7. 移动App开发需要更多的PaaS平台而不是IaaS

    时代的变迁,创业的大潮,越来越多的人关注了有点开发,越来越多的人了解了互联网服务术语:PaaS.IaaS.SaaS.BaaS等.今天大家在开发App的时候这么多复杂的云服务如何来选择呢? IaaS服务 ...

  8. Windows Azure Cloud Service (38) 微软IaaS与PaaS比较

    <Windows Azure Platform 系列文章目录> 最近一直想总结Azure IaaS和PaaS的区别与比较,写个博文详细说明一下.建议读者在阅读之前,先熟悉微软PaaS和Ia ...

  9. Windows Azure Virtual Machine (1) IaaS用户手册

    <Windows Azure Platform 系列文章目录> Azure IaaS用户手册  - Azure IaaS相关技术- Azure虚拟机成本分析- 创建Azure虚拟机- 使用 ...

  10. OpenStack Austin 峰会观察:OpenStack as IaaS 已是过去,Solutions on OpenStack 才是未来

    虽然搞 OpenStack 前后也有几年,但是今年在美国 Austin 举办的 OpenStack Summit 我还是第一次参加.回来之后,一直还在回味,觉得要写点东西,将我在这次峰会上的观察和思考 ...

随机推荐

  1. (spring-第8回【IoC基础篇】)BeanDefinition在IoC容器中的注册

    在spring中,所有的bean都是由BeanFactory进行管理的.下面是BeanFactory的类体系结构: 我们清楚的看到,DefaultListableBeanFactory继承了BeanF ...

  2. Ubuntu安装Osmocom-BB一只猿多频点WEB脚本

    LAMP(Linux- Apache-MySQL-PHP)网站架构是目前国际流行的Web框架,该框架包括:Linux操作系统,Apache网络服务器,MySQL数据 库,Perl.PHP或者Pytho ...

  3. 第一课~Django~简介

    Django一个可以是Web开发工作者开发工作愉快并且高效的Web 框架 . 使用Django , 使你能够以最小的代建构建和维护高质量的Web应用 . 从好的方面来看 , Web开发激动人心并且富有 ...

  4. HDOJ-三部曲-1001-Flip Game

    Flip Game Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 131072/65536K (Java/Other) Total Su ...

  5. Executing modules as scripts

    When you run a Python module with python fibo.py <arguments> the code in the module will be ex ...

  6. Drools规则文件结构说明

    一.规则文件构成 package(规则文件所在包) import(导入java包) global(规则文件中的"全局变量") function(函数) query(查找) rule ...

  7. ERP权限系统(七)

    添加链接权限的字段: //权限管理 n.Target = "MainFrame"; //折叠 TreeView1.Nodes.Add(n); n.Expanded = false;

  8. 配置PhoneGap 到iOS

    下载 phonegap安装phonegap之前需要NodeJS环境,下载NodeJS并安装.安装环境的目的是为了使用phonegap命令行. 3. 安装phonegap使用命令    $phonega ...

  9. 《JS高程》事件学习笔记

    事件:文档或浏览器窗口中发生的一些特定的交互瞬间,也即用户或浏览器自身执行的某种动作. -------------------------------------------------------- ...

  10. Netty ChannelOption 解释

    Name Associated setter method "writeBufferHighWaterMark" 默认 64 * 1024(用法未知) "writeBuf ...