Issue
esx.conf
file contains and holds all the configuration data for ESX/ESXi host. Any corruption in this file will result in issues like:
- Unable to display information from vSphere client.
- There are chances of HA getting failed.
- User will get a blank output for commands executed in remote console.
Solution
To resolve this, user needs to rebuild or restore the esx.conf
file. Please follow the below procedure:
- Restoring the esx.conf file for 4.x:
- SSH or direct console into ESXI host.
- Rename the existing esx.conf file.# mv /etc/vmware/esx.conf /etc/vmware/esx.conf-backup
- Run the below command to restore the configuration file from the location /var/log/oldconf :# cp /var/log/oldconf/esx.conf* /etc/vmware/esx.conf
- Restart the management agents.# service mgmt-vmware restart # Service vmware-vpxa restart
NOTE:If the backup file does not exist in /var/log/oldconf or if that file is also corrupted, user must rebuild it.
- Rebuilding the esx.conf file on ESX 4.x:
- SSH or direct console into ESXI host.
- Copy the boot image from the /boot folder to the /tmp folder.# cp /boot/initrd-x.x.xx-xxxxx.img /tmp
- Create a initrd folder under /tmp directory.# cd /tmp # mkdir initrd
- Decompress the .img file and output the file to /tmp/initrd .# cd initrd/ # gunzip -c ../initrd-x.x.xx-xxxxx.img | cpio -id
- Rename the existing esx.conf file.# mv /etc/vmware/esx.conf /etc/vmware/esx.conf-backup
- Copy esx.conf to /etc/vmware with the command:# cd /tmp/initrd/etc/vmware # cp esx.conf /etc/vmware
- Update the boot configuration with the command:# esxcfg-boot -b
- Reboot the host for changes to take effect.
NOTE:Network settings may appear before rebooting, VMware recommends rebooting at the earliest convenience.
Print








