Skip to content

Exposing viewers in multi-host deployments

A desktop announces a SPICE port and a browser-viewer port to the client. The specific ports and required network reachability depend on the flavour of the node hosting the desktop.

Misconfiguration causes a silent outage: desktops start, the platform remains healthy, but viewers for one node fail.

The two hypervisor flavours are not interchangeable

Flavour Included parts Consequence
hypervisor network, video, hypervisor, websockify, squid, stats, storage Self-contained: The video container publishes VIEWER_SPICE and VIEWER_BROWSER on the host. Viewers for this node are served by this node.
hypervisor-standalone network, hypervisor, stats, storage Not self-contained: It lacks video, squid, and websockify. Another node must reach the QEMU viewer port range on this host.

Topology 1 — One viewer port pair per hypervisor

Each hypervisor node runs the hypervisor flavour and publishes its own VIEWER_SPICE and VIEWER_BROWSER. These ports must be:

  1. Unique per node. Two nodes cannot announce the same port.
  2. Forwarded to that node by the site's router or firewall.

No other traffic crosses a host boundary. This is the simplest topology to operate.

graph LR
    C[Viewer client] -->|443 web UI| R{Site router}
    R -->|443| W[Web node]
    R -->|8081 and 8443| V1
    R -->|8082 and 8444| V2
    subgraph N1[Hypervisor node 1 - flavour hypervisor]
        V1[isard-video<br/>publishes 8081 / 8443] --> Q1[isard-hypervisor<br/>QEMU 5900-7899]
    end
    subgraph N2[Hypervisor node 2 - flavour hypervisor]
        V2[isard-video<br/>publishes 8082 / 8444] --> Q2[isard-hypervisor<br/>QEMU 5900-7899]
    end

The QEMU port range stays on the node. Only the viewer port pair published by isard-video on that host crosses the boundary.

Worked example

Hypervisor node 1, in its isardvdi.cfg:

FLAVOUR="hypervisor"
VIDEO_DOMAIN="<public domain of the deployment>"
VIEWER_SPICE=8081
VIEWER_BROWSER=8443

Hypervisor node 2, same file, different ports:

FLAVOUR="hypervisor"
VIDEO_DOMAIN="<public domain of the deployment>"
VIEWER_SPICE=8082
VIEWER_BROWSER=8444

The site's router must forward the following ports:

Port Destination Purpose
80/tcp, 443/tcp Web node Web UI, browser viewers for the web node, native RDP gateway
443/udp Web node User WireGuard (personal networks)
8081/tcp, 8443/tcp Hypervisor node 1 Viewers for desktops running on node 1
8082/tcp, 8444/tcp Hypervisor node 2 Viewers for desktops running on node 2

Adding a third hypervisor requires one more port pair and one more forwarding rule. This is the cost of this topology and the reason the next topology exists.

Topology 2 — Route all viewer traffic through the web node

Hypervisor nodes run hypervisor-standalone and announce the platform's public ports (80/443). Clients always connect to the public domain. The web node proxies the traffic:

  • squid for SPICE.
  • websockify for the browser viewer.
  • Both connect to the QEMU viewer range 5900-7899/tcp on each hypervisor, using the address listed in VIDEO_HYPERVISOR_HOSTNAMES.
graph LR
    C[Viewer client] -->|80 SPICE / 443 browser| R{Site router}
    R -->|80 and 443| P
    subgraph W[Web node - flavour web+storage+video+monitor]
        P[isard-portal] --> S[isard-squid<br/>SPICE proxy]
        P --> K[isard-websockify<br/>browser viewer]
    end
    S -->|5900-7899| Q1
    K -->|5900-7899| Q1
    S -->|5900-7899| Q2
    K -->|5900-7899| Q2
    subgraph N1[Hypervisor node 1 - flavour hypervisor-standalone]
        Q1[isard-hypervisor<br/>QEMU 5900-7899]
    end
    subgraph N2[Hypervisor node 2 - flavour hypervisor-standalone]
        Q2[isard-hypervisor<br/>QEMU 5900-7899]
    end

The site's router only forwards 80 and 443, regardless of the number of hypervisors. However, the two arrows in the middle of the diagram — 5900-7899 from the web node to each hypervisor host — must work. These connections are internal to your infrastructure, not handled by the router.

Worked example

Configure every hypervisor node in its isardvdi.cfg:

FLAVOUR="hypervisor-standalone"
VIDEO_DOMAIN="<public domain of the deployment>"
VIEWER_SPICE=80
VIEWER_BROWSER=443
INFRASTRUCTURE_HOST_IP="<this node's infrastructure address>"

Configure the web node to know where to proxy:

VIDEO_HYPERVISOR_HOSTNAMES="isard-hypervisor,<infra address node 1>,<infra address node 2>"
VIDEO_HYPERVISOR_PORTS="5900-7899"

The site's router must forward the following:

port to why
80/tcp, 443/tcp web node Everything the client sees, including viewers
443/udp web node User WireGuard (personal networks)

Inside the infrastructure, 5900-7899/tcp from the web node to each hypervisor host must reach the container running QEMU. In a single-host deployment, this is automatic because the proxies and the hypervisor share a container network. Across hosts, it is not: the container runtime on that node must publish the range on the node's infrastructure address, or the host firewall must forward it to the container. Whichever mechanism you use, it must survive reboots and redeploys.

This topology has a requirement the first one does not

The proxies on the web node must reach 5900-7899/tcp on every hypervisor host. When the hypervisor runs in a container on another machine, that range must be published or forwarded to the container. If it is not, the desktops on that node start normally, but no viewer on that node works, while the rest of the platform remains healthy.

Choosing and maintaining a topology

Select one topology per deployment and document it. Mixing topologies within the same deployment is the most common cause of viewer failures on specific nodes. This typically occurs when a node announces ports that the site firewall does not forward, or when a node expects the web node to reach a port range that is not published.

Verifying connectivity with a positive control

With one desktop running on each hypervisor, perform the following checks from the node that runs the web stack:

docker exec isard-squid      nc -z -w3 <hypervisor-address> <viewer-port>
docker exec isard-websockify nc -z -w3 <hypervisor-address> <viewer-port>
  1. Retrieve the port from the desktop's viewer data (base_port / ports). Note that this port is not always 5900.
  2. Always test a known working node in the same pass. A "closed" result without a positive control is equally likely to indicate a broken probe (such as a container missing bash or an incorrect port) as a broken network path.
  3. From outside the site, verify that the ports announced by the platform are correctly forwarded:
  4. Run curl on ports 80 and 443.
  5. Perform a TCP probe on each announced viewer port.