日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

xCat 批量安装系统

發布時間:2023/12/10 windows 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 xCat 批量安装系统 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

xCat 使用方法

新裝centos74 作為xcat master, 關閉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源:(根據自己的linux環境選擇,我的是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服務器:

    chtab key=master site.value=192.168.18.28 chtab key=domain site.value=HPC # 根據具體情況配置,這個屬性最后會被寫到每個node的/etc/resolv.conf文件里 (必須配置) chtab key=nameservers site.value=192.168.18.28 # 根據具體情況配置,這個屬性最后會被寫到每個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 重啟服務: systemctl restart dhcpd.service makedhcp -n

    注意:如果存在windows節點,則需要xcat master上配置samba,安裝過程需要。

    安裝samba: yum install samba.
    修改/etc/samba/smb.conf的[global]段: security = share。
    注意: samba4 設置(需要設置install目錄及下所有權限為777):

    security = user map to guest = Bad User

    并增加

    [install] path = /install public = yes writable = yes guest ok = yes chkconfig smb on service smb restart

    新增節點

    centos7.4:

    hostname: test ip: 192.168.18.29 mac: 080027D59856 內存大于1G

  • 添加節點:
  • 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 查看, 根據需求修改模板

    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可查看是否改變。 創建后處理需要用到的文件目錄: cp * /install/postscripts 權限修改為755
  • 安裝系統:
    nodeset test osimage=centos7-x86_64-install-compute
  • win7:

    hostname: wtest ip: 192.168.18.30 mac: 080027299B89

  • 添加節點:
  • 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 再執行: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程序(之前提前已經做好,不同windows需要制作對應版本boot,需要添加網絡驅動,參照官網)
  • [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

    注意修改權限為755.

  • 配置其他信息:
  • makehosts //添加/etc/hosts makedns test //添加dns makedhcp test // 配置dhcp
  • 添加后處理:
  • 創建后處理需要用到的文件目錄: cp * /install/winpostscripts 權限修改為755
  • 添加驅動:
    將驅動拷貝到/install/drivers// 目錄下。
    例如: /install/drivers/win2012r2/x86_64/
  • 安裝系統:
    nodeset test osimage=win7-x86_64-install-compute

  • /install/autoinst目錄下,對應的$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 ...

    問題總結:

  • bios需要啟用pxe boot并且設置從網路啟動
  • 提示succeed to downloadn NBP file。但是沒有執行安裝而正常啟動,則需要開啟legacy mode。
  • 轉載于:https://www.cnblogs.com/fanxiaowei/p/9505200.html

    總結

    以上是生活随笔為你收集整理的xCat 批量安装系统的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。