之前常用些Maind Map之类的工具,有些工具功能还相当的复杂和强大;今天偶遇MindNode,装上之后发现风格极为简约,功能包括建立节点、子节点、创建连接等;我目前还想不到有什么功能是必须的,而这个软件没有的,推荐一下,Mac用户可以尝试一下。

Testing environment: I have two hight spec laptop connecting to one wireless router, they all have internet access. Install process: step 1 install RHEL6 for management server; step 2 install CloudStack software on management server; step 3 install XenServer; step 4 CloudStack initialization and configure. Install RHEL6 64bit OS notes:

  1. User FQDN as hostname, for example cloudstack.xen.cn; use this command to confirm: hostname –fqdn

  2. Use 0~3.xenserver.pool.ntp.org as ntp server

  3. Install KDE desktop, with MySQL/Clent

  4. Configure static ip address, for sure both DNS and GW are all right, for internet download.

  5. Shutdown iptables firewall, by this way you could ignore port settings of iptables, this is not secure, but you can speed up a little bit

Setting up local DVD as yum source, in order to install dependance packages of Cladestack, mount DVD to /media folder, you have to install following rpm packages before create a new yum source. [shell] mount /dev/cdrom /media yum install deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm yum install python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm yum install createrepo-0.9.8-4.el6.noarch.rpm [/shell]

Crete a new yum source file, see below: [shell] [root@cloudstack 1] cat /etc/yum.repos.d/rhel6.repo [rhel6] name=rhel6 baseurl=file:///media/ enabled=1 gpgcheck=0 [/shell]

Checking if new source file is loaded correctly: [shell] yum list [/shell]

Download CloudStack install package for RHEL 6, unzip it and execute install command [shell] tar xzvf CloudStack-oss-3.0.2-1-rhel6.2.tar.gz ./install Select m Select y [/shell]

You will see install script need yum to install all dependence rpm packages; you should get a different list as below:

[shell] tomcat6-lib                          noarch          6.0.24-33.el6               rhel6               2.9 M tomcat6-servlet-2.5-api              noarch          6.0.24-33.el6               rhel6                93 k ws-commons-util                      noarch          1.0.1-13.el6                rhel6                37 k wsdl4j                               noarch          1.5.2-7.8.el6               rhel6               157 k xml-commons-apis                     x86_64          1.3.04-3.6.el6              rhel6               439 k xml-commons-resolver                 x86_64          1.1-4.18.el6                rhel6               145 k

Transaction Summary

Install      38 Package(s)

Total download size: 91 M Installed size: 172 M Is this ok [y/N]: y Downloading Packages: ———————————————————————————————————— Total                                                                       115 MB/s |  91 MB     00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : libgcj-4.4.6-3.el6.x86_64                                                               1/38 Installing : jakarta-commons-logging-1.0.4-10.el6.noarch                                             2/38 Installing : cloud-deps-3.0.2-1.el6.x86_64                                                           3/38 Installing : cloud-utils-3.0.2-1.el6.x86_64                                                          4/38

Installed: cloud-client.x86_64 0:3.0.2-1.el6

Dependency Installed: axis.noarch 0:1.2.1-7.2.el6                            bcel.x86_64 0:5.2-7.2.el6 classpathx-jaf.x86_64 0:1.0-15.4.el6                   classpathx-mail.noarch 0:1.1.1-9.4.el6 cloud-agent-scripts.x86_64 0:3.0.2-1.el6               cloud-client-ui.x86_64 0:3.0.2-1.el6 cloud-core.x86_64 0:3.0.2-1.el6                        cloud-deps.x86_64 0:3.0.2-1.el6 cloud-python.x86_64 0:3.0.2-1.el6                      cloud-server.x86_64 0:3.0.2-1.el6 cloud-setup.x86_64 0:3.0.2-1.el6                       cloud-utils.x86_64 0:3.0.2-1.el6 ecj.x86_64 1:3.4.2-6.el6                               ipmitool.x86_64 0:1.8.11-12.el6 jakarta-commons-collections.noarch 0:3.2.1-3.4.el6     jakarta-commons-daemon.x86_64 1:1.0.1-8.9.el6 jakarta-commons-dbcp.noarch 0:1.2.1-13.8.el6           jakarta-commons-discovery.noarch 1:0.4-5.4.el6 jakarta-commons-httpclient.x86_64 1:3.1-0.6.el6        jakarta-commons-logging.noarch 0:1.0.4-10.el6 jakarta-commons-pool.x86_64 0:1.3-12.7.el6             java-1.5.0-gcj.x86_64 0:1.5.0.0-29.1.el6 java_cup.x86_64 1:0.10k-5.el6                          libgcj.x86_64 0:4.4.6-3.el6 log4j.x86_64 0:1.2.14-6.4.el6                          mx4j.noarch 1:3.0.1-9.13.el6 regexp.x86_64 0:1.5-4.4.el6                            sinjdoc.x86_64 0:0.5-9.1.el6 tomcat6.noarch 0:6.0.24-33.el6                         tomcat6-el-2.1-api.noarch 0:6.0.24-33.el6 tomcat6-jsp-2.1-api.noarch 0:6.0.24-33.el6             tomcat6-lib.noarch 0:6.0.24-33.el6 tomcat6-servlet-2.5-api.noarch 0:6.0.24-33.el6         ws-commons-util.noarch 0:1.0.1-13.el6 wsdl4j.noarch 0:1.5.2-7.8.el6                          xml-commons-apis.x86_64 0:1.3.04-3.6.el6 xml-commons-resolver.x86_64 0:1.1-4.18.el6

Complete! Done [/shell] At this point, management server has been installed successfully on my 8GB laptop.

Install MySQL server from CloudStack install script: [shell] ./install

select d Installing the MySQL server… Loaded plugins: product-id, refresh-packagekit, security, subscription-manager Updating certificate-based repositories. cloud-temp                                                                          | 2.6 kB     00:00 … rhel6                                                                               | 4.0 kB     00:00 … Setting up Install Process Package mysql-server-5.1.52-1.el6_0.1.x86_64 already installed and latest version Nothing to do Starting the MySQL server… Initializing MySQL database: Installing MySQL system tables… OK Filling help tables… OK

To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password ‘new-password’ /usr/bin/mysqladmin -u root -h cloudstack.xen.cn password ‘new-password’

Alternatively you can run: /usr/bin/mysql_secure_installation

which will also give you the option of removing the test databases and anonymous user created by default.  This is strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

[OK] Starting mysqld:                                          [OK] Done [/shell]

We had installed MySQL server successfully; some parameters must be changed from default value. I show my configure file as a simple bellow:

[shell] cat /etc/my.cfn [mysqld] datadir=/var/lib/mysql #Added for CloudStack innodb_rollback_on_timeout=1 innodb_lock_wait_timeout=600 max_connections=350 log-bin=mysql-bin binlog-format = ‘ROW’ #Above are for CloudStack socket=/var/lib/mysql/mysql.sock user=mysql

Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

[mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [/shell]

Restart MySQL server.

[shell] [root@cloudstack CloudStack-oss-3.0.2-1-rhel6.2] service mysqld restart Stop mysqld:                                              [OK] Starting mysqld:                                          [OK] [/shell]

Set MySQL root password: [shell] [root@cloudstack home] mysql -u root Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.1.52-log Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> set password = password(‘citrix’); Query OK, 0 rows affected (0.00 sec)

mysql> exit Bye [/shell]

Initialisation Cloudtack management server database. [shell] [root@cloudstack home] cloud-setup-databases cloud:citrix@localhost –deploy-as=root:citrix Mysql user name:cloud                                                           [ OK ] Mysql user password:citrix                                                      [ OK ] Mysql server ip:localhost                                                       [ OK ] Mysql server port:3306                                                          [ OK ] Mysql root user name:root                                                       [ OK ] Mysql root user password:citrix                                                 [ OK ] Checking Cloud database files …                                               [ OK ] Checking local machine hostname …                                             [ OK ] Checking SELinux setup …                                                      [ OK ] Detected local IP address as 192.168.10.15, will use as cluster management server node IP[ OK ] Preparing /etc/cloud/management/db.properties                                   [ OK ] Applying /usr/share/cloud/setup/create-database.sql                             [ OK ] Applying /usr/share/cloud/setup/create-schema.sql                               [ OK ] Applying /usr/share/cloud/setup/create-database-premium.sql                     [ OK ] Applying /usr/share/cloud/setup/create-schema-premium.sql                       [ OK ] Applying /usr/share/cloud/setup/server-setup.sql                                [ OK ] Applying /usr/share/cloud/setup/templates.sql                                   [ OK ] Applying /usr/share/cloud/setup/create-index-fk.sql                             [ OK ] Processing encryption …                                                       [ OK ] Finalizing setup …                                                            [ OK ]

CloudStack has successfully initialized database, you can check your database configuration in /etc/cloud/management/db.properties [/shell]

Database initialization successful, then we need to run CloudStack setup command. [shell] [root@cloudstack home] cloud-setup-management Starting to configure CloudStack Management Server: Configure sudoers …         [OK] Configure Firewall …        [OK] Configure CloudStack Management Server …[OK] CloudStack Management Server setup is Done! [/shell]

After we have installed CloudStack management server. We are going to create storage. I use my management server for setting up NFS share. It’s convenient and easy enough. But according CloudStack document, you’d better attached a 16 TB NFS storage on management server. If you have pls use it. For me 250 GB HD is good for my testing purpose. You may have one more Linux machine for NFS server, then you can follow my steps.

[shell] [root@cloudstack ~] service rpcbind start [root@cloudstack ~] service nfs start Start NFS server:                                            [OK] Stop NFS quota:                                            [OK] Start NFS service:                                        [OK] Start NFS mountd:                                          [OK] [root@cloudstack ~] chkconfig nfs on [root@cloudstack ~] chkconfig rpcbind on [root@cloudstack home] cd /home [root@cloudstack home] mkdir primary [root@cloudstack home] mkdir secondary [root@cloudstack home] vi /etc/exports   #set NFS path [root@cloudstack home] cat /etc/exports /home    *(rw,async,no_root_squash) [root@cloudstack home] exportfs -a [root@cloudstack home] exportfs /home              [/shell]

Edit /etc/sysconfig/nfs file, for sure it has follow parameter. [shell] MOUNTD_NFS_V3=”yes” LOCKD_TCPPORT=32803 LOCKD_UDPPORT=32769 MOUNTD_PORT=892 RQUOTAD_PORT=875 STATD_PORT=662 STATD_OUTGOING_PORT=2020 [/shell]

Restart NFS server, you’d better test it from a XenServer host. To for sure XenServer can read and write NFS share: [shell] [root@xs root]mkdir test [root@xs root]mount 192.168.10.15:/home  /root/test [root@xs root]ls test [root@xs root]touch testfile   #this file must be showed by ls on both management server and XenServer host. [/shell]

Test your intenet connection from management server, We need to download system vm template and install it on management server. [shell] /usr/lib64/cloud/agent/scripts/storage/secondary/cloud-install-sys-tmplt -m /home/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2 -h xenserver -F 正在解析主机 download.cloud.com… 207.171.189.81 正在连接 download.cloud.com|207.171.189.81|:80… 已连接。 已发出 HTTP 请求,正在等待回应… 200 OK 长度:140616708 (134M) [binary/octet-stream]

99% [===================================================================================================> ] 140,512,160  149K/s eta(英国中部时 99% [===================================================================================================> ] 140,551,600  145K/s eta(英国中部时 100%[====================================================================================================>] 140,616,708  155K/s   in 11m 27s 2012-06-29 20:03:57 (200 KB/s) - 已保存 “/usr/lib64/cloud/agent/scripts/storage/secondary/a5fc3577-c5e7-49ff-8fbf-ed88dc8aaff5.vhd” [140616708/140616708])

Uncompressing to /usr/lib64/cloud/agent/scripts/storage/secondary/a5fc3577-c5e7-49ff-8fbf-ed88dc8aaff5.vhd.tmp (type bz2)…could take a long time Moving to /home/secondary/template/tmpl/1/1///a5fc3577-c5e7-49ff-8fbf-ed88dc8aaff5.vhd…could take a while Successfully installed system VM template  to /home/secondary/template/tmpl/1/1/ [/shell] Go into secondary storage folder to verify template file, check the file size.

I use a 32GB HP latop for XenServer, it’s in same network subnet with management server, and it also can access internet.

XenServer installation note:

  1. Download XenServer 6.0.201 iso image, it can work with CloudStack 3.0.201 well

  2. Internet access is convenient for download CloudStack support package.

  3. Using same 0~3.xenserver.pool.ntp.org NTP server

Access XenServer host from my management server. There are some post-install steps need to be done for CloudStack. [shell] [root@cloudstack .ssh]# ssh 192.168.10.10   #Connect to XenServer host ip address The authenticity of host ‘192.168.10.10 (192.168.10.10)’ can’t be established. RSA key fingerprint is ae:5b:8a:dc:2a:c8:6c:56:f6:7a:48:02:e6:db:78:dd. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ‘192.168.10.10’ (RSA) to the list of known hosts. root@192.168.10.10’s password: Type “xsconsole” for access to the management console. [root@hpxs1 ~] pwd /root [root@hpxs1 ~] mkdir tmp [root@hpxs1 ~] cd tmp [root@hpxs1 tmp] wget http://download.cloud.com/releases/3.0.1/XS-6.0.2/xenserver-cloud-supp.tgz –2012-06-29 21:55:08–  http://download.cloud.com/releases/3.0.1/XS-6.0.2/xenserver-cloud-supp.tgz Resolving download.cloud.com… 207.171.185.201 Connecting to download.cloud.com|207.171.185.201|:80… connected. HTTP request sent, awaiting response… 200 OK Length: 3342001 (3.2M) [application/x-tar] Saving to: `xenserver-cloud-supp.tgz’

100%[================================================================>] 3,342,001    217K/s   in 15s

2012-06-29 21:55:49 (214 KB/s) - `xenserver-cloud-supp.tgz’ saved [3342001/3342001] [root@hpxs1 tmp] tar xf xenserver-cloud-supp.tgz [root@hpxs1 tmp] ls example-answerfile   post-install.sh  src                       xenserver-cloud-supp.tgz packages.cloud-supp  README           xenserver-cloud-supp.iso [root@hpxs1 tmp] xe-install-supplemental-pack xenserver-cloud-supp.iso Installing ‘XenServer Cloud Supp Pack’…

Preparing…                ########################################### [100%] 1:iptables               ########################################### [ 10%] 2:iptables-ipv6          ########################################### [ 20%] 3:arptables              ########################################### [ 30%] 4:iptables-debuginfo     ########################################### [ 40%] 5:ipset-modules-kdump-2.6########################################### [ 50%] 6:ipset-modules-xen-2.6.3########################################### [ 60%] 7:csp-pack               ########################################### [ 70%] 8:ebtables               ########################################### [ 80%] 9:ipset                  ########################################### [ 90%] 10:iptables-devel         ########################################### [100%] Update sysctl to enable tables checking Memory required by all installed packages: 894697472 Truncating to static-max: 789839872 Setting VM.memory_target: 789839872 Pack installation successful. [root@hpxs1 tmp] [root@hpxs1 tmp] xe-switch-network-backend bridge Cleaning up old ifcfg files Remove… ifcfg-xenbr0 Disabling openvswitch daemon Configure system for bridge networking You *MUST now reboot your system [root@hpxs1 tmp] reboot [/shell]

Test if NFS storage is up and running for my XenServer host. [shell] [root@hpxs1 ~] mkdir nfs [root@hpxs1 ~] mount 192.168.10.15:/home/primary /root/nfs [root@hpxs1 ~] cd nfs [root@hpxs1 nfs] touch testfile [root@hpxs1 nfs] ls testfile   #Check this file inside NFS folder. [/shell]

Now, it’s time to initialize CloudStack on management server. It has a very nice wizard for helping you lunching your zone. [nggallery id=14]

I had followed above to installed CloudStack twice within less 3 hours. If you get other tips/issue, pls drop me a comment, I will try my best to response you.

环境:服务器–HP BL680 G7刀片服务器 存储–EMC CX480

故障描述: 从存储方面为主机分配作为San Boot引导Lun 60GB空间,作为HA独立Lun 40GB,用来存放虚拟机数据Lun 安装过程中选择60GB的Lun并且在安装之前高级设置中打开了multipath开关。 安装完成后,显示如下:attempling boot from hard drive (C:) attemting-boot-from-hard-driver-c 解决办法: 需要说明的是在EMC CX480存储在分配Lun空间时,会为Lun分配Lun ID和Host ID(这2个ID均可以进行修改) 一般HBA默认Host ID为0的Lun作为San Boot的引导lun。因此,在实际生产中,如果之前Host ID 0的lun已经被其他Lun所使用,引导lun使用为其他Host ID时,需要在HBA卡设置中明确设置由该Host ID Lun引导。

如:本项目中,主机的引导Lun Host ID为 1,我们就需要在HBA卡中设置Host ID1的Lun作为引导Lun。 select-adapter 开启HBA的San Boot功能 qlogic-fast-util 选择正确的作为引导的lun作为引导lun使用。完成后保存设置重启后故障解决

注意:这里所看到的lun ID都是存储上面的Host ID,一定不要忽视。

致谢:投稿人 王文博(北京网智瑞通信息技术服务有限公司) 欢迎投稿,请发邮件到 liuzh66@gmail.com

最近安装浪潮服务器,发现找不到本地硬盘的错误。这是RAID卡不兼容,导致不能够读取硬盘造成的。 此主板上板载lsi 1068E raid芯片默认使用的是SoftWare Raid模式(MegaRaid),这种模式不为xenserver所兼容,所以需要更改主板跳线,并刷新板载Raid芯片的firmware,更改raid模式为IR模式(Integrated Raid模式)使xenserver可以兼容。NF560D2更新后,可以顺利安装Xenserver。 还有一台服务器的RAID卡在主板上控制死了工作模式,没有刷机的可能,这种情况下,只能使用DDK编译该RAID卡的驱动,在安装的过程中,进入高级模式,加载附加的驱动,之后就可以正常安装了。如何做DDK编译附加的设备驱动程序,待续。

本文是在今天方案1在用户现场测试基本有效的基础上总结的。用户的需求是这样的:假如我的应用使用XenApp发布,由于程序自身的原因,一个用户的虚拟应用进程在服务器端造成CPU,内存或者磁盘IO被过度使用,甚至达到100%的极限情况;这样其它同在一个XenApp服务器上的其它在线用户有可能被影响,甚至于导致这些用户都无法使用。首先这个情况并没有在任何用户的实施场景中听说出现过,个人认为是一个相当极限的情况。但是,既然用户有这个担心,那么还是需要提出一个分析控制的方法。研究了一番只有,我找到了3个解决问题的方案。

方案1:使用微软Windows System Resource Management(WSRM)来按应用进程限制资源分配极限 什么是Windows System Resource Management? 怎么安装WSRM?如果是Windows2003的系统,需要下载安装文件,网址在:http://download.microsoft.com/download/f/4/4/f44b87d1-04c6-48f7-95ea-69aa11252e11/X11-04295.iso;如果是Windows2008的系统,在系统功能中可以添加到这个功能,不要特别的安装文件。 怎么启动配置界面?win2003中,在命令行中mmc,选择添加模块,找到Windows System Resource Management模块即可;win2008中,安装完毕之后,直接在菜单中能够找到。 怎么配置资源分配控制策略? 下面是一个完整的配置过程,我使用notepad模拟一个叫做H2000-Notepad的程序,把它放在C根下。配置了每个进程使用CPU和内存的上限。其实还可以加上其它的限制策略:日历时间,用户和组。 [nggallery id=16] 方案上榜理由: 操作系统的层面的问题交给操作系统自身功能解决,WSRM方法实施起来简单易行

  • 这个功能是Windows 2003/2008操作系统本身自带的功能,在企业版和数据中心版本中可以免费使用

  • 策略配置可以满足要求,能够按应用,可以指定到用户和组,可以设定时间条件,可以控制CPU和内存的分配规则,以及超出限制后的处理方式

方案2:使用XenApp内置负载均衡策略+XenServer动态内存管理功能 从CPU资源分配的控制角度看,XenApp内置了非常完善的策略。策略的在文档,猛击这里:管理服务器和资源负载;首先XenApp服务器如何评价服务器是否已经满载,评估的条件很多,清单在这里:负载管理规则;那么ZDC通过这些条件就能够判断是否会把用户请求发到某个机器上,而且负载的评估也是有ZDC动态地实时监控的,很可能还没有达到任何一个极限值,就已经满载了,那么这就是用户所担心的极限情况的出现,如程序的Bug或者数据正常处理过程中的系统异常。ZDC有了这些规则之后,首先不会使情况恶化,也就是不会在分配新的用户使用某个服务器。那么,假如某个服务器已经发生了异常情况了,XenApp还有什么措施可以防止情况的进一步恶化。这里我们看到XenApp也不是吃素的,它通过多用户的负载均衡机制,按策略分配CPU资源,防止饿的被饿死,吃撑的被撑死的情况发生。它提供两种CPU资源分配策略:1)平均分配,也就是吃大锅饭,人人都得到相等份额的CPU资源,谁想多吃多占,没门;2)特权分配,这种情况下,需要看程序和用户的重要性,应用的重要度是在发布的时候能够分配的,一共高中低三个档次。虚拟应用会话实例的重要性,还要看使用应用的人的账户。例如:都是Notes的客户端,一个领导的账户和其它三个普通员工的账户同在一个服务器上使用;那么领导获得的cpu资源可以很高份额,以保证这个系统的重要客户的使用度;说白了,这叫做“特权共享”,或者“重要度”共享。这个策略在服务器满载指标的前提下,能够有效的控制以在线用户的系统资源分摊使用情况,防止某个用户的异常情况下,系统资源的滥用,由于CPU资源被控制为共享的,想多吃多占也没门。另外从内存资源的控制角度看,我觉得可以使用放的策略,XenServer有动态内存管理功能,假设你把内存的范围设置到4~6GB,甚至更高的上限,那么当有个程序内存异常了,我就放你一马,让你多用一些,反正系统的弹性还大着呢!那么在这个过程中EdgeSight系统监控的功能早就把这个内存超高的报警汇报给了网管,网管可以在系统中主动干预这个异常,标记为该服务器不可用,主动联系用户,保存工作场景,重新登陆一次,把用户都转移到其它正常的服务器上。综上,CPU使用控制的方式,内存使用扩大使用范围的方式;一收一放,两手抓,两手都要硬的策略来控制系统资源的分配。 方案上榜理由: XenApp相关的问题,由产品自身的功能来保障,实施工作量最低,一个产品搞定

方案3:使用AppSense来控制 这是Citrix认证的第三方配套管理软件,通过它的资源保障功能,可以按用户和应用的单位来分配CPU,内存和磁盘资源的使用。本产品在国外很多项目在用,效果很好。产品介绍网址:http://www.appsense.com/resource-entitlement 方案上榜理由: 这种相当专业客户需求就需要用专门的管理工具解决,可以达到最专业的控制效果。

最后,这种资源负载均衡/控制的方案,最好不要混合使用;例如我之前的一错误想法:使用WSRM+XenApp的并行方案。

致谢:SongYe提议WSRM方案;SimonQiu提供方案2的咨询;KevinCui提议AppSense方案;