Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Install ESXI6 over the PXE network

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Description

We can generally use the following ways to install the system: CD, U disk, PXE network and so on. When we install the system in large quantities, the network is a very efficient choice. VMware ESXI is developed based on Linux, so like all Linux systems, it also supports PXE-based network boot and installation in addition to CD-ROM boot installation. PXE is only the boot mode of network installation, and the core of automation depends on the automatic answer files generated by kickstart/autoyast/autounattend and so on.

Software preparation

Tftpd32+esxi6.0u2+kickstart+hfs+syslinux4.05

1. Host + VMware Workstation12 steps based on windows

1.1 on the windows server, create a folder as the working directory of the TFTP server. The test environment is windows10 and the directory is D:\ esxi6. Copy the pxelinux.0 file from the syslinux program to this directory.

Copy all the files in the ESXI6.0U2 image to the D:\ esxi6 directory, and copy the file with the same name in the MENU.C32 replacement D:\ esxi6 in syslinux.

Create a pxelinux.cfg directory in the D:\ esxi6 directory and copy the file ISOLINUX.CFG from the esxi6.0u2 image to the pxelinux.cfg folder.

Remarks

If you want to install esxi6 for all servers, change the name of ISOLINUX.CFG to default. If you are installing for the specified server, please write down the MAC address of the server (there may be multiple network cards on the server, and you need to write down the MAC address of the network card booted through the network card), and copy the ISOLINUX.CFG file and rename it to "serial number + MAC address", where the serial number is replaced by 01,02,03, indicating the order of the first and second server, and a dash is used between the serial number and the MAC address, for example The MAC address of the first server is F48E38873878, then the file name is 01-F4-8E-38-87-38-78

Be careful

If you fill in the relevant information manually, please ignore step 1.5. Default is kernelopt=runweasel

If you choose auto answer, you also need to modify the boot.cfg configuration file in the D:\ esxi6 directory to kernelopt=ks= http://192.168.40.1/ks.cfg

1.4 set TFTP, open tftpd, and set D:\ esxi6 as the root directory. Set the starting address of the IP address (the address should be in the same network segment as the server address, and after the server address), set as follows, the red part is to be filled in.

1.5 set up the hfs service. The ks.cfg settings of the autoanswer file can be accessed (drag the file directly to the box on the left. In fact, you can also set up a http service yourself. If you want to fill in the relevant information manually, you can ignore this step)

The contents are as follows:

# # Sample scripted installation file## Accept the VMware End User License Agreementvmaccepteula# Set the root password for the DCUI and Tech Support Moderootpw mypassword# Install on the first local disk available on machineinstall-firstdisk-overwritevmfs# Set the network to DHCP on the first network adapternetwork-bootproto=dhcp-device=vmnic0# A sample post-install script%post-interpreter=python-ignorefailure=trueimport timestampFile = open ('/ finished.stamp', mode='w') stampFile.write (time.asctime ())

Set the firewall to allow TFTP to pass through the firewall or turn off the firewall directly.

1.7 enable network installation, select ESXI for the new virtual machine type, boot from the network card after setting up, and enter the installation.

II. Based on Centos6.8_x64+VMware Workstation12

In fact, the same thing was done as in the above steps.

2.1 install dhcp, tftp-server, syslinux, xinetd

Yum install dhcp tftp-server syslinux xinetd

2.2 Mount ESXi ISO to / mnt

Mount / dev/cdrom / mnt

2.3 modify vim / etc/dhcp/dhcpd.conf

Ddns-update-style interim;allow booting;allow bootp;class "pxeclients" {match if substring (option vendor-class-identifier, 0,9) = "PXEClient"; next-server 192.168.10.78 netmask filename = "pxelinux.0";} subnet 192.168.10.0 netmask 255.255.255.0 {range 192.168.10.100 192.168.10.110;}

2.4 enable tftp and modify disable = yes in / etc/xinetd.d/tftp to disable = no

Service tftp {socket_type = dgramprotocol = udpwait = yesuser = rootserver = / usr/sbin/in.tftpdserver_args =-s / var/lib/tftpbootdisable = noper_source = 11cps = 1002flags = IPv4}

2.5 copy pxelinux.0 to the tftp root directory

Cp / usr/share/syslinux/pxelinux.0 / var/lib/tftpboot/

2.6 create a new directory / var/lib/tftpboot/pxelinux.cfg

Mkdir / var/lib/tftpboot/pxelinux.cfg

Copy the isolinux.cfg in the ESXi ISO file to / var/lib/tftpboot/pxelinux.cfg/ and rename it default

Cp / mnt/isolinux.cfg / var/lib/tftpboot/pxelinux.cfg/default

2.8 copy all files in ESXi ISO to / var/lib/tftpboot/

Cp-a / mnt/* / var/lib/tftpboot/

2.9 copy the menu.c32 that comes with syslinux to the tftp root directory and replace the menu.c32 in ESXI ISO.

Cp / usr/share/syslinux/menu.c32 / var/lib/tftpboot/

2.10 restart dhcp and xinetd services

Systemctl restart dhcpd

Systemctl restart xinetd

2.11 Custom installation script to install httpd, this file can be placed anywhere that can be accessed through url. Edit script ks.cfg

Vim / var/www/html/ks.cfg## Sample scripted installation file## Accept the VMware End User License Agreementvmaccepteula# Set the root password for the DCUI and Tech Support Moderootpw mypassword# Install on the first local disk available on machineinstall-- firstdisk-- overwritevmfs# Set the network to DHCP on the first network adapternetwork-- bootproto=dhcp-- device=vmnic0# A sample post-install script%post-- interpreter=python-- ignorefailure=trueimport timestampFile = open ('/ finished.stamp', mode='w') stampFile.write (time.asctime ()

2.12 Edit the boot.cfg file copied by ESXi ISO and add kernelopt=ks= http://192.168.40.1/ks.cfg

Bootstate=0title=Loading ESXi installertimeout=5kernel=/tboot.b00kernelopt=ks= http://192.168.40.1/ks.cfgmodules=/b.b00-- / jumpstrt.gz-- / useropts.gz-- / k.b00-- / chardevs.b00-- / a.b00-- / user.b00-- / uc_intel.b00-/ uc_amd.b00-- / sb.v00-/ s.v00-- / lsi_mr3.v00- -/ lsi_msgp.v00-/ bnxtnet.v00-/ net_tg3.v00-/ elxnet.v00-/ ima_be2i.v00-- / lpfc.v00-- / scsi_be2.v00-/ net_i40e.v00-/ net_igb.v00-/ net_ixgb.v00-/ nmlx4_co.v00-/ nmlx4_en.v00-- / nmlx4_ Rd.v00-/ nmlx5_co.v00-- / qedentv.v00-- / ima_qla4.v00-/ misc_cni.v00-- / net_bnx2.v00-- / net_bnx2.v01-- / net_cnic.v00-/ net_qlcn.v00-- / net_qlge.v00-- / qlnative.v00-/ scsi_bnx.v00-- / scsi_bnx.v01- -/ scsi_qla.v00-/ mtip32xx.v00-/ scsi_meg.v00-/ ata_pata.v00-/ ata_pata.v01-- / ata_pata.v02-- / ata_pata.v03-/ ata_pata.v04-- / ata_pata.v05-- / ata_pata.v06-/ ata_pata.v07-/ block_cc.v00 / ehci_ehc.v00-/ emulex_e.v00-/ weaselin.t00-/ esx_dvfi.v00-/ esx_ui.v00-/ ipmi_ipm.v00-- / ipmi_ipm.v01-/ ipmi_ipm.v02-/ lsu_hp_h.v00-- / lsu_lsi_.v00-/ lsu_lsi_.v01-- / lsu_lsi_.v02 -/ lsu_lsi_.v03-/ lsu_lsi_.v04-/ misc_dri.v00-/ net_e100.v00-/ net_e100.v01-- / net_enic.v00-- / net_forc.v00-/ net_mlx4.v00-/ net_mlx4.v01-/ net_nx_n.v00-/ net_vmxn.v00-/ nvme .v00-/ ohci_usb.v00-/ rste.v00-/ sata_ahc.v00-/ sata_ata.v00-- / sata_sat.v00-- / sata_sat.v01-/ sata_sat.v02-/ sata_sat.v03-- / sata_sat.v04-/ scsi_aac.v00-/ scsi_adp.v00-- / scsi_aic.v00 -/ scsi_fni.v00-/ scsi_hps.v00-/ scsi_ips.v00-/ scsi_meg.v01-/ scsi_meg.v02-- / scsi_mpt.v00-- / scsi_mpt.v01-/ scsi_mpt.v02-- / uhci_usb.v00-/ vsan.v00-/ vsanheal.v00-/ vsanmgmt.v00-- / xhci _ xhc.v00-- / tools.t00-- / dell_con.v00-/ xorg.v00-- / imgdb.tgz-- / imgpayld.tgzbuild=updated=0

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report