Issue


When trying to hot migrate a virtual server on a static compute resource, the migration fails with the following message:

error: internal error Attempt to migrate guest to the same host
CODE

Environment


Static KVM compute resources


Resolution


To resolve the issue, you need to configure the unique libvirt UUID:

  1. Check the current libvirt UUID:

    # virsh capabilities | grep uuid 
    
    <uuid>b4eef507-e834-428f-82f5-188ab3d1b26e</uuid>
    CODE
  2. Generate the new libvirt UUID:

    # uuidgen 
    
    b1285b1c-7fa0-4c07-8ec7-cb8237b41140
    CODE
  3. Edit the /etc/libvirt/libvirtd.conf file and add/edit the following line:

    host_uuid = “b1285b1c-7fa0-4c07-8ec7-cb8237b41140”
    CODE
  4. Restart libvirtd# service:

    # service libvirtd restart 
    
    Redirecting to /bin/systemctl restart libvirtd.service
    CODE

Cause


The same UUIDS across the source and destination compute resources. Before a migration starts, virsh checks the UUID of the system by executing virsh sysinfo. Also, it executes the same command on the host the VS is migrated to and prevents it from migrating to the same server in case of a cluster of compute resources.