LinuxCommandLibrary

virt-viewer

Display VM graphical console

TLDR

Connect to VM
$ virt-viewer [vmname]
copy
Connect via URI
$ virt-viewer -c [qemu:///system] [vmname]
copy
Connect to remote
$ virt-viewer -c [qemu+ssh://host/system] [vmname]
copy
Full screen
$ virt-viewer --full-screen [vmname]
copy
Wait for VM
$ virt-viewer --wait [vmname]
copy

SYNOPSIS

virt-viewer [-c uri] [--full-screen] [options] vmname

DESCRIPTION

virt-viewer is a lightweight graphical console client for viewing the display of virtual machines managed by libvirt. It connects to running VMs and renders their graphical output in a native window, providing a simple alternative to the full virt-manager application when only console access is needed.
The tool supports both SPICE and VNC display protocols, automatically detecting the appropriate connection method from the VM's configuration. Remote connections are supported through SSH tunneling, allowing users to securely access VM consoles on remote hypervisors without exposing display ports directly.
Additional features include full-screen mode for dedicated display use, USB device redirection for passing local hardware to the guest, shared clipboard support, and automatic screen resolution adjustment. The viewer can also wait for a VM to start before connecting, making it useful in scripted or automated workflows.

PARAMETERS

-c URI

Connection URI.
--full-screen
Full screen mode.
--wait
Wait for VM.
--reconnect
Auto reconnect.
--hotkeys KEYS
Custom hotkeys.

CAVEATS

libvirt required. VM must be running. X11/Wayland needed.

HISTORY

virt-viewer is part of the virt-manager project, providing a minimal tool for viewing VM graphical consoles.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard