流程是下面的模板安装脚本,将对应的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. BZOJ 3997 组合数学

    好厉害. 注意到到了(i,j)就一定到不了(i-1,j+1),那么可以dp啦.dp[i][j]表示(i,j)右上角都清了的方案数. #include<iostream> #include& ...

  2. iOS ARC和MRC混编

    如果一个工程为MRC,其中需要添加ARC的文件: 选择target  ->  build phases  ->  compile sources  ->单击ARC的文件将compil ...

  3. 自定义NavigationBar

    [self.navigationController.navigationBarsetHidden:YES]; CGRect screenRect = [[UIScreen mainScreen] b ...

  4. URAL 2040 (回文自动机)

    Problem Palindromes and Super Abilities 2 (URAL2040) 题目大意 给一个字符串,从左到右依次添加,询问每添加一个字符,新增加的回文串数量. 解题分析 ...

  5. mysql 获得当前月1号的日期 和 0点日期方法

    day)) 当月0点时间:2015-12-01 00:00:00 day)) 当月1号时间:2015-12-01 10:45:22 day) 2015-12-01 <!-- 查询上月债权额度 - ...

  6. JavaScript数据结构——链表

    链表:存储有序的元素集合,但不同于数组,链表中的元素在内存中不是连续放置的.每个元素由一个存储元素本身的节点和一个指向下一个元素的引用(也称指针或链接)组成. 好处:可以添加或移除任意项,它会按需扩容 ...

  7. Nexus仓库构建

    1 . 私服简介 私服是架设在局域网的一种特殊的远程仓库,目的是代理远程仓库及部署第三方构件.有了私服之后,当 Maven 需要下载构件时,直接请求私服,私服上存在则下载到本地仓库:否则,私服请求外部 ...

  8. less 快捷操作

    查找操作: /pattern    向前查找包含pattern的行 ?pattern 向后查找包含pattern的行 n 查找下一个pattern 的行 N 查找上一个pattern的行 ESC-u ...

  9. web项目中各种路径的获取HttpServletRequest

    以工程名为/DemoWeb为例: 访问的jsp为:http://localhost:8080/DemoWeb/test/index.jsp 1 JSP中获得当前应用的相对路径和绝对路径 (1)得到工程 ...

  10. Letter Combinations of a Phone Number

    Given a digit string, return all possible letter combinations that the number could represent. A map ...