Wondering how to fix OnApp “Failed to reserve port” error? We can help you!
Often OnApp users report to us that VS hot migration failed with “error: internal error: Failed to reserve port” after restarting libvirtd.
Here at Bobcares, we handle requests from our customers to fix similar errors as a part of our Server Management Services.
Today we will see how our Support Engineers fix this for our customers.
How to fix OnApp “Failed to reserve port” error
Before going into the steps for fixing this error we will see what causes this error.
One of the main causes for this error is that there is a bug in Libvirt-4.5.0 and earlier versions that prevent the virtual servers’ migration.
Next, we will see the steps that our Support Engineers follow to fix this error.
Steps to fix this error
Following are the steps that our support techs use to fix this kind of error.
We can fix this error by updating the libvirt version and dependent packages to 4.6.0 or 5.0.0.
The update can be performed using the following steps:
1. Firstly, we need to create repo file /etc/yum.repos.d/libvirt-latest.repo.
2. Then add the following content in the repo file:
[centos-libvirt-latest] gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization gpgcheck=1 name=CentOS-$releasever - libvirt-latest baseurl=http://mirror.centos.org/centos-7/$releasever/virt/$basearch/libvirt-latest/ enabled=1
3. After that we can clean yum cache using the following command:
# yum clean all
4. Now we can update libvirt using the following command:
# yum update libvirt
3. Finally we need to restart libvirt. For this we can use the following command:
# systemctl restart libvirtd
Now we will be able to see that, the VS started after libvirtd upgrade will be able to successfully migrate from computing resources with upgraded libvirtd. However, for compute resources with older versions of libvirtd packages, the issue is likely to persist.
[Need assistance? We can help you]
In short, we saw the steps that our Support Techs follow to fix this OnApp error for our customers.