您的位置:首页 > 其它

解决远程无法virt-manager的问题

2015-09-18 16:36 696 查看
现象,执行ssh $remoteIP之后,
[xxoo@BJ_SJHL_LHZQ0006 ~]$ virt-manager
Unable to initialize GTK: could not open display
解决方法:
通过ssh -X连接对端服务器

之后继续,输入virt-manager之后,弹出下面的页面信息:




解决方法:
在/etc/polkit-1/localauthority/50-local.d/50-lhop.pkla
[Remote libvirt SSH access]
Identity=unix-group:xxoo
Action=org.libvirt.unix.manage;org.libvirt.unix.monitor
ResultAny=yes
ResultInactive=yes
ResultActive=yes
确保unix-group中包含的lhop用户是管理员用户即可
国外注释:
The above would allow users of group “lhop” to access libvirt and manage libvirt through policy kit action “org.libvirt.unix.manage” . The above rules are placed in file 50-org.example-libvirt-remote-access.pkla under directory “/etc/polkit-1/localauthority/50-local.d”.

添加上述内容之后,再次执行virt-manager,显示如下信息,表示正常:


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  libvirt