2006年12月21日星期四

EMC metaLUN (3)

第三个实验是关于EMC Meta LUN的。

EMC Meta LUN 的特性是在线扩充一个LUN。实验环境一台EMC CX500和一台Windows 2003 Server Standard。

1)     metaLUN是2个或2个以上LUN的集合

2)     metaLUN的目的是为了容量的扩展

3)     metaLUN的扩展有两种方式,concatenate和stripe。

Concatenate是指将另一个LUN简单的追加(append)在第一个LUN的后面。从而拼接(concatenate)成一个新的LUN。

Stripe方式是指将新的LUN和已有的LUN做成RAID 0 (stripe)的方式。这样,stripe方式比concatenate方式具有更好的性能. 因此,对于可选的另一个LUN必须是和原有的LUN同样(或更大)的大小。而concatenate对另一个LUN的大小没有要求。

无论哪种方式,新的LUN的容量就是两个LUN容量的和。

实验步骤:

1, Bind LUN30 and LUN31 from EMC navispher. Each LUN is 1G.

2, Right click LUN30, and choose Expand…, shown as below:

metalun01

3, Because both LUN30 and LUN31 are 1G, we choose strip type. BUT, here we should pay more attention on LUN ID. Details shows here:

metalun02

This new LUN is LUN30+31. When this action is done, we check this new LUN30+31; LUN ID is same as LUN30 before. LUN31 is disappeared; it is located in Private LUN in one of SPs.

Job is done.

EMC CX500 & VMware ESX Server (2)

第二个实验是有关EMC提供的基本功能:SnapView,它包括快照snapshot和克隆clone,最需要注意的就是快照中的reserved LUN, 和克隆中的 Clone Private LUN (CPL).

For Snapshot, please DO remember: firstly, snapshot is a relationship. Snapshot is a ‘frozen in time’ copy of a Source LUN. Each Source LUN (Production LUN) only is made up to 8 R/W snapshots. Secondly, Snapshot is activated when a Session is started. When a Session is stopped, Snapshot is deactivated.

For Clone, please DO remember: A Clone Private LUN is a 128 MB LUN that is allocated to each SP, and it must be created before any other Clone operations can commence.

结合ESX3.0.1和EMC CX500两种设备,我们测试环境是2台VMware ESX Server和一台EMC Clariion CX500。测试的目的是:通过EMC map 一个LUN给ESX,在这个LUN上创建虚拟机,并对这个虚拟机做快照。将快照的虚拟机分给另一个ESX Server,如果快照虚拟机成功运行,则实验成功。

我们第一次实验步骤:

1, 在EMC上创建一个LUN,并map给ESX1;

2, 在ESX1上做rescan,发现这个LUN,建立虚拟机并创建VMFS文件系统;

3, 在EMC设备上,对这个LUN做快照。并将这个快照分配给ESX2;

4, ESX2发现设备,但是无法工作正常,无法使用。

实验失败。这样,我们认为EMC可以对VMware ESX进行快照,但是无法使VMFS文件系统工作正常。我们进行了第二次实验:

实验步骤如下:

1, 在EMC创建一个LUN,并map 给ESX1;

2, 在ESX1上做rescan,发现这个LUN;之所以看到2个,是因为多路径。如图:

rdm01

3, 利用customize创建新的虚拟机,在Select a Disk选择Raw Device Mappings。如图:

rdm02

4, 在下一步中,我们可以得到这个LUN。如图:

rdm03

5, 创建这个虚拟机时,我们最终会得到关于这个虚拟机的详细清单。如图:

rdm04

6,在这个虚拟机上安装Windows 2003 Server,并开机;

7,在EMC上对这个LUN进行快照,并把这个快照映射给ESX2;

8, 在ESX2进行做rescan,发现设备。在ESX2上创建新的虚拟机,并连接新发现的设备。启动虚拟机。成功。因为两个虚拟机有相同的IP地址,所以Windows系统报告IP地址冲突。

Connect EMC CX500 to ESX Server (1)

这次实验是围绕在EMC CX500存储设备上进行的。因为是第一次亲密接触EMC CX系列的设备,所以实验都是EMC最基本和有特色的功能。主要的实验内容如下:

  1. 在CX500上分一块存储空间给主机。因为主机是VMware ESX3.0.1,那么我们的目的是让ESX得到这个存储,且在这个存储上建立虚拟机,让虚拟机成功地在EMC上运行。
  2. 利用EMC的快照和克隆功能。
  3. 利用EMC中的Meta LUN的功能。

第一个实验其实很简单。大致过程就是:

1, 利用串口将EMC CX500 与笔记本直连, 在配置时最高速度一定是 115200bps。连接成功后我们可以直接设置IP地址。

2, 得到IP地址后,利用navishpere配置EMC CX500:Create a RAID group|Bind LUN (300G)|Create Storage group,将这300G的LUN map to the Host Computer (ESX3.0.1)。这里需要强调,在主机ESX3.0.1中安装naviagent后,agent会自动在EMC注册主机信息。当然naviagent不是必须安装的。如果没有安装naviagent,我们就必须用工程师模式(engineer mode)在navisphere 中注册(register)主机信息。注:工程师模式(Ctrl+Shift+F12)。

3, After successful mapping this 300G LUN to the Host. From VC2, do rescan storage adapter. Setup VMFS. The job is done.

4, Finally, create a virtual machine as usual. Make sure its data-store is from EMC CX500.

实验完成。

(to be continued)

2006年12月18日星期一

How to Create NFS in ESX

As we know, ESX Server supports NFS. Here, we show how to create NFS. The details are showed below.

A computer is SFU-TOP, this is a VM, IP address is 10.0.1.211; Host Server is ESX2, its IP address is 192.168.0.232. In addition, ESX Server must have a network adapter to support NFS.

nfs01

Firstly, deploy a VM, named: SFU-TOP, from Windows 2003 STD SRV SP1 template. SFU means ‘Windows service for Unix’. This is a free software can be downloaded from Microsoft official website.

Secondly, fully install ‘Windows service of Unix’ in VM (SFU-TOP). Besides, we need WinSCP to help copying /etc/passwd and /ect/group files from ESX2 Server to VM's local disk (c:\etc).

Thirdly, action in SFU-TOP, a VM. Clicking ‘start’, and then ‘service for Unix administrator’. As,

nfs02

In configuration tab, choose ‘Use Password and Group files’, and Brower the destination to get the ‘passwd’ and ‘group’ files.

Next step is in ‘Maps’ tab. In ‘Advanced maps’ option, make sure mapping between ‘administrator’ and ‘root’. Like picture shows here:

nfs03

Mapping is done.

Fifty steps, in VM (SFU-TOP) make a folder as ‘NFS-sharing’, right click it and choose ‘NFS sharing’ tab. In order to access network, please add valid IP address.

nfs04

From here, configure ESX Server is necessary. Thus, please follow configurationstorageAdd storageNetwork File System.

nfs05

In ‘Server’ blank, please enter VM (SFU-TOP) IP address 10.0.1.211 and that folder.

Then, wait a moment. You will see NFS is ready in storage.

nfs06

Job is done.

During this experiment, we also need pay attention on ESX server policy.

nfs07

Also, NFS service have to start in NFS Server machine (SFU-TOP, a VM).

nfs08

2006年12月13日星期三

CPU Compatibility error when Migration (VMotion)

When a powered-on Virtual Machine is being migrated between hosts, the error message shows below: 
    VMotion Error MSG

For VMotion, CPU compatibility is a key issue. We should edit virtual machine setting, Edit Settings | Options: Advanced: CPU Identification Mask : Expose the Nx flag to guest|.

This dialog is displayed:

CPU ID Mask

According to this official legend, we nCPU ID Mask legendeed  change source machine's  CPU Identification Mask. From the list, we know  '0 (zero)' means 'Hide feature from guest software'. So, changing Guest OS default Value to '0'. Finally, save this setting. Do migration again, VMotion is successful done.  

Upgrade ESX3/VC2

Download and Extraction Instructions

升级ESX3到ESX3.0.1/VC2.0.1包括三个步骤:

  • 首先升级VC2到2.0.1。
    • 这个步骤直接在VirtualCenter Server完成就可以了。并且VC2.0.1可以管理ESX3.0。

 

  • 其次升级ESX3到ESX3.0.1。(Make sure Bundle is ready)
    1. Log into the ESX Server service console as root via PuTTy.
    2. Create a local directory. 
      • #   mkdir /var/updates
    3. Change current directory to /var/updates.
      •  #   cd /var/updates
    4. Copy/Move the tar file into the /var/updates directory.   
    5. Verify the integrity of the download tar file:
      • #   md5sum ESX-xxxxxxx.tgz
    6. The md5 checksum output should match the number from official.
    7. Extract the compressed tar archive:
      • #   tar -xvzf ESX-xxxxxxx.tgz
    8. Change to the newly created directory, /var/updates/<xxxxxxx>:
      • cd ESX-xxxxxxx
    9. We can now intall the update using the following command:
      • esxupdate update

 

  • 当ESX Server/VC成功升级后,虚拟机中的VMware Tools显示为out of date。需要升级VMware Tools。方法有二种:
    • 第一种:在虚拟机上重新安装VMware Tools,即可。但是这种方法需要知道每台虚拟机的用户名与密码。
    • 第二种:通过在VirtualCenter Server上执行命令行vmware-vmupgrade.exe进行升级。步骤如下:
      • C:\Program Files\VMware\VMware VirtualCenter 2.0>vmware-vmupgrade -u vcadmin -n
      • /"TEST Datacenter"/"Production VMs"/Prod-LotteryWeb

        Enter password for vcadmin:

        Connecting to VirtualCenter server on local port 902

        Looking for VMs...

        Found /TEST Datacenter/Production VMs/Prod-LotteryWeb

        /TEST Datacenter/Production VMs/Prod-LotteryWeb: host is VMware ESX Server version 3.0.1

        /TEST Datacenter/Production VMs/Prod-LotteryWeb: VM is powered off, checking virtual hardware

        /TEST Datacenter/Production VMs/Prod-LotteryWeb: virtual hardware upgrade was not required

        /TEST Datacenter/Production VMs/Prod-LotteryWeb: setting up tools upgrade...

        /TEST Datacenter/Production VMs/Prod-LotteryWeb: tools upgrade setup complete

        /TEST Datacenter/Production VMs/Prod-LotteryWeb: power on requested

        /TEST Datacenter/Production VMs/Prod-LotteryWeb: power on task is running

      • 从步骤中可以看出,vmware-vmupgrade.exe这个命令首先启动虚拟机,然后进行安装VMware Tools,最后关掉虚拟机。
      • The vmware-vmupgrade.exe tool acts on powered-off VMs.
      • The tools only works for Windows XP, 2000 and 2003 VMs.

2006年12月12日星期二

为虚拟机制作.ISO文件

为虚拟机准备.iso文件:

Please logon as 'root' to  ESX Server via SSH with Putty, and

dd if=/dev/cdrom of=WinXP.iso bs=32k

Done!

利用root远程ssh访问ESX Server

SSH Security

SSH is commonly used UNIX and Linux command shell that lets you remotely log on to the service console and perform certain management and configuration tasks for ESX Server.

In this ESX Server release, one key features of this enhancement include: Limits on remote logons as root.

 

When ESX Server is installed, 'root' user not able to log in via SSH. This suggestion is from official document:

To change the default SSH configuration.

  1. Log on to the service console and acquire root privileges.
  2. Change directories by entering cd /etc/ssh at he command prompt.
  3.  Use nano or antoher text editor to perform any or all of following actions, as appropriate.
    • To allow remote root logon, change the setting to yes in the following line in the sshd_config file:
      • PermitRootLogin no
  4. Save your changes and close the file.
  5. Execute the following command to restart the SSHD service: service sshd restart

Done!

ESX Server and VirtualCenter Upgrade

Keys for upgrade or migration success

  • Each step of the process is irreversible
  • The order of steps is very significant
  • Some Virtual Machine downtime is mandatory and unavoidable
  • Make thorough backups before beginning
    • In order to protect aganist error
  • Prepare your environment for change

IMPORTANCE: Upgrades or migrations to ESX Server 3 and VirtualCenter 2 are irreversible and must be performed in the correct order.

Steps in a successful upgrade

Step 1: Make backups; choose a strategy; prepare for changes

Step 2: Upgrade VirtualCenter components

Step 3: Upgrade ESX Server hosts and datastores

Step 4: Upgrade virtual-machine hardware

Step 5: Upgrade VMware Tools inside virtual machines

 

DO remember:

Upgrades or migrations ESX3/VC2 will succeed only if they have been planned and prepared for.

Protect against error by making backups.

Inspect your environment and make a plan before beginning.

2006年12月11日星期一

VMware VirtualCenter Installation

VirtualCenter Server Software Requirements

The VirtualCenter Server is supported as a service on the 32-bit versions of these operating systems:

  • Windows 2000 Server with SP4 with Update Rollop 1
  • Windows XP Pro (at any SP level)
  • Windows 2003 (all releases except 64-bit)
  • .NET framework 1.1 (included in installation if required)

VirtualCenter 2.0 installation is NOT supported on 64-bit operating systems.

 

VMware VirtualCenter 安装手册

1. 将安装介质放入光驱。

virtualcenter1

2.按照界面选项,建议首先安装License Server.

virtualcenter2

得到xxxxxxxxxxx.lic文件后,建议将license文件放在本地电脑磁盘中,而不要放在网络共享的文件夹中,方便以后的操作。

3.按照路径提示,得到license文件。如图:

virtualcenter3

4.在License Server本地,务必确定service已经启动。

virtualcenter12

到这里,License Server已经安装成功。

5.安装VirtualCenter 2

virtualcenter4

6.选择安装组件。

virtualcenter5

7.因为已经成功安装了License Server,所以请选择使用一个存在的license server。

virtualcenter6

8.在输入License Server时,建议输入机器名,而不是IP地址。这样会方便以后配置。

virtualcenter7

9.在配置端口时,要保证不与其他应用冲突。特别注意的IIS。

virtualcenter8

10.可以默认配置。

virtualcenter9

11.VC安装成功。

 

12.安装VC client。一路默认安装就可以了。

virtualcenter10

 

13.安装成功后,可以得到登陆界面。

virtualcenter11

 

VirtualCenter 安装成功!

VMware ESX Server Installation

Host Computer:

IBM x460,

CPU: 4颗 Xeon 3.0GHz

RAM: 16G,

Hard Disk: 73.4G SAS x 5块

RAID Type: RAID 5

 

ESX Server 3.0安装过程

1.将ESX Server安装光盘放入光驱后,即可看到下图画面。可以选择回车键进入图形界面安装。

esxserver1

2.下面是选择是否检测光盘媒体,可以选择 skip 跳过。

esxserver2

3.点击下一步进入安装。

esxserver3

4.键盘选项,默认即可。

esxserver4

5.鼠标选项,默认即可。

esxserver5

6.最终用户确认。

esxserver6

7.分区选项,建议选择 recommend 选项。使用VMware推荐的格式进行自动分区。

esxserver7

8.调整分区大小。将 /boot, / ,swap 分区设为主分区(Force to be a primary partition),建议使用默认大小。其他系统分区,建议使用2G大小。 请根据实际使用情况建立 /vmimages,建议20G—50G。将硬盘所有剩余空间分配给vmfs,需要选择Fill to maximum allowable size选项。

esxserver8

esxserver9

esxserver10

9.安装boot loader,默认即可。

esxserver11

10.配置console使用的网卡,同时可以在host name输入主机名。

esxserver12

11.选择时区,按需选择即可。

esxserver13

12.输入root用户密码。

esxserver14

13.安装信息摘要。可在这里检查配置是否符合要求。

esxserver15

14.安装过程。

esxserver16

esxserver17

15. 安装完成。

esxserver18

esxserver19

VMware Workstation (One OS is not enough)

VMware Workstation 面向专业技术人员的功能强大的虚拟机软件

 

什么是 VMware Workstation

VMware Workstation 是一种功能强大的台式机虚拟化软件,面向希望优化企业中软件开发、测试和部署的软件开发人员/测试人员及 IT 专业人员。 VMware Workstation 允许用户在单台PC 上用完全网络化的、手提式的虚拟机同时运行多个基于x86 的操作系统(包括 Windows、Linux 和 NetWare)及它们的应用程序—不需要硬件分区,也不需要重启。

VMware Workstation 推向市场已有五年并赢得了十多项重要的产品奖,它极大地提高了生产率和灵活性并降低了成本,已成为全球软件开发和 IT 专业人员不可或缺的工具。

ws

 

怎样使用 VMware Workstation ?

VMware Workstation 强大而灵活的虚拟化特性和功能为各类用户带来了众多解决方案。个人和公司可以使用 VMware Workstation 实现以下目的:

优化软件开发和测试操作。以虚拟机的形式在单台 PC 上创建多个供开发和测试用的环境,使用它们测试“现实世界”中的多层配置、复杂的网络以及多个操作系统和应用程序—一切都在单台机器上完成。

改进团队协作。虚拟机轻便、独立于硬件的特性,再加上VMware Workstation 中的新功能,使用户能够方便地共享开发环境和打包前的测试配置而没有任何风险,而且这还方便了开发部门和 QA 部门的协作。

提高 IT 专业人员的生产效率。允许系统管理员和其他的企业 IT 专业人员在虚拟机部署到生产环境中的物理 PC 或服务器上之前测试软件—包括新应用程序、应用程序更新和操作系统修补程序。 IT 技术咨询部可以创建一个最终用户配置虚拟库,并通过参考此库更快地解决问题。

在您的企业中引入虚拟基础结构。在 Workstation 中创建的虚拟机可以部署到由 VMware 提供的其他台式机和服务器虚拟化平台上。将 VMware Workstation 虚拟化引入台式机是将您的物理 IT 基础结构转变成虚拟基础结构非常理想的第一步。

 

VMware Workstation 的工作原理是什么?vmware layer

VMware Workstation 的工作原理是:创建完全隔离、安全的虚拟机来封装操作系统及其应用程序。 VMware 虚拟化层将物理硬件资源映射为虚拟机的资源,所以每一个虚拟机都有其自己的 CPU、内存、磁盘和 I/O 设备并且完全等同于一台标准的 x86 机器。 VMware Workstation 安装在主机操作系统上,并通过继承主机的设备支持而提供了广泛的硬件支持。

 

主要功能 VMware Workstation 5 中的新功能

• 它是唯一可同时运行在 Windows和 Linux 主机操作系统上的台式机虚拟机软件,并支持某些 64 位主机操作系统和 64 位扩展处理器

• 与任何其他台式机虚拟机软件相比有更广泛的设备支持、更好的性能和更强大的功能性

• 强大的虚拟网络连接选项,包括NAT 设备、DHCP 服务器和多个网络交换机,让您能够将虚拟机彼此连接起来,并连接主机和公共网络

• 共享文件夹,拖放式操作,在来宾操作系统和主机操作系统之间复制粘贴

• 获得在虚拟机中执行本机程序调试的全部功能,并同时支持用户和内核级的调试程序

• 方便地在虚拟机间切换,并可以挂起/ 恢复它们的运行

• 每个虚拟机都有可配置的内存容量、磁盘和 I/O 设备,并支持 CD、软盘、USB 盘、DVD 和CD-ROM 设备

• 虚拟机彼此隔离,确保一个虚拟机的崩溃不会影响其他虚拟机和主机

• 虚拟机是一组可手提式的、独立于硬件的文件,可以方便地共享

• 多快照功能可以方便地捕获并管理运行中的虚拟机的时间点拷贝和“撤消”更改

• 小组功能可以更方便地管理互连的虚拟机并模拟“现实世界”的多层配置

• 完整而且经链接的克隆功能可以方便地拷贝和共享虚拟机

• 支持新的 32 位来宾和主机操作系统

• 支持某些 64 位主机操作系统和 64位扩展处理器

• 改进了性能,特别是在多虚拟机和网络负载方面

• 电影记录和回放功能可捕捉运行的虚拟机中的所有活动

• 命令行界面可以自动化某些重复的任务

• 改进了 Linux 用户界面

• 支持一类流式 USB 设备,包括网络摄像机和扬声器

• 对 NX bit 的支持,以及对 Sun Solaris x86 的试验性支持

 

使用VMware WorkStation5.5的原因及好处

优化软件开发和测试

• 在单个 PC 上开发和测试多种操作系统和应用程序

• 连接虚拟机以模拟和测试多层配置

• 使用多快照和调试支持以方便测试

• 将测试环境存档到文件服务器上以便还原/ 共享

好处

• 加速开发/ 测试周期,加快推向市场的时间

• 减少 50-60% 的硬件成本

• 将成本高昂的配置和设置时间减少 25-55%

• 通过更严格的测试提高项目质量

• 确保用户始终 在“干净”状态下测试

提高 IT 专业人员的生产效率

• 在将台式机和服务器部署到生产环境之前,作为虚拟机对其进行配置和测试

• 在单台 PC 上测试新的多层应用程序、应用程序更新和操作系统修补程序

• 在虚拟机内承载旧式应用程序,因此方便了操作系统迁移并消除了移植旧式应用程序的需要

• 在共享驱动器上创建一个最终用户配置虚拟库

好处

• 硬件成本减少 50-60%

• 提高操作效率达 50%

• 减少测试新软件所需的时间并提高部署质量

• 通过创建隔离的虚拟测试网络消除生产网络的风险

• 以将最终用户中断最低程度的完成操作系统迁移项目

• 加快了技术咨询部门解决最终用户问题的速度

方便了基于计算机的培训和软件演示

• 在虚拟机中打包和部署课堂授课材料

• 允许学员在安全、隔离的虚拟机中使用多个操作系统、应用程序和工具进行实验

• 配置虚拟机使之在关机时“撤消”所有更改

• 在单台笔记本电脑上演示复杂或多层配置

好处

• 减少教室内所需要的硬件

• 减少准备新课程需要的时间

• 确保学员始终在“干净”的状态下开始

• 更稳定的演示,而且减少了设置时间和硬件成本