Skip to content

Add --graphics option to replace --no-graphic and --vnc#24

Open
thrix wants to merge 1 commit into
mainfrom
graphics-display-option
Open

Add --graphics option to replace --no-graphic and --vnc#24
thrix wants to merge 1 commit into
mainfrom
graphics-display-option

Conversation

@thrix
Copy link
Copy Markdown
Contributor

@thrix thrix commented May 22, 2026

Replace the non-functional --no-graphic and --vnc CLI flags with a single --graphics {spice,vnc,none} option that actually wires through to the libvirt domain XML.

This is useful when one needs graphical access to the VM via a SPICE or VNC client (e.g. virt-viewer or remote-viewer), for example to debug boot issues or interact with a graphical desktop.

The old flags were accepted by argparse but never consumed — they had zero effect on VM creation. The new option generates proper <graphics> and <video> elements in the domain XML. For qemu:///system connections, the graphics display binds to 127.0.0.1 for security.

Also removes the unused self.vnc and self.graphics attributes from the Instance class.

I needed this while working on Fedora CSB :)

Assisted-by: Claude Code

Replace the non-functional `--no-graphic` and `--vnc` CLI flags with a
single `--graphics {spice,vnc,none}` option that actually wires through
to the libvirt domain XML.

This is useful when one needs graphical access to the VM via a SPICE or
VNC client (e.g. `virt-viewer` or `remote-viewer`), for example to debug
boot issues or interact with a graphical desktop.

The old flags were accepted by argparse but never consumed — they had
zero effect on VM creation. The new option generates proper `<graphics>`
and `<video>` elements in the domain XML. For `qemu:///system`
connections, the graphics display binds to `127.0.0.1` for security.

Also removes the unused `self.vnc` and `self.graphics` attributes from
the `Instance` class.

Assisted-by: Claude Code
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
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