千家信息网

CentOS7.3下怎么部署exsi

发表于:2024-11-24 作者:千家信息网编辑
千家信息网最后更新 2024年11月24日,这篇文章主要讲解了"CentOS7.3下怎么部署exsi",文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习"CentOS7.3下怎么部署exsi"吧!1、查
千家信息网最后更新 2024年11月24日CentOS7.3下怎么部署exsi

这篇文章主要讲解了"CentOS7.3下怎么部署exsi",文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习"CentOS7.3下怎么部署exsi"吧!

1、查看cobbler的版本

[root@cobbler ~]# cobbler --versionCobbler 2.8.0  source: ?, ?  build time: Tue Jan 31 23:25:14 2017[root@cobbler ~]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core)

2、挂载并导入ESXI5.5的数据

[root@cobbler ~]# mount /dev/cdrom /mnt/mount: /dev/sr0 is write-protected, mounting read-only[root@cobbler ~]# cobbler import --path=/mnt --name=EXSI5.5 --arch=x86_64task started: 2017-03-21_143016_importtask started (id=Media import, time=Tue Mar 21 14:30:16 2017)# 以下为提示信息,最开始看到的时候吓我一跳Found a candidate signature: breed=vmware, version=esxi51running: /usr/bin/file /var/www/cobbler/ks_mirror/EXSI5.5-x86_64/s.v00received on stdout: /var/www/cobbler/ks_mirror/EXSI5.5-x86_64/s.v00: gzip compressed data, was "vmvisor-sys.tar.vtar", from Unix, last modified: Thu Sep 19 14:39:27 2013received on stderr: Found a candidate signature: breed=vmware, version=esxi60running: /usr/bin/file /var/www/cobbler/ks_mirror/EXSI5.5-x86_64/s.v00received on stdout: /var/www/cobbler/ks_mirror/EXSI5.5-x86_64/s.v00: gzip compressed data, was "vmvisor-sys.tar.vtar", from Unix, last modified: Thu Sep 19 14:39:27 2013received on stderr: Found a candidate signature: breed=vmware, version=esxi5running: /usr/bin/file /var/www/cobbler/ks_mirror/EXSI5.5-x86_64/s.v00received on stdout: /var/www/cobbler/ks_mirror/EXSI5.5-x86_64/s.v00: gzip compressed data, was "vmvisor-sys.tar.vtar", from Unix, last modified: Thu Sep 19 14:39:27 2013received on stderr: Found a candidate signature: breed=vmware, version=esxi55running: /usr/bin/file /var/www/cobbler/ks_mirror/EXSI5.5-x86_64/s.v00received on stdout: /var/www/cobbler/ks_mirror/EXSI5.5-x86_64/s.v00: gzip compressed data, was "vmvisor-sys.tar.vtar", from Unix, last modified: Thu Sep 19 14:39:27 2013received on stderr: Found a matching signature: breed=vmware, version=esxi55Adding distros from path /var/www/cobbler/ks_mirror/EXSI5.5-x86_64:running: /usr/bin/file /var/www/cobbler/ks_mirror/EXSI5.5-x86_64/tools.t00received on stdout: /var/www/cobbler/ks_mirror/EXSI5.5-x86_64/tools.t00: gzip compressed data, from Unix, last modified: Thu Sep 19 14:38:11 2013received on stderr: creating new distro: EXSI5.5-x86_64trying symlink: /var/www/cobbler/ks_mirror/EXSI5.5-x86_64 -> /var/www/cobbler/links/EXSI5.5-x86_64creating new profile: EXSI5.5-x86_64associating repos*** TASK COMPLETE ***[root@cobbler ~]# echo $?0说明:以上的输出结果可知,导入没有问题

3、编辑kickstart文件

[root@cobbler ~]# cd /var/lib/cobbler/kickstarts/[root@cobbler kickstarts]# vim ESXI55.cfg # set for install esxi55vmaccepteula# 注意如果密码长度小于7位,安装的时候会有报错的(可惜忘记截图了)rootpw redhat123456clearpart --firstdisk --overwritevmfsinstall --firstdisk --overwritevmfs# 注意网卡名称为vmnic0network --bootproto=dhcp --device=vmnic0reboot --noeject[root@cobbler kickstarts]# lltotal 64-rw-r--r-- 1 root root 1254 Mar 20 15:32 CentOS-6.7-x86_64.cfg-rw-r--r-- 1 root root 1301 Mar 20 12:23 CentOS-7.3-x86_64.cfg-rw-r--r-- 1 root root  115 Nov 17 03:09 default.ks-rw-r--r-- 1 root root   22 Nov 17 03:09 esxi4-ks.cfg-rw-r--r-- 1 root root  184 Mar 21 14:44 ESXI55.cfg-rw-r--r-- 1 root root   22 Nov 17 03:09 esxi5-ks.cfgdrwxr-xr-x 2 root root   56 Mar 20 10:39 install_profiles-rw-r--r-- 1 root root 1424 Nov 17 03:09 legacy.ks-rw-r--r-- 1 root root  292 Nov 17 03:09 pxerescue.ks-rw-r--r-- 1 root root 2916 Nov 17 03:09 sample_autoyast.xml-rw-r--r-- 1 root root 1825 Nov 17 03:09 sample_end.ks-rw-r--r-- 1 root root    0 Nov 17 03:09 sample_esx4.ks-rw-r--r-- 1 root root  324 Nov 17 03:09 sample_esxi4.ks-rw-r--r-- 1 root root  386 Nov 17 03:09 sample_esxi5.ks-rw-r--r-- 1 root root 1784 Nov 17 03:09 sample.ks-rw-r--r-- 1 root root 3419 Nov 17 03:09 sample_old.seed-rw-r--r-- 1 root root 5879 Nov 17 03:09 sample.seed说明:可以参考sample_esxi5.ks文件进行编辑[root@cobbler kickstarts]# cobbler listdistros:   CentOS-6.7-x86_64   CentOS-7.3-x86_64   EXSI5.5-x86_64profiles:   CentOS-6.7-x86_64   CentOS-7.3-x86_64   EXSI5.5-x86_64systems:   cobbler2repos:p_w_picpaths:mgmtclasses:packages:files:

4、查看cobbler profile

[root@cobbler kickstarts]# cobbler profile reportName                           : CentOS-7.3-x86_64TFTP Boot Files                : {}Comment                        : DHCP Tag                       : defaultDistribution                   : CentOS-7.3-x86_64Enable gPXE?                   : 0Enable PXE Menu?               : 1Fetchable Files                : {}Kernel Options                 : {'biosdevname': '0', 'net.ifnames': '0'}Kernel Options (Post Install)  : {}Kickstart                      : /var/lib/cobbler/kickstarts/CentOS-7.3-x86_64.cfgKickstart Metadata             : {}Management Classes             : []Management Parameters          : <>Name Servers                   : []Name Servers Search Path       : []Owners                         : ['admin']Parent Profile                 : Internal proxy                 : Red Hat Management Key         : <>Red Hat Management Server      : <>Repos                          : []Server Override                : <>Template Files                 : {}Virt Auto Boot                 : 1Virt Bridge                    : xenbr0Virt CPUs                      : 1Virt Disk Driver Type          : rawVirt File Size(GB)             : 5Virt Path                      : Virt RAM (MB)                  : 512Virt Type                      : kvmName                           : CentOS-6.7-x86_64TFTP Boot Files                : {}Comment                        : DHCP Tag                       : defaultDistribution                   : CentOS-6.7-x86_64Enable gPXE?                   : 0Enable PXE Menu?               : 1Fetchable Files                : {}Kernel Options                 : {}Kernel Options (Post Install)  : {}Kickstart                      : /var/lib/cobbler/kickstarts/sample_end.ksKickstart Metadata             : {}Management Classes             : []Management Parameters          : <>Name Servers                   : []Name Servers Search Path       : []Owners                         : ['admin']Parent Profile                 : Internal proxy                 : Red Hat Management Key         : <>Red Hat Management Server      : <>Repos                          : []Server Override                : <>Template Files                 : {}Virt Auto Boot                 : 1Virt Bridge                    : xenbr0Virt CPUs                      : 1Virt Disk Driver Type          : rawVirt File Size(GB)             : 5Virt Path                      : Virt RAM (MB)                  : 512Virt Type                      : kvmName                           : EXSI5.5-x86_64TFTP Boot Files                : {}Comment                        : DHCP Tag                       : defaultDistribution                   : EXSI5.5-x86_64Enable gPXE?                   : 0Enable PXE Menu?               : 1Fetchable Files                : {}Kernel Options                 : {}Kernel Options (Post Install)  : {}Kickstart                      : /var/lib/cobbler/kickstarts/sample_esxi5.ksKickstart Metadata             : {}Management Classes             : []Management Parameters          : <>Name Servers                   : []Name Servers Search Path       : []Owners                         : ['admin']Parent Profile                 : Internal proxy                 : Red Hat Management Key         : <>Red Hat Management Server      : <>Repos                          : []Server Override                : <>Template Files                 : {}Virt Auto Boot                 : 1Virt Bridge                    : xenbr0Virt CPUs                      : 1Virt Disk Driver Type          : rawVirt File Size(GB)             : 5Virt Path                      : Virt RAM (MB)                  : 512Virt Type                      : kvm说明:由上的输出结果,我们可以发现, EXSI5.5-x86_64默认的kickstart文件是/var/lib/cobbler/kickstarts/sample_esxi5.ks,显然这不是我们想要的[root@cobbler kickstarts]# cobbler profile edit --name=EXSI5.5-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ESXI55.cfg# 修改EXSI5.5-x86_64默认的kickstart文件为/var/lib/cobbler/kickstarts/ESXI55.cfg,并再次查看[root@cobbler kickstarts]# cobbler profile reportName                           : CentOS-7.3-x86_64TFTP Boot Files                : {}Comment                        : DHCP Tag                       : defaultDistribution                   : CentOS-7.3-x86_64Enable gPXE?                   : 0Enable PXE Menu?               : 1Fetchable Files                : {}Kernel Options                 : {'biosdevname': '0', 'net.ifnames': '0'}Kernel Options (Post Install)  : {}Kickstart                      : /var/lib/cobbler/kickstarts/CentOS-7.3-x86_64.cfgKickstart Metadata             : {}Management Classes             : []Management Parameters          : <>Name Servers                   : []Name Servers Search Path       : []Owners                         : ['admin']Parent Profile                 : Internal proxy                 : Red Hat Management Key         : <>Red Hat Management Server      : <>Repos                          : []Server Override                : <>Template Files                 : {}Virt Auto Boot                 : 1Virt Bridge                    : xenbr0Virt CPUs                      : 1Virt Disk Driver Type          : rawVirt File Size(GB)             : 5Virt Path                      : Virt RAM (MB)                  : 512Virt Type                      : kvmName                           : CentOS-6.7-x86_64TFTP Boot Files                : {}Comment                        : DHCP Tag                       : defaultDistribution                   : CentOS-6.7-x86_64Enable gPXE?                   : 0Enable PXE Menu?               : 1Fetchable Files                : {}Kernel Options                 : {}Kernel Options (Post Install)  : {}Kickstart                      : /var/lib/cobbler/kickstarts/sample_end.ksKickstart Metadata             : {}Management Classes             : []Management Parameters          : <>Name Servers                   : []Name Servers Search Path       : []Owners                         : ['admin']Parent Profile                 : Internal proxy                 : Red Hat Management Key         : <>Red Hat Management Server      : <>Repos                          : []Server Override                : <>Template Files                 : {}Virt Auto Boot                 : 1Virt Bridge                    : xenbr0Virt CPUs                      : 1Virt Disk Driver Type          : rawVirt File Size(GB)             : 5Virt Path                      : Virt RAM (MB)                  : 512Virt Type                      : kvmName                           : EXSI5.5-x86_64TFTP Boot Files                : {}Comment                        : DHCP Tag                       : defaultDistribution                   : EXSI5.5-x86_64Enable gPXE?                   : 0Enable PXE Menu?               : 1Fetchable Files                : {}Kernel Options                 : {}Kernel Options (Post Install)  : {}Kickstart                      : /var/lib/cobbler/kickstarts/ESXI55.cfgKickstart Metadata             : {}Management Classes             : []Management Parameters          : <>Name Servers                   : []Name Servers Search Path       : []Owners                         : ['admin']Parent Profile                 : Internal proxy                 : Red Hat Management Key         : <>Red Hat Management Server      : <>Repos                          : []Server Override                : <>Template Files                 : {}Virt Auto Boot                 : 1Virt Bridge                    : xenbr0Virt CPUs                      : 1Virt Disk Driver Type          : rawVirt File Size(GB)             : 5Virt Path                      : Virt RAM (MB)                  : 512Virt Type                      : kvm# 进行cobbler数据同步[root@cobbler ~]# cobbler sync# 根据mac地址,分配一个固定IP[root@cobbler ~]# cobbler system add --name=esxi55-01 --mac=00:0C:29:4A:9F:44 --profile=EXSI5.5-x86_64 --ip-address=10.10.10.168 --subnet=255.255.255.0 --gateway=10.10.10.2 --interface=vmnic0 --static=1 --hostname=esxi55-01.saltstack.com --name-servers="10.10.10.2"说明:以上的网卡是esxi55客户机的真实网卡,为它安装的时候指定一个固定的ip、子网掩码、网关、主机名、DNS等[root@cobbler ~]# cobbler system list   esxi55-01

然后开启服务器,坐等ESXI5.5安装完毕

在esxi5.5上配置好ssh后,命令行模式下测试下网络情况

~ # ping 10.10.10.2PING 10.10.10.2 (10.10.10.2): 56 data bytes64 bytes from 10.10.10.2: icmp_seq=0 ttl=128 time=1.044 ms64 bytes from 10.10.10.2: icmp_seq=1 ttl=128 time=0.691 ms64 bytes from 10.10.10.2: icmp_seq=2 ttl=128 time=0.624 ms--- 10.10.10.2 ping statistics ---3 packets transmitted, 3 packets received, 0% packet lossround-trip min/avg/max = 0.624/0.786/1.044 ms~ # ping www.sina.com.cnPING www.sina.com.cn (60.215.128.246): 56 data bytes64 bytes from 60.215.128.246: icmp_seq=0 ttl=128 time=23.509 ms64 bytes from 60.215.128.246: icmp_seq=1 ttl=128 time=26.123 ms64 bytes from 60.215.128.246: icmp_seq=2 ttl=128 time=26.520 ms--- www.sina.com.cn ping statistics ---3 packets transmitted, 3 packets received, 0% packet lossround-trip min/avg/max = 23.509/25.384/26.520 ms

到此,一个完整的ESXI5.5就部署完成了。

感谢各位的阅读,以上就是"CentOS7.3下怎么部署exsi"的内容了,经过本文的学习后,相信大家对CentOS7.3下怎么部署exsi这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是,小编将为大家推送更多相关知识点的文章,欢迎关注!

0