Unexpected error while upgrading upgrade unit: Upgrade not attempted because dry-run of upgrade on host [UUID] failed with message: [LockingError] Another process is updating the ESX image. Please try again later./var/log/esxupdate.log, a VibDownloadError or LockingError is observed: esximage.Errors.VibDownloadError: ('https://[FQDN]:443/vib/vmware-hbr-agent.vib', ...) Error locking file /var/run/esximg.pid: [Errno 11] Resource temporarily unavailable, the file is currently locked by process with PID ####/var/log/esxupdate.log:[Timestamp] In(14)[+] esxupdate[12345678]: Command: update[Timestamp] In(14)[+] esxupdate[12345678]: Args: ['update'][Timestamp] In(14)[+] esxupdate[12345678]: Options:[Timestamp] In(14) esxupdate[12345678]: viburls = ['https://[FQDN]:443/vib/vmware-hbr-agent.vib']
/var/log/esxupdate.log ,the NSX upgrade process attempting to access the ESX image.[Timestamp] In(14) esxupdate[123456789]: Installers initiated are {'quickpatch': <vmware.esximage.Installer.QuickPatchInstaller.QuickPatchInstaller object at [HEX]>, 'live': <vmware.esximage.Installer.LiveImageInstaller.LiveImageInstaller object at [HEX]>, 'boot': <vmware.esximage.Installer.BootBankInstaller.BootBankInstaller object at [HEX]>, 'locker': <vmware.esximage.Installer.LockerInstaller.LockerInstaller object at [HEX]>}[Timestamp] Er(11) esxupdate[123456789]: Error locking file /var/run/esximg.pid: [Errno 11] Resource temporarily unavailable, the file is currently locked by process with PID 12345678[Timestamp] Wa(12) esxupdate[12345678]: Failed to acquire lock: ('/var/run/esximg.pid', 'Error locking file /var/run/esximg.pid: [Errno 11] Resource temporarily unavailable, the file is currently locked by process with PID 12345678')
The failure occurs because the vSphere Replication Appliance attempts to automatically push or update the Host-Based Replication (HBR) agent VIB simultaneously with the ESXi/VxRail upgrade process. This creates a resource lock on the ESX image manager (esxupdate), preventing the primary upgrade from proceeding. In some cases, DNS resolution failures on the host may also prevent the HBR VIB from downloading, extending the duration of the lock.
Verify that the ESXi host can resolve the FQDN of the vSphere Replication Appliance. If the resource lock persists, follow these steps:
/opt/vmware/hms/bin/hms-configtool -cmd reconfig -property hms-auto-install-hbragent-vib=falsesystemctl restart hms/opt/vmware/hms/bin/hms-configtool -cmd reconfig -property hms-auto-install-hbragent-vib=trueNote: vSphere Replication traffic for existing VMs is handled by the agent already loaded in memory and is not disrupted by disabling the auto-deployment mechanism during the upgrade window.