Update of "find_free_port"
Not logged in
Overview

Artifact ID: 8b275916499c9329166be887f88493fd04f293e4
Page Name:find_free_port
Date: 2015-12-18 07:51:57
Original User: vitus
Mimetype:text/x-markdown
Next 69c7b5b69f1ba9c39824e170c24e9d451ac4c7f6
Content

This is helper script that finds port to bind for qemu spice interface.

Usage

find_free_port nnnn

where nnnn is number of port to start search from.

This allows not to reserve port for each of your VMs. Typically you have much more stopped VMs than running, because VM consume many resources. And TCP ports are precious - there are just 65535 of them.

find_free_port uses netstat(8) to find ports, used by some running processes.