运行此命令,报错如下:
我是使用的xshell工具链接的服务器:
# virt-manager
X11 connection rejected because of wrong authentication.
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager.py", line 383, in <module>
main()
File "/usr/share/virt-manager/virt-manager.py", line 286, in main
raise gtk_error
RuntimeError: could not open display
解决问题思路:
安装了 yum groupinstall Virtualization "Virtualization Client"
安装了 yum install libvirt
确认一下x11是否开启了转发的功能!
1234
# grep X11Forwarding –color /etc/ssh/sshd_config
#X11Forwarding no
X11Forwarding yes
# X11Forwarding no
查看一下是否安装了这些包!
123456
# rpm -qa | grep xorg-x11
xorg-x11-xauth-1.0.2-7.1.el6.x86_64
xorg-x11-xinit-1.0.9-14.el6.x86_64
xorg-x11-server-utils-7.5-13.el6.x86_64
xorg-x11-font-utils-7.2-11.el6.x86_64
xorg-x11-drv-ati-firmware-7.1.0-3.el6.noarch
然后在查看一下,$DISPLAY是否有参数;如果没有的话就需要自己手动添加一个!
12345
# echo $DISPLAY 如果返回结果是空行的话,那就是表明没有设置display
# DISPLAY=$yourserver_ip 这个写服务器ip地址!
# export DISPLAY
# echo $DISPLAY
localhost:10.0
再次运行,显示结果为以下内容!
# virt-manager
Xlib: extension "RANDR" missing on display "localhost:10.0".