码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-09-18 18:43:42      阅读:336      评论:0      收藏:0      [点我收藏+]

标签:libvirt

现象,执行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

[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,显示如下信息,表示正常:

技术分享


本文出自 “技术成就未来” 博客,谢绝转载!

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

标签:libvirt

原文地址:http://jishuweiwang.blog.51cto.com/6977090/1696097

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!