[libvirt] [PATCH] Use port range 5901-5999 if not set in qemu.conf, avoid port 5900

Daniel P. Berrange berrange at redhat.com
Fri Apr 21 10:00:38 UTC 2017


On Fri, Apr 21, 2017 at 11:43:52AM +0200, Christophe de Dinechin wrote:
> 
> 
> BTW, if you really run 4K VMs on a single host, assigning one port per VM
> for display will become a problem anyway. There are only 64K ports available,
> so using 4K just for displays does not scale well, not even counting the 
> ports you might need for the VM workloads themselves. It might be time to
> think about adding a VM ID directly in the protocol and having multiple 
> connections to the same port.

4k ports for VNC still leaves 60k for other services, which allows another
17 ports per QEMU instance. The only way you're going to hit that limit
with 4k VMs is if you run the in-QEMU  RBD client against a ceph server
that has lots of monitor hosts, at which point avoiding 4k ports from VNC
is going to have negligble benefit. So there's no real problem here for
common deployments.

If VNC were to be a problem though you would just put QEMU VNC onto
a UNIX socket, and run a websockets proxy to expose the VNC servers over
a single HTTP service. 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list