ESXi kickstart
Материал из noname.com.ua
ESXi kickstart file
- ESX можно установить с файлом ответов.
- Существует файл ответа по умолчанию, который установит ESX без лишних вопросов, с паролем root = mypassword.
- Так же, можно подложить свой файл ответов, как и раньше по сети, или на USB флешке.
Создание своего образа
- Скачать ESXi ISO
- Подмонтировать образ:
mount -o loop VMware-VMvisor-Installer-5.x.x-XXXXXX.x86_64.iso /esxi_cdrom_mount
- Cкопировать содержимое
cp -r /esxi_cdrom_mount /esxi_cdrom
cp ks_custom.cfg /esxi_cdrom
- исправить boot.cfg file в соответвии с требованиеми (см. ниже)
- Пересоздать образ.
mkisofs -relaxed-filenames -J -R -o custom_esxi.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /esxi_cdrom
пример установочного конфига
# Sample scripted installation file # Accept the VMware End User License Agreement vmaccepteula # Set the root password for the DCUI and ESXi Shell rootpw mypassword # Install on the first local disk available on machine install --firstdisk --overwritevmfs # Set the network to DHCP on the first network adapater, use the specified hostname and do not create a portgroup for the VMs network --bootproto=dhcp --device=vmnic0 --addvmportgroup=0 # reboots the host after the scripted installation is completed reboot %firstboot --interpreter=busybox # Add an extra nic to vSwitch0 (vmnic2) esxcli network vswitch standard uplink add --uplink-name=vmnic2 --vswitch-name=vSwitch0 #Assign an IP-Address to the first VMkernel, this will be used for management esxcli network ip interface ipv4 set --interface-name=vmk0 --ipv4=192.168.1.41 --netmask=255.255.255.0 --type=static # Add vMotion Portgroup to vSwitch0, assign it VLAN ID 5 and create a VMkernel interface esxcli network vswitch standard portgroup add --portgroup-name=vMotion --vswitch-name=vSwitch0 esxcli network vswitch standard portgroup set --portgroup-name=vMotion --vlan-id=5 esxcli network ip interface add --interface-name=vmk1 --portgroup-name=vMotion esxcli network ip interface ipv4 set --interface-name=vmk1 --ipv4=192.168.2.41 --netmask=255.255.255.0 --type=static # Enable vMotion on the newly created VMkernel vmk1 vim-cmd hostsvc/vmotion/vnic_set vmk1 # Add new vSwitch for VM traffic, assign uplinks, create a portgroup and assign a VLAN ID esxcli network vswitch standard add --vswitch-name=vSwitch1 esxcli network vswitch standard uplink add --uplink-name=vmnic1 --vswitch-name=vSwitch1 esxcli network vswitch standard uplink add --uplink-name=vmnic3 --vswitch-name=vSwitch1 esxcli network vswitch standard portgroup add --portgroup-name=Production --vswitch-name=vSwitch1 esxcli network vswitch standard portgroup set --portgroup-name=Production --vlan-id=10 # Set DNS and hostname esxcli system hostname set --fqdn=esxi5.localdomain esxcli network ip dns search add --domain=localdomain esxcli network ip dns server add --server=192.168.1.11 esxcli network ip dns server add --server=192.168.1.12 # Set the default PSP for EMC V-MAX to Round Robin as that is our preferred load balancing mechanism esxcli storage nmp satp set --default-psp VMW_PSP_RR --satp VMW_SATP_SYMM # Enable SSH and the ESXi Shell vim-cmd hostsvc/enable_ssh vim-cmd hostsvc/start_ssh vim-cmd hostsvc/enable_esx_shell vim-cmd hostsvc/start_esx_shell
Links
- http://www.virtuallyghetto.com/2010/09/automating-esxi-41-kickstart-tips.html
- http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.vsphere.install.doc_50/GUID-C03EADEA-A192-4AB4-9B71-9256A9CB1F9C.html
- http://communities.vmware.com/thread/276792
- http://www.virtuallyghetto.com/2011_02_01_archive.html
- http://www.virtuallyghetto.com/2011/02/automating-active-directory-domain-join.html
- http://www.virtuallyghetto.com/2010/09/automating-esxi-41-kickstart-tips.html
- http://vmprofessional.com/index.php?content=kickstart_2
- http://vmprofessional.com/material/ks.cfg
- http://vmprofessional.com/index.php?content=kickstart_1
- http://blogs.balius.com/2010/12/24/esxi-creating-new-virtual-machines-servers-from-the-command-line/
- http://lib.ru/unixhelp/vmware.txt