Ubuntu Kvm USB重定向问题解决

前言

最近在使用Ubuntu下的Kvm虚拟机时,无法通过spice将USB设备传入虚拟机。

其中出现以下提示:

1
spice-client-error-quark: Could not redirect USB Device [046d:081b] at 3-2: Error setting USB device node ACL: 'Not authorized' (0)

正文

解决方案:

修改规则文件:/usr/share/polkit-1/actions/org.spice-space.lowlevelusbaccess.policy

添加allow_any项并修改allow_inactive项即可。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
          "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
          "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>

  <vendor>The Spice Project</vendor>
  <vendor_url>http://spice-space.org/</vendor_url>
  <icon_name>spice</icon_name>

  <action id="org.spice-space.lowlevelusbaccess">
    <description>Low level USB device access</description>
    <message>Privileges are required for low level USB device access (for usb device pass through).</message>
    <defaults>
      <allow_any>yes</allow_any>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

</policyconfig>

 

 

原文链接:点击打开链接


版权声明:本文为u012276970原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。