欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 综合教程 >内容正文

综合教程

virt-viewer的简单使用

发布时间:2023/12/13 综合教程 50 生活家
生活随笔 收集整理的这篇文章主要介绍了 virt-viewer的简单使用 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

virt-viewer

简介:virt-viewer是一个用于显示虚拟机的图形控制台的最小工具。 控制台使用VNC或SPICE访问协议。 可以基于其名称,ID或UUID来引用guest虚拟机。如果客户端尚未运行,则可以告知观看者请等待,直到它开始,然后尝试连接到控制台。此查看器可以连接到远程主机以查找控制台信息然后也使用同一网络连接到远程控制台。

用法:virt-viewer [OPTIONS] -- DOMAIN-NAME|ID|UUID

子命令类别

运行“virt-viewer”时,接受以下选项:
-h,-help 显示命令行帮助摘要
-V,--version 显示程序版本号
-v,-verbose 显示有关连接的信息
-w, - wait 等待域启动,然后再尝试连接到控制台
-r,--reconnect
如果关闭并重新启动,则自动重新连接到域
-td PCT,-zoom = PCT
显示窗口的缩放级别(百分比)。 范围10-400。
-d,--direct
不要尝试通过SSH隧道控制台,即使主要
连接URI使用SSH。
-a,--attach
而不是直接TCP / UNIX套接字连接到远程
显示,要求libvirt提供一个预连接的socket
显示。 这避免了需要与远程验证
显示服务器。 此选项仅在连接时有效
到在与virt-viewer相同的主机上运行的客户机
程序。 如果通过libvirt连接到客户端失败,virt-viewer
会自动回退到尝试正常的直接TCP / UNIX
插座连接。

EXAMPLES

1:To connect to the guest called 'demo' running under Xen
# virt-viewer demo
2:To connect to the guest with ID 7 running under QEMU

   #virt-viewer --connect qemu:///system 7


3:To wait for the guest with UUID 66ab33c0-6919-a3f7-e659-16c82d248521 tostartup and then connect, also reconnecting upon restart of VM

    #virt-viewer --reconnect --wait 66ab33c0-6919-a3f7-e659-16c82d248521

4:To connect to a remote console using TLS

          #virt-viewer --connect xen://example.org/ demo

5:To connect to a remote host using SSH, lookup the guest config and thenmake a tunnelled connection of the console

          #virt-viewer --connect qemu+ssh://root@example.org/system demo

6:When using a SSH tunnel to connect to a SPICE console, it's recommended to have ssh-agent running to avoid getting multiple authenticationprompts.To connect to a remote host using SSH, lookup
the guest config and then make a direct non-tunnelled connection of the console

 # virt-viewer --direct --connect xen+ssh://root@example.org/ demo


总结

以上是生活随笔为你收集整理的virt-viewer的简单使用的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。