Hi,
when I enter and exit maintenance mode in my firstboot script, it still is in maintenance mode when booting after the firstboot script is complete (ESXi4.1U2) -- even though the output of vim-cmd hostsvc/hostsummary | grep inMaintenanceMode at the end of the script indicates otherwise (inMaintenanceMode = false).
Here's the simplified script:
accepteula
rootpw --iscrypted xyz
keyboard Default
# defining firstdisk should make sure that we never write the OS onto a non-local disk
autopart --firstdisk=mptsas --overwritevmfs
network --bootproto=static --ip=[IPADDR] --gateway=ggg --nameserver=nnn --netmask=255.255.255.0 --hostname=[HOSTNAME].dom.ain --addvmportgroup=1 --device=[PRIMNIC]
install url http://[UDA_IPADDR]/[OS]/[FLAVOR]
reboot
%firstboot --unsupported --interpreter=busybox --level=998
## PRESS ALT-F1 ON ESX SERVER CONSOLE
## TO VIEW MESSAGES FROM THIS SCRIPT
i=0
echo $i Starting...
.....
.....
###################
###################
###################
###################
###################
###################
%firstboot --unsupported --interpreter=busybox --level=9999
# trouble with altbootbank when esxupdate is used as it is above
# see
# see also Tip#12 http://www.virtuallyghetto.com/2010/09/automating-esxi-41-kickstart-tips.html
# you have to do it this way (two firstboot scripts)
# otherwise it reboots indefinitely...
################### Start: storage extensions
echo $((i=$i+1)) STORAGE EXTENSIONS: SATP PLUGIN, VAAI PLUGIN, AND MULTIPATHING POLICIES
while ! vim-cmd hostsvc/hostsummary | grep inMaintenanceMode | grep -q true; do
vim-cmd /hostsvc/maintenance_mode_enter
sleep 1
done
esxupdate --bundle=http://[UDA_IPADDR]/module1.zip update
esxupdate --bundle=http://[UDA_IPADDR]/module2.zip update
while ! vim-cmd hostsvc/hostsummary | grep inMaintenanceMode | grep -q false; do
vim-cmd /hostsvc/maintenance_mode_exit
sleep 1
done
vim-cmd hostsvc/hostsummary | grep inMaintenanceMode ### --> false!!!
################### End: storage extensions
echo XXX Done... Cleaning up and rebooting
cp /var/log/esxi_install.log "/vmfs/volumes/$(hostname -s)-vmfs-internal01/firstboot-esxi_install.log"
sleep 30
reboot ### --> after reboot again in maintenance mode!!!
Any idea what's happening here?
Thanks,
marki