Issue


After restarting libvirtd, the VS hot migration fails with the following message:

"Error: internal error: Failed to reserve port."

Environment


Libvirt-4.5.0 and earlier versions

Resolution


One of the possible solutions is to update the libvirt version and dependent packages to 4.6.0 or 5.0.0.

Versions of the libvirt package and its dependencies were tested nor by our QAs neither in a general CentOS repo file. Perform it at your own risk.

The update may be performed in the following way: 

  1. Create the /etc/yum.repos.d/libvirt-latest.repo file with the following content:

    [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
    CODE
  2. Clean the yum cache and update libvirt:

    # yum clean all 
    # yum update libvirt
    CODE
  3. Restart libvirt:

    # systemctl restart libvirtd
    CODE

From now on, the virtual servers started after the libvirtd upgrade will be successfully migrated from compute resources with the upgraded libvirtd. For compute resources with older libvirtd packages, the issue will persist.


Cause


A bug in libvirt-4.5.0 and earlier versions prevents the migration of virtual servers.