VMware VM replication reaches 100% and hangs. No error or warning is displayed.
Logs from /var/run/log/hostd.log on ESX host contain a message similar to the following :
2021-08-13T22:28:12.116Z error hostd [user@6876 sub=Req@vim25/22.214.171.124] length of HTTP request body exceeds configured maximum 100000
Limitation on the VMware side: it does not allow SOAP API requests longer than 100000 symbols
To work around the issue, increase the maximum length of API requests in config:
- Login to affected(target) ESXi host via SSH. It is recommended to do it on all hosts
- As a precaution, take a backup of the config file by running the below command:
cp /etc/vmware/hostd/config.xml /etc/vmware/hostd/config.xml-backup
Start editing /etc/vmware/hostd/config.xml using vi editor
Type i to switch to editing mode
- Add\change below line in soapRequest of vmomi section:
- Save and close the file.
Type :wq to save and quit vi
- Restart the hostd service by running the following command:
Check if the replication works correctly
In case the issue reproduces after the change, check the hostd.log again.
If the message in logs still contains 100000 (or whatever value was there before the change), then changes to the config were not applied properly. Repeat the steps 1-6 again.
If the message in logs shows the new value (600000 in our example) then the request is longer than the specified value. Keep increasing maxUnauthenticatedDocSize value until this error disappears from the logs: sometimes the value needs to be increased to 10 000 000.