lkoih 发表于 2015-9-21 09:37:41

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

现象,执行ssh $remoteIP之后,
$ virt-manager
Unable to initialize GTK: could not open display
解决方法:
通过ssh -X连接对端服务器

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


解决方法:
在/etc/polkit-1/localauthority/50-local.d

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


页: [1]
查看完整版本: 解决远程无法virt-manager的问题