Jump to content

To Restore and Rebuild esx.conf

  • PrintPrint

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:
  1. Unable to display information from vSphere client.
  2. There are chances of HA getting failed.
  3. 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:
    1. SSH or direct console into ESXI host.
    2. Rename the existing esx.conf file.
      # mv /etc/vmware/esx.conf /etc/vmware/esx.conf-backup  
    3. 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  
    4. 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:
    1. SSH or direct console into ESXI host.
    2. Copy the boot image from the /boot folder to the /tmp folder.
      # cp /boot/initrd-x.x.xx-xxxxx.img /tmp  
    3. Create a initrd folder under /tmp directory.
      # cd /tmp  # mkdir initrd  
    4. Decompress the .img file and output the file to /tmp/initrd.
      # cd initrd/  # gunzip -c ../initrd-x.x.xx-xxxxx.img | cpio -id    
    5. Rename the existing esx.conf file.
      # mv /etc/vmware/esx.conf /etc/vmware/esx.conf-backup  
    6. Copy esx.conf to /etc/vmware with the command:
      # cd /tmp/initrd/etc/vmware  # cp esx.conf /etc/vmware     
    7. Update the boot configuration with the command:
       # esxcfg-boot -b 
    8. Reboot the host for changes to take effect.
      NOTE:Network settings may appear before rebooting, VMware recommends rebooting at the earliest convenience.

HP Support forums

Find solutions and collaborate with others on the HP Support Forum
HP.comHP on FacebookHP on TwitterHP on YouTubeHP on Linked InHP on FlickrHP on Google+