Linux command
virt-viewer 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Connect to VM
virt-viewer [vmname]
Connect via URI
virt-viewer -c [qemu:///system] [vmname]
Connect to remote
virt-viewer -c [qemu+ssh://host/system] [vmname]
Full screen
virt-viewer --full-screen [vmname]
Wait for VM
virt-viewer --wait [vmname]
说明
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.
参数
- -c _URI_
- Connection URI.
- --full-screen
- Full screen mode.
- --wait
- Wait for VM.
- --reconnect
- Auto reconnect.
- --hotkeys _KEYS_
- Custom hotkeys.
FAQ
What is the virt-viewer command used for?
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.
How do I run a basic virt-viewer example?
Run `virt-viewer [vmname]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c _URI_ do in virt-viewer?
Connection URI.