xCAT部署物理机操作系统

首先我们假定两台机器,机器名和ip地址分别如下xcat masterhostname: xcatip: 192.168.31.102xcat nodehostname: xcat1ip: 192.168.31.251具体操作步骤如下:1. 创建本地操作系统安装文件2. 配置 master 属性chtab key=master site.value='<host ip>’copycds -n centos5.11 -a x86_64 CentOS-5.11-x86_64-bin-DVD-1of2.iso CentOS-5.11-x86_64-bin-DVD-2of2.isocopycds -n centos6.6 -a x86_64 CentOS-6.6-x86_64-bin-DVD1.iso CentOS-6.6-x86_64-bin-DVD2.iso

2. 配置 master 属性chtab key=master site.value='<host ip>’

3. 配置password,可以使用“tabdump passwd”查看

chtab key=system passwd.username=root passwd.password=Letmein4. 配置节点nodeadd xcat1 \groups=compute,all \mac.interface=eth0 \mac.mac=08:00:27:2C:30:8C \hosts.ip=192.168.31.251 \noderes.netboot=pxe \noderes.xcatmaster=192.168.31.102 \noderes.installnic=eth0 \noderes.primarynic=eth0 \noderes.nfsserver=192.168.31.102 \nodetype.os=centos6.6 \nodetype.arch=x86_64 \nodetype.profile=compute \nodetype.nodetype=osi添加完成后可以使用下面的命令来查看各种信息tabdump nodelisttabdump nodetypetabdump noderestabdump mactabdump hosts5. 配置hostmakehosts配置后/etc/hosts文件内容大致如下127.0.0.1 localhost192.168.31.102 xcat192.168.31.251 xcat1 6. 配置DHCPmakedhcp -n配置后在我的环境里dhcpd启动会有问题,,所以我做了下面修改* 在/etc/dhcp/dhcpd.conf文件中删除下面几行zone . { primary NORESOLUTION; key xcat_key; }zone 31.168.192.IN-ADDR.ARPA. { primary NORESOLUTION; key xcat_key; }* 编辑/etc/init.d/dhcpd文件,将user=dhcpdgroup=dhcpd改为user=rootgroup=root然后重新启动dhcpd服务/etc/init.d/dhcpd restart7. 设置部署系统nodeset xcat1 install此时可以看到类似下面的输出结果,说明xcat1机器将会安装centos6.6-x86_64-computexcat1: install centos6.6-x86_64-compute如果我们需要修改安装的系统可以使用下面的命令来修改chtab node=xcat1 \nodetype.os=centos5.11 \nodetype.arch=x86_64 \nodetype.profile=compute \nodetype.nodetype=osinodeset xcat1 install此时可以看到xcat1机器将会安装centos5.11-x86_64-computexcat1: install centos5.11-x86_64-compute8. 由于使用的是虚拟机做测试,没有IPMI功能,所以我们只能手动启动xcat1机器,然后就会发现xcat1进入自动安装系统了。

我们摇摇头说,困难其实没什么大不了。

xCAT部署物理机操作系统

相关文章:

你感兴趣的文章:

标签云: