Description of problem: Starting new VMs fails when libvirtd is restarted with already running VMs. This happens when the VMs use autoport='yes' for their vnc / spice display. Version-Release number of selected component (if applicable): 3.7.0 How reproducible: Steps to Reproduce: 1. virsh start vm1 2. systemctl restart libvirtd 3. virsh start vm2 Actual results: $ virsh start vm2 error: Failed to start domain sid error: internal error: process exited while connecting to monitor: ((null):12206): Spice-Warning **: reds.c:2530:reds_init_socket: listen: Address already in use 2017-09-08T13:32:11.329200Z qemu-system-x86_64: failed to initialize spice server Expected results: vm2 gets started The issue seems to be that auto allocated vnc/spice ports are no longer tracked correctly over daemon restarts.
Surprisingly, this is apparently a kernel problem :-/ (see Bug 1432684) That bug is a kernel bug filed against the Fedora 26 kernel, so it's unclear to me just how useful it is to mark this as a duplicate (especially since Guido doesn't (afaik) use the Fedora kernel :-). I'll leave changing the disposition of the BZ to someone who knows better than me.
Let's leave this open, it can track the functional issue for upstream libvirt
Some more info for anyone else watching, the main upstream kernel fix seems to be: commit cbb2fb5c72f48d3029c144be0f0e61da1c7bccf7 Author: Josef Bacik <jbacik> Date: Fri Sep 22 20:20:06 2017 -0400 net: set tb->fast_sk_family Doesn't seem to be in any stable releases at the moment but it's in 4.14