I'm switching some VMs from VNC display type to SPICE.
VNC display type offers a very handy
to= parameter allowing QEMU to automatically use the first free port from a defined range:
Here QEMU will use ports between 5900 and 6000 for each new VNC display server.
What is the cleanest way to achieve such functionality with SPICE display (by the way I'm not using libvirt)?
Currently I'm on my way to script a test greping
netstat output to find a yet unused port and pass it to:
Without mentioning race conditions, I just find this method quite ugly compared to the VNC one. And since QEMU manpage does not seem very exhaustive (VNC
to= parameter doesn't seem mentioned for instance), then I wonder if by any chance there is an equivalent parameter for SPICE?