Skip to content

Vdi port ranges and hooks#137

Open
vk2amv wants to merge 3 commits into
sol1:mainfrom
vk2amv:vdi-port-ranges-and-hooks
Open

Vdi port ranges and hooks#137
vk2amv wants to merge 3 commits into
sol1:mainfrom
vk2amv:vdi-port-ranges-and-hooks

Conversation

@vk2amv
Copy link
Copy Markdown
Contributor

@vk2amv vk2amv commented May 19, 2026

Adds VDI container lifecycle hooks and optional host port range control.

This change lets operators configure a bounded localhost port range for Docker-published VDI RDP ports. When configured, Rustguac selects ports from the specified inclusive range instead of asking Docker for an arbitrary random port. Existing containers whose mapped RDP port falls outside the configured range are replaced so the setting is consistently enforced.

It also adds an optional VDI container hook script. When configured, Rustguac calls the hook after it has inspected the container and learned the mapped RDP port, but before it begins readiness checks. The hook is called again before container removal. This gives deployments a supported way to run external preparation and cleanup logic around the container’s mapped RDP endpoint.

New [vdi] options:
port_range_start = 39000
port_range_end = 39999
container_hook_script = "/opt/rustguac/vdi-container-hook.sh"
container_hook_timeout_secs = 10

Hook invocation format:

<script> up <script> down The hook also receives equivalent environment variables: RUSTGUAC_VDI_HOOK_ACTION RUSTGUAC_VDI_PORT RUSTGUAC_VDI_CONTAINER_ID RUSTGUAC_VDI_CONTAINER_NAME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant