Archive for the ‘VMware’ Category

The following scripts were written to bulk upgrade VMware virtual machines’ hardware from v4 to v7.

After the upgrade of a specific virtual machine, the first NIC adapter is also changed to use the new VMXNET3 adapter. And finally some of the changes are done to the virtual machine configuration to gain maximum performance (disable VM logging, set unlimited CPU and memory reservations)

Download the script collection from here.

The script collection includes three scripts.



This is a sample kickstart file for VMware ESXi 4.1 installations.

PXE environment is setup under CentOS 5.5-x86_64, with restricted dhcpd (i.e. no free leases), tftp-server and httpd (for hosting installation and some configuration files). Instructions for setting up PXE environment for VMware ESXi 4.1 can be founded here. Here, the typical VMware scripted installation processe has slightly been modified to automatically install multiple hosts simultaneously without any user interaction. The host needs to be *manually* PXE boot. Then it will install OS according to the ks.cfg file and reboot. After the reboot the %firstboot section will execute. During the %firstboot execution, it will look for file, post_install.cfg which includes all the post installation configurations. post_install.cfg requires a file called arp_table to grab the correct IPv4 addresses and hostname(based on vmnic0 MAC address). After executing all post configurations, the host will enter into the maintenance mode and reboots.

According to this setup, all files, ks.cfg, post_install.cfg and arp_table, should be placed under http://<pxe_server>/kickstart directory.

Note: At the time of this writing, in VMware ESXi 4.1 scripted installation, %post section changes are only applied to the pre-boot environment. i.e. the changes you made in %post section will be lost after the first reboot. So %firstboot section is used to make the post installation changes.