Libvirt vm migration error

When trying to migrate VM’s from one system to another i run into the following error. The 2 systems have independent storage (no shared storage) just testing if it’s possible to migrate VM’s across systems with out shared storage.

virsh migrate vm.example.com qemu+ssh://USER@IP/system --live --verbose --copy-storage-all --persistent --undefinesource 
error: internal error: unable to execute QEMU command 'blockdev-add': Failed to connect to 'fedora:49153': Connection timed out

Make sure to open the relevant ports on the destination host:

sudo grep -e migration_port_ /etc/libvirt/qemu.conf
sudo firewall-cmd --permanent --add-port=49152-49215/tcp
sudo firewall-cmd --reload

Ports already open on the hosts

Check the output on the source host:

getent hosts fedora
resolvectl query fedora

I tested libvirt migration on Fedora 39 and it works fine.

I suggest use the modern version of sneaker.net and copy the file and re-bless the image at the other end. It works and also it works. You just have to copy the following to the same paths at the destination:

/etc/libvirt/qemu/serv01.xml
/var/lib/libvirt/images/serv01.img

Then at the destination end bless it:

virsh define /etc/libvirt/qemu/serv01.xml 

There is also a process to “clean” the image of your deep secrets

virt-sysprep: reset or unconfigure a virtual machine so clones can be made

It has a lot of options. It looks complicated but cleaning the basics is easy.