When I was playing with ESXi 5.0 in my lab I noticed some changes during the installation process. Of course I had not bothered to read the documentation but when I watched the installer fail I figured it might make sense to start reading. I’ve documented the scripted installation procedure multiple times by now. But in short, when you would boot using the ESXi CD-ROM you would simply need to edit the following string and make it look as follows:
With ESXi 5.0 this has been simplified, this is what it looks like today:

I also want to point out that many of the standard installation commands have been replaced, removed or are not supported anymore. I created a simple script to automatically install an ESXi 5.0 host. It creates a second vSwitch and a second VMkernel for vMotion. It enables both the local and remote TSM and sets the default PSP for the EMC VMAX to Round Robin. As you can see there is a huge shift in this script towards esxcli. Although some of the old “esxcfg-*” commands might still be working they are deprecated and no longer supported. The new standard is esxcli, make sure you get familiarized with it and start using it today as over time this will be the only CLI tool available.
# 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
For more deepdive information read William’s post on ESXCLI and Scripted Installs.






Hi, thank you for this useful post.
I just wanted to let you know that ESXi 4.1 and 5.0 are supported in my USB creator software.
It means you can create an USB flash drive containing ESXi setup very easily. The ks.cfg file will be autmatically created (see FAQ) and will be kept if it already exists.
The software is free, open-source and currently supports a lots of other things (Linux distributions, Windows ISO …).
You can download it @ http://www.linuxliveusb.com
I hope you will like it.
Please contact me through the software’s website if you encounter any problems.
duncan, do you know if unattended installations to a Flash or USB disk will be supported in v5? it’s one of those things that we found odd in 4.x. what’d be the difference in a manual and unattended install anyway.
Scripted install to USB/Flash is definitely supported in 5.0.
The reason for the changes in the base scripted install commands stems from the “dd” raw image going away. With 5.0 whatever was booted on the ISO or across the network is what gets “cached” to the disk.
yes as far as I know it will be.
Hi Duncan
Thanks for your post, it helped me a lot to tranfer my ols scripts. Could it be, that there is a small syntax error in the line:
esxcli storage nmp satp set –default-psp=VMW_PSP_RR –satp=VMW_SATP_SYMM
In my environment it’s only working without equal signs:
esxcli storage nmp satp set –default-psp VMW_PSP_RR –satp VMW_SATP_SYMM
Regards,
Chris
Ok I had this working fine with ESXi4.1 and can’t get it to work with 5.
Any help appreciated.
I’m running Rhel4 (linux) as my pxeboot kickstart server.
I created the following folder layout in my /tftpboot directory.
/tftpboot/images/vsphere/esxi50
I dumped the contents of the ESXI5.0 iso into this directory.
I then coped the menu.c32 and mboot.c32 into my /tftpboot dir. I noticed that they are in capitals (MBOOT.C32 and MENU.C32 on the CD).
I then created my default file in pxelinux.cfg.
Something like this
default menu.c32
prompt 0
timeout 100
MENU TITLE ESXi 5 Kickstart
LABEL ESXi 5 Kickstart
menu label ESXi 5 Kickstart
kernel mboot.c32 -c images/vsphere/esxi50/BOOT.CFG ks=nfs://192.168.1.14/kickstart/ksfiles/ks.192.168.1.16.cfg
I created a standard ks.cfg.
I then tried a test kickstart. However I keep getting the message that the “Initial menu has no LABEL entries!”.
I then removed a lot of the lines from the default file but I get an error that it can’t find kernel image: linux.
Is there something obvious that I’m missing or any reason this wont work?
Many Thanks
J