xCat 使用方法 新裝centos74 作為xcat master, 關(guān)閉selinux。 ip:192.168.18.28 hostname:centos74
這里使用的virtualbox虛擬機。
xcat 安裝: 下載安裝包: https://xcat.org/files/xcat/xcat-dep/2.x_Linux/xcat-dep-2.14.2-linux.tar.bz2
https://xcat.org/files/xcat/xcat-core/2.14.x_Linux/xcat-core/xcat-core-2.14.2-linux.tar.bz2
解壓: tar jxvf xcat-core-2.14.2-linux.tar.bz2
tar jxvf xcat-dep-2.14.2-linux.tar.bz2
添加yum源:(根據(jù)自己的linux環(huán)境選擇,我的是redhat6,64位) cd /root/xcat-dep/rh6/x86_64; ./mklocalrepo.sh
cd /root/xcat-core; ./mklocalrepo.sh
開始安裝: yum clean metadata
yum install -y xCAT
檢查xCAT是否安裝正確: source /etc/profile.d/xcat.sh
tabdump site
xcat 配置: 配置xcat服務(wù)器:
chtab key=master site.value=192.168.18.28
chtab key=domain site.value=HPC # 根據(jù)具體情況配置,這個屬性最后會被寫到每個node的/etc/resolv.conf文件里 (必須配置)
chtab key=nameservers site.value=192.168.18.28 # 根據(jù)具體情況配置,這個屬性最后會被寫到每個node的/etc/resolv.conf文件里
chtab key=forwarders site.value=192.168.0.1
tabdump networks 命令來檢查一下networks表信息, 不一致則修改:
chtab netname=192_168_18_0-255_255_255_0 \networks.net=192.168.18.0 \networks.mask=255.255.255.0 \networks.gateway=192.168.0.1 \networks.dhcpserver=192.168.18.28 \networks.tftpserver=192.168.18.28 \networks.nameservers=192.168.18.28 \networks.ntpservers=192.168.18.28
tabdump passwd 查看密碼:
chtab key=system passwd.username=root passwd.password=test
chtab key=system passwd.username=Administrator passwd.password=test
配置hosts,可以查看/etc/hosts:
makehosts #配置hosts
127.0.0.1 localhost
192.168.18.22 centos74 centos74.HPC
配置DNS:
makedns -n
service named restart
配置dhcp,編輯/etc/dhcp/dhcpd.conf文件:
user=dhcpd
group=dhcpd
改為
user=root
group=root
重啟服務(wù):
systemctl restart dhcpd.service
makedhcp -n
注意:如果存在windows節(jié)點,則需要xcat master上配置samba,安裝過程需要。 安裝samba: yum install samba. 修改/etc/samba/smb.conf的[global]段: security = share。 注意: samba4 設(shè)置(需要設(shè)置install目錄及下所有權(quán)限為777):
security = user
map to guest = Bad User
并增加
[install]
path = /install
public = yes
writable = yes
guest ok = yes chkconfig smb on
service smb restart
新增節(jié)點 centos7.4: hostname: test ip: 192.168.18.29 mac: 080027D59856 內(nèi)存大于1G
添加節(jié)點: nodeadd test \groups=compute,all \mac.interface=enp0s3 \mac.mac=08:00:27:D5:98:56 \hosts.ip=192.168.18.29 \noderes.netboot=pxe \noderes.xcatmaster=192.168.18.28 \noderes.installnic=enp0s3 \noderes.primarynic=enp0s3 \noderes.nfsserver=192.168.18.28 \nodetype.os=centos7.4 \nodetype.arch=x86_64 \nodetype.profile=compute \nodetype.nodetype=osi
使用lsdef test查看配置信息。
添加鏡像: [root@centos74 init.d]# copycds -n centos7 /media/sf_VData/xCat/CentOS-7-x86_64-DVD-1708.iso
Copying media to /install/centos7/x86_64
Media copy operation successful
使用lsdef -t osimage 查看, 根據(jù)需求修改模板
chdef -t osimage centos7-x86_64-install-compute template=/media/sf_VData/xCat/template/centos7.4/compute.centos7.tmpl
pkglist=/media/sf_VData/xCat/template/centos7.4/compute.centos7.pkglist
配置其他信息: makehosts //添加/etc/hosts
makedns test //添加dns
makedhcp test // 配置dhcp
添加后處理: tabdump postscripts //查看后處理配置
添加compute后處理類型:
chtab node=compute postscripts.postscripts="install_test"
lsdef test可查看是否改變。
創(chuàng)建后處理需要用到的文件目錄:
cp * /install/postscripts
權(quán)限修改為755
安裝系統(tǒng): nodeset test osimage=centos7-x86_64-install-compute win7: hostname: wtest ip: 192.168.18.30 mac: 080027299B89
添加節(jié)點: nodeadd wtest \groups=compute,all \mac.interface=enp0s3 \mac.mac=08:00:27:29:9B:89 \hosts.ip=192.168.18.30 \noderes.netboot=pxe \noderes.xcatmaster=192.168.18.28 \noderes.installnic=enp0s3 \noderes.primarynic=enp0s3 \noderes.nfsserver=192.168.18.28 \nodetype.os=win7 \nodetype.arch=x86_64 \nodetype.profile=compute \nodetype.nodetype=osi
再執(zhí)行:chdef wtest kernel=Boot/pxeboot.0
使用lsdef wtest查看配置信息。
添加鏡像: copycds -n win7 /media/sf_VData/xCat/cn_windows_7_ultimate_x64_dvd_x15-66043.iso
Copying media to /install/win7/x86_64
Media copy operation successful chdef -t osimage win7-x86_64-install-compute \
imagetype=windows \
osarch=x86_64 \
osname=Windows \
osvers=win7 \
profile=ultimate \
provmethod=install \
template=/media/sf_VData/xCat/template/win7/ultimate.win7.x86_64.tmpl
使用lsdef -t osimage 查看
boot程序(之前提前已經(jīng)做好,不同windows需要制作對應(yīng)版本boot,需要添加網(wǎng)絡(luò)驅(qū)動,參照官網(wǎng)) [root@centos74 tftpboot]# ls /media/sf_VData/xCat/template/win7/startBoot/*
/media/sf_VData/xCat/template/win7/startBoot/bootmgr.exe
/media/sf_VData/xCat/template/win7/startBoot/Boot:
BCD BCD.64.LOG BCD.64.LOG2 bootmgr.efi Fonts wdsmgfw.efi
BCD.64 BCD.64.LOG1 bootmgfw.efi boot.sdi pxeboot.0 WinPE_64.wim
[root@centos74 tftpboot]# cp /media/sf_VData/xCat/template/win7/startBoot/* . -r
注意修改權(quán)限為755.
配置其他信息: makehosts //添加/etc/hosts
makedns test //添加dns
makedhcp test // 配置dhcp
添加后處理: 創(chuàng)建后處理需要用到的文件目錄:
cp * /install/winpostscripts
權(quán)限修改為755
添加驅(qū)動: 將驅(qū)動拷貝到/install/drivers// 目錄下。 例如: /install/drivers/win2012r2/x86_64/ 安裝系統(tǒng): nodeset test osimage=win7-x86_64-install-compute
/install/autoinst目錄下,對應(yīng)的$IP.cmd 需要添加: ...
copy %instdrv%\winpostscripts\* c:\xcatpost\^M
copy %instdrv%\mypostscripts\mypostscript.htest c:\xcatpost\^M
goto up
:SKIPPOST^M
reg load HKLM\csystem c:\windows\system32\config\system^M
...
問題總結(jié):
bios需要啟用pxe boot并且設(shè)置從網(wǎng)路啟動 提示succeed to downloadn NBP file。但是沒有執(zhí)行安裝而正常啟動,則需要開啟legacy mode。
轉(zhuǎn)載于:https://www.cnblogs.com/fanxiaowei/p/9505200.html
總結(jié)
以上是生活随笔 為你收集整理的xCat 批量安装系统 的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔 網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔 推薦給好友。