IBM虚拟化基本概念(2)---VIOS的安装与配置一、VIOserver的profile配置现在我们开始实施了。首先进入HMC的服务器界面,创建一个VIOserver分区,注意这个分区只能用这种方式创建。虽然我们知道VIOserver实际上是一个mksysb的光盘,但选用一般AIX分区是无法安装运行的。分区创建的ID为唯一标示,这点和创建一个AIX分区没有不同。如前所述,考虑到为实验室环境,所以这里设为共享,而非专用。按设计实施,设置CPU各个值。按设计,实施内存值。这里将所有设备加入VIOServer,包括CDROM,但记住安装完成后去除T16的IDECDROM。实际安装时可以根据设计来不同实施。下面开始配置VIOSERVER的特殊部分,首先将最大适配器数调到500,便于增加虚拟网卡和存储卡,缺省值远远不够。我们先来配置需共享的网卡:按设计配置第一块需共享的虚拟网卡同样增加其他虚拟网卡,此处11、12、13、14共4块下面增加虚拟SCSI存储卡增加第一块卡同样一直增加到202虚拟存储卡,共增加20块。这里只设计20个adapter,但建议可以设计更多,因为事后添加需要重起VIOserver。跟着安装向导,设置为正常启动,以免启动停留在SMS菜单。当然事后也可以修改。可以点击详细信息确认配置建立完成,此时再逐一确认一下CPU设置确认内存配置确认设备确认虚拟网卡确认虚拟SCSI卡确认开启确认二、VIOserver的安装注:由于以下此处文档事后所补,所以截图中分区名称有所区别,供参考示意。开始激活该分区(之前请记得把VIOserver的安装光盘放入光驱):选择profile,开启终端窗口开始启动按5进入SMS菜单,选择CD-ROM启动安装接下来实际就是一个mksysb的恢复过程。安装完毕就会自动重起三、VIOserver配置---微分区的共享资源设置VIOserver为有限制的AIX操作系统,不允许root登录,用户名为padmin,缺省口令无。通过oem_setup_env进入AIX的环境,可以很方便的使用我们熟悉的AIX命令达到大多数操作相同的效果,下面会混合使用2个环境的命令。接受许可第一次开启VIOserver,利用oem_setup_env进入AIX环境必须接受license许可。login:padmin$oem_setup_envTheI/OServerlicensemustbeacceptedbeforerunningthiscommand.Onlythechlangcommandmayberunbeforeacceptingthelicense.Toviewthelicense,runthelicensecommandwiththe-viewoption.Ifthe-langflagisnotspecifiedthelicensewillbedisplayedinthecurrentlocale(setbythechlangcommand).Ifthelicenseisnotavailableinthelanguageselected,Englishwillbethedefault.Toacceptthelicense,runthelicensecommandwiththe-acceptoption.Localecurrentlysetto:en_US.Usage:license{[-view][-accept]}[-langName]license[-ls]。。。。。$license-accept配置磁盘在oem_setup_env的AIX环境下先建立2个VG,供各个微分区的rootvg共享使用(磁盘位置请参考前面的实验环境说明)mkvg-y55aa01_rootvg1hdisk2mkvg-y55aa01_rootvg2hdisk19[ss55aa01][padmin][/home/padmin]#lspvNAMEPVIDVGSTATUShdisk0000826ef27028dferootvgactivehdisk1000826efbaa78248rootvgactivehdisk2000826ef415056f855aa01_rootvg1active...hdisk19000826ef4150387655aa01_rootvg2active建立20个lv,每个微分区2个,可用来做镜像mklv-yrootvg1_55a11-tjfs255aa01_rootvg120Gmklv-yrootvg1_55a12-tjfs255aa01_rootvg120Gmklv-yrootvg1_55a13-tjfs255aa01_rootvg120Gmklv-rootvg1_55a14-jfs255aa01_rootvg120G这样各个分区rootvg的准备工作完成,接下来要实际映射到各个微分区。先执行exit退出oem_setup_env的AIX环境。padmin环境下建立vdev先察看以下vhost的虚拟scsi卡对应各个微分区是否如设计[ss55aa01][padmin][/home/padmin]#lsmap-all|grepvhostvhost0U9133.55A.069511H-V2-C1110x00000000vhost1U9133.55A.069511H-V2-C1120x00000000vhost2U9133.55A.069511H-V2-C1210x00000000...vhost17U9133.55A.069511H-V2-C1920x00000000vhost18U9133.55A.069511H-V2-C2010x00000000vhost19U9133.55A.069511H-V2-C2020x00000000建立各个虚拟存储设备,将微分区rootvg映射到各个预先建立的lv上,如对于ss55aa11这个微分区,建立一个rootvg1_55a11将55a11_rootvg1这个lv映射到vhost0上,即ss55aa11上的一块scsi卡上,从而使得ss55aa11这个微分区能认出这块虚拟磁盘来。mkvdev-vdevrootvg1_55a11-vadaptervhost0-dev55a11_rootvg1mkvdev-vdevrootvg1_55a12-vadaptervhost2-dev55a12_rootvg1mkvdev-vdevrootvg1_55a13-vadaptervhost4-dev55a13_rootvg1mkvdev-vdevrootvg1_55a14-vadaptervhost6-dev55a14_rootvg1mkvdev-vdevrootvg1_55a15-vadaptervhost8-dev55a15_rootvg1mkvdev-vdevrootvg1_55a16-vadaptervhost10-dev55a16_rootvg1mkvdev-vdevrootvg1_55a17-vadaptervhost12-dev55a17_rootvg1mkvdev-vdevrootvg1_55a18-vadaptervhost14-dev55a18_rootvg1.........mkvdev-vdevrootvg2_55a14-vadaptervhost7-dev55a14_rootvg2mkvdev-vdevrootvg2_55a15-vadaptervhost9-dev55a15_rootvg2mkvdev-vdevrootvg2_55a16-vadaptervhost11-dev55a16_rootvg2mkvdev-vdevrootvg2_55a17-vadaptervhost13-dev55a17_rootvg2mkvdev-vdevrootvg2_55a18-vadaptervhost15-dev55a18_rootvg2mkvdev-vdevrootvg2_55a19-vadaptervhost17-dev55a19_rootvg2mkvdev-vdevrootvg2_55a20-vadaptervhost19-dev55a20_rootvg2建立datavg同理,建立各个微分区的datavg,但这里使用磁盘直接对应的,而非lv,但命令使用方法并无不同:mkvdev-vdevhdisk3-vadaptervhost0-dev55a11_datavg1mkvdev-vdevhdisk4-vadaptervhost2-dev55a12_datavg1mkvdev-vdevhdisk5-vadaptervhost4-dev55a13_datavg1mkvdev-vdevhdisk6-vadaptervhost6-dev55a14_datavg1mkvdev-vdevhdisk7-vadaptervhost8-dev55a15_datavg1mkvdev-vdevhdisk8-vadaptervhost10-dev55a16_datavg1mkvdev-vdevhdisk9-vadaptervhost12-dev55a17_datavg1mkvdev-vdevhdisk10-vadaptervhost14-dev55a18_datavg1mkvdev-vdevhdisk11-vadaptervhost16-dev55a19_datavg1mkvdev-vdevhdisk12-vadaptervhost18-dev55a20_datavg1注意:tempvg没有加以处理,分配方法一致,留待以后分配检查一下结果:[ss55aa01][padmin][/home/padmin]#lsmap-allSVSAPhyslocClientPartitionID-----------------------------------------------------------------------------vhost0U9133.55A.069511H-V2-C1110x00000003VTD55a11_datavg1StatusAvailableLUN0x8200000000000000Backingdevicehdisk3PhyslocU787B.001.DNWGNVK-P1-C3-T2-W2148000B5D6A02AA-L1000000000000VTD55a11_rootvg1StatusAvailableLUN0x8100000000000000Backingdevicerootvg1_55a11Physloc.....SVSAPhyslocClientPartitionID-----------------------------------------------------------------------------vhost18U9133.55A.069511H-V2-C2010x00000000VTD55a20_datavg1StatusAvailableLUN0x8200000000000000Backingdevicehdisk12PhyslocU787B.001.DNWGNVK-P1-C3-T1-W2149000B5D6A02AA-LA000000000000VTD55a20_rootvg1StatusAvailableLUN0x8100000000000000Backingdevicerootvg1_55a20PhyslocSVSAPhyslocClientPartitionID-----------------------------------------------------------------------------vhost19U9133.55A.069511H-V2-C2020x00000000VTD55a20_rootvg2StatusAvailableLUN0x8100000000000000Backingde